{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schemas.apps.smartmate.io/tables/stages/stages.schema.json",
  "$$target": "https://schemas.apps.smartmate.io/tables/stages/stages.schema.json",
  "type": "object",
  "title": "stages",
  "description": "Stages are states that a record on a mainTable can take.",
  "propertyNames": {
    "allOf": [{"$ref": "https://schemas.apps.smartmate.io/patterns/identification.schema.json"}]
  },
  "patternProperties": {
    "": {"$ref": "#/definitions/stageProperties"}
  },
  "definitions": {
    "stageProperties": {
      "type": "object",
      "required": ["name"],
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "done": {
          "type": "boolean",
          "default": false,
          "description": "Determines if it is on a 'final' state"
        },
        "successful": {
          "type": "boolean",
          "description": "Determines if the outcome can be considered successful."
        },
        "parked": {
          "type": "boolean",
          "default": false,
          "description": "Determines if the item is on a parked state."
        }
      }
    }
  },
  "additionalProperties": {"$ref": "https://schemas.apps.smartmate.io/patterns/identification.schema.json"}
}
