{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.sportops.it/formato/schema/presenze_allenamenti.schema.json",
  "title": "Presenze agli allenamenti",
  "description": "Chi c'era a ogni seduta.",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "allenamento_id": {
        "type": [
          "integer",
          "null"
        ],
        "description": "→ allenamenti.id"
      },
      "atleta_id": {
        "type": [
          "integer",
          "null"
        ],
        "description": "→ atleti.id"
      },
      "stato": {
        "type": [
          "string",
          "null"
        ],
        "description": "present, absent, late, excused.",
        "enum": [
          "present",
          "absent",
          "late",
          "excused",
          null
        ]
      },
      "note": {
        "type": [
          "string",
          "null"
        ],
        "description": "Note."
      }
    },
    "required": [
      "allenamento_id",
      "atleta_id",
      "stato",
      "note"
    ],
    "additionalProperties": false
  }
}