Skip to main content

Seat Model

Data structure for individual seats.

Hierarchy​

SeatModel sits within the BlockModel in the root DataModel:

DataModel
└── blocks[] (array of BlockModel)
├── seats[] (array of SeatModel) ← You are here
└── labels[] (array of LabelModel)

Full hierarchy example:

{
"blocks": [
{
"id": "orchestra",
"title": "Orchestra",
"color": "#2c3e50", // ← BlockModel properties
"seats": [ // ← seats array (SeatModel[])
{ // ← YOU ARE HERE
"id": 101,
"title": "A1",
"x": 100,
"y": 200,
"salable": true,
"selected": false,
"note": "Wheelchair accessible",
"color": "#4CAF50",
"custom_data": {
"price": 50.00,
"category": "premium"
}
}
],
"labels": [ // ← labels array (not related to seats)
{
"title": "Row A",
"x": -50,
"y": 0
}
]
}
]
}

Properties​

PropertyTypeRequiredDefaultDescription
idstring | number✅-Unique identifier
titlestring✅-Display text (seat number)
xnumber✅-X coordinate
ynumber✅-Y coordinate
salableboolean❌trueCan be selected
selectedboolean❌falseCurrently selected
notestring❌-Additional notes
colorstring❌-Custom color
custom_dataobject❌-Custom data

Example​

{
"id": 101,
"title": "A1",
"x": 100,
"y": 200,
"salable": true,
"selected": false,
"note": "Wheelchair accessible",
"color": "#4CAF50",
"custom_data": {
"price": 50.00,
"category": "premium",
"row": "A"
}
}

TypeScript​

interface SeatData {
id: string | number;
title: string;
x: number;
y: number;
salable?: boolean;
selected?: boolean;
note?: string;
color?: string;
custom_data?: Record<string, any>;
}