{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Record key is a stable slug, e.g. 'pga-2027-masters' or 'f1-2027-monaco-race'.",
      "key": "any",
      "record": {
        "properties": {
          "endsAt": {
            "format": "datetime",
            "type": "string"
          },
          "league": {
            "description": "e.g. PGA, LPGA, LIV, F1, NASCAR.",
            "maxLength": 32,
            "type": "string"
          },
          "name": {
            "description": "e.g. 'The Masters', 'Monaco Grand Prix'.",
            "maxLength": 128,
            "type": "string"
          },
          "progress": {
            "description": "Where a leaderboard event stands. Open.",
            "refs": [
              "com.professorbutts.sports.defs#golfProgress",
              "com.professorbutts.sports.defs#raceProgress"
            ],
            "type": "union"
          },
          "season": {
            "maxLength": 32,
            "type": "string"
          },
          "source": {
            "format": "uri",
            "type": "string"
          },
          "sport": {
            "knownValues": [
              "golf",
              "motorsport"
            ],
            "maxLength": 64,
            "type": "string"
          },
          "standings": {
            "description": "Ordered by position.",
            "items": {
              "ref": "com.professorbutts.sports.defs#entrant",
              "type": "ref"
            },
            "maxLength": 200,
            "type": "array"
          },
          "startsAt": {
            "format": "datetime",
            "type": "string"
          },
          "status": {
            "knownValues": [
              "scheduled",
              "live",
              "suspended",
              "final",
              "postponed",
              "canceled"
            ],
            "type": "string"
          },
          "updatedAt": {
            "format": "datetime",
            "type": "string"
          },
          "venue": {
            "maxLength": 256,
            "type": "string"
          }
        },
        "required": [
          "sport",
          "league",
          "name",
          "status",
          "standings",
          "startsAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "description": "A multi-competitor event (golf tournament, F1 or NASCAR race) and its current standings. One record per event, updated in place.",
  "id": "com.professorbutts.sports.leaderboard",
  "lexicon": 1
}
