{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://objectsgrid.com/.well-known/objects-catalog/Ticket/v1/schema.json",
  "title": "Ticket",
  "description": "Objects Grid Ticket. A ticket of a Reservation: its number, barcode token, seat and price. Stored inside a Reservation's reservedTicket. Modeled in compliance with https://schema.org/Ticket.",
  "type": "object",
  "properties": {
    "at_type": {
      "description": "The object type",
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "Ticket"
      ]
    },
    "ticketNumber": {
      "description": "The ticket's number",
      "type": [
        "string",
        "null"
      ]
    },
    "ticketToken": {
      "description": "The value of its barcode or QR code",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 2000
    },
    "ticketedSeat": {
      "description": "The seat",
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Seat/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "dateIssued": {
      "description": "When it was issued",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "issuedBy": {
      "description": "The Organization that issued it",
      "x-objectsgrid-rangeIncludes": [
        "Organization"
      ],
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "totalPrice": {
      "description": "Its price",
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "priceCurrency": {
      "description": "The currency of totalPrice, ISO 4217",
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/CurrencyCodeEnumeration/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "unevaluatedProperties": false
}
