{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A boxing match program combined with a history book entry. Before the fight it is a schedule. After the fight it is a permanent record. Ptah-Seker-Osiris — creation, shadow, rebirth. The event holds all three phases simultaneously.",
      "key": "tid",
      "record": {
        "properties": {
          "completedAt": {
            "description": "Timestamp of when the event concluded.",
            "format": "datetime",
            "type": "string"
          },
          "createdAt": {
            "description": "Timestamp of event creation.",
            "format": "datetime",
            "type": "string"
          },
          "creatorDID": {
            "description": "Who organized this event.",
            "format": "did",
            "type": "string"
          },
          "eventType": {
            "description": "What kind of event. Open-ended.",
            "knownValues": [
              "tournament",
              "battle",
              "gathering",
              "contest",
              "ritual"
            ],
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          },
          "format": {
            "description": "The competitive or structural format of the event.",
            "knownValues": [
              "bracket",
              "roundRobin",
              "openChallenge",
              "singleElimination"
            ],
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          },
          "locationReference": {
            "description": "The AT URI of the location where this event happened.",
            "format": "at-uri",
            "type": "string"
          },
          "loreStatus": {
            "description": "The narrative standing of this event in the world's timeline.",
            "knownValues": [
              "world.ptah.temp.defs#canonicalStatusOfficial",
              "world.ptah.temp.defs#canonicalStatusCommunity",
              "pending"
            ],
            "type": "string"
          },
          "name": {
            "description": "What this event is called.",
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          },
          "participants": {
            "description": "AT URIs of the character records participating. Not people — characters.",
            "items": {
              "format": "at-uri",
              "type": "string"
            },
            "type": "array"
          },
          "result": {
            "description": "The outcome. Populated when status moves to completed.",
            "maxGraphemes": 1024,
            "maxLength": 10240,
            "type": "string"
          },
          "stakes": {
            "description": "What is at risk or being contested.",
            "maxGraphemes": 1024,
            "maxLength": 10240,
            "type": "string"
          },
          "status": {
            "description": "The current phase of the event.",
            "knownValues": [
              "upcoming",
              "active",
              "completed"
            ],
            "type": "string"
          },
          "witnesses": {
            "description": "AT URIs of individual witness action records. Each witness action is a real record created by a real DID at a real timestamp. Witnessing is a verifiable technical contribution, not just a tally.",
            "items": {
              "format": "at-uri",
              "type": "string"
            },
            "type": "array"
          },
          "worldReference": {
            "description": "The AT URI of the world this event occurred in.",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "name",
          "creatorDID",
          "worldReference",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "description": "An event record in The Ptah Protocol. Where competition becomes history. A tournament, battle, gathering, or any occasion where people compete or convene inside a world.",
  "id": "world.ptah.temp.event",
  "lexicon": 1
}
