{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.sportops.it/formato/schema/allenamenti.schema.json",
  "title": "Allenamenti",
  "description": "Le sedute di allenamento, squadra per squadra.",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Identificativo."
      },
      "squadra_id": {
        "type": [
          "integer",
          "null"
        ],
        "description": "→ squadre.id"
      },
      "titolo": {
        "type": [
          "string",
          "null"
        ],
        "description": "Titolo."
      },
      "data_ora": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "description": "Inizio."
      },
      "durata_min": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Durata in minuti."
      },
      "luogo": {
        "type": [
          "string",
          "null"
        ],
        "description": "Luogo."
      },
      "allenatore_id": {
        "type": [
          "integer",
          "null"
        ],
        "description": "→ allenatori.id"
      },
      "stato": {
        "type": [
          "string",
          "null"
        ],
        "description": "scheduled, completed, cancelled.",
        "enum": [
          "scheduled",
          "completed",
          "cancelled",
          null
        ]
      },
      "note": {
        "type": [
          "string",
          "null"
        ],
        "description": "Note."
      }
    },
    "required": [
      "id",
      "squadra_id",
      "titolo",
      "data_ora",
      "durata_min",
      "luogo",
      "allenatore_id",
      "stato",
      "note"
    ],
    "additionalProperties": false
  }
}