{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://venuemind.dev/schemas/venue-template-catalog.schema.json",
  "title": "VenueMind Venue Template Catalog",
  "type": "object",
  "required": [
    "schemaVersion",
    "venueTemplates",
    "roomTemplates",
    "inventoryTemplates"
  ],
  "properties": {
    "schemaVersion": {
      "const": 1
    },
    "venueTemplates": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "schemaVersion",
          "kind",
          "id",
          "version",
          "name",
          "roomTemplateIds"
        ],
        "properties": {
          "schemaVersion": {
            "const": 1
          },
          "kind": {
            "const": "venue-template"
          },
          "id": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "roomTemplateIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      }
    },
    "roomTemplates": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "schemaVersion",
          "kind",
          "id",
          "version",
          "name",
          "unit",
          "boundary",
          "objects"
        ],
        "properties": {
          "schemaVersion": {
            "const": 1
          },
          "kind": {
            "const": "room-template"
          },
          "id": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "useCase": {
            "enum": [
              "conference",
              "concert",
              "banquet",
              "exhibition",
              "classroom",
              "community-event"
            ]
          },
          "unit": {
            "const": "m"
          },
          "boundary": {
            "type": "object"
          },
          "capacity": {
            "type": "integer",
            "minimum": 0
          },
          "objects": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": false
      }
    },
    "inventoryTemplates": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "schemaVersion",
          "kind",
          "id",
          "version",
          "name",
          "category",
          "dimensions",
          "weightKg",
          "power",
          "capacity",
          "cost",
          "availability"
        ],
        "properties": {
          "schemaVersion": {
            "const": 1
          },
          "kind": {
            "const": "inventory-item-template"
          },
          "id": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "category": {
            "enum": [
              "furniture",
              "seating",
              "barriers",
              "staging",
              "av",
              "catering",
              "signage",
              "queue"
            ]
          },
          "dimensions": {
            "type": "object"
          },
          "weightKg": {
            "type": "number",
            "minimum": 0
          },
          "power": {
            "type": "object",
            "required": [
              "watts",
              "connector"
            ]
          },
          "capacity": {
            "type": "integer",
            "minimum": 0
          },
          "cost": {
            "type": "object",
            "required": [
              "amount",
              "currency",
              "basis"
            ]
          },
          "availability": {
            "type": "object",
            "required": [
              "total",
              "unavailable"
            ],
            "properties": {
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "unavailable": {
                "type": "integer",
                "minimum": 0
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
