{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Where competition becomes history. A structured occurrence with participants, stakes, results, and witnesses.",
      "key": "tid",
      "record": {
        "properties": {
          "canonicalStatus": {
            "description": "The canonical standing of this event",
            "knownValues": [
              "world.ptah.defs#canonicalStatusOfficial",
              "world.ptah.defs#canonicalStatusCommunity",
              "world.ptah.defs#canonicalStatusApocryphal"
            ],
            "type": "string"
          },
          "createdAt": {
            "description": "Timestamp when this event was created",
            "format": "datetime",
            "type": "string"
          },
          "creatorDID": {
            "description": "The permanent identity of the event's creator",
            "format": "did",
            "type": "string"
          },
          "description": {
            "description": "What this event is about",
            "maxGraphemes": 1024,
            "maxLength": 10240,
            "type": "string"
          },
          "endTime": {
            "description": "When the event ends",
            "format": "datetime",
            "type": "string"
          },
          "eventType": {
            "description": "The type of event",
            "knownValues": [
              "competition",
              "gathering",
              "milestone",
              "ceremony",
              "conflict"
            ],
            "type": "string"
          },
          "locationReference": {
            "description": "Reference to the location where this event takes place",
            "format": "at-uri",
            "type": "string"
          },
          "name": {
            "description": "The name of the event",
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          },
          "participants": {
            "description": "References to character records participating in this event",
            "items": {
              "format": "at-uri",
              "type": "string"
            },
            "type": "array"
          },
          "result": {
            "description": "The outcome of the event",
            "maxGraphemes": 1024,
            "maxLength": 10240,
            "type": "string"
          },
          "stakes": {
            "description": "What is at stake in this event",
            "maxGraphemes": 1024,
            "maxLength": 10240,
            "type": "string"
          },
          "startTime": {
            "description": "When the event begins",
            "format": "datetime",
            "type": "string"
          },
          "status": {
            "description": "The current status of the event",
            "knownValues": [
              "scheduled",
              "active",
              "completed",
              "cancelled"
            ],
            "type": "string"
          },
          "witnesses": {
            "description": "References to witness action records — verifiable attendance",
            "items": {
              "format": "at-uri",
              "type": "string"
            },
            "type": "array"
          },
          "worldReference": {
            "description": "Reference to the world this event occurs in",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "name",
          "creatorDID",
          "worldReference",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "world.ptah.event",
  "lexicon": 1
}
