Adding Seat plan component and database tables

This commit is contained in:
2024-10-01 15:37:08 +02:00
parent 142d574f78
commit 6c8d8dadaf
33 changed files with 880 additions and 204 deletions

View File

@@ -0,0 +1,32 @@
import { BelongsTo, Column, Default, ForeignKey, HasMany, Model, Table } from "sequelize-typescript";
import { Location } from "./location.model";
import { SeatRow } from "./seatRow.model";
@Table({ timestamps: false })
export class SeatGroup extends Model {
@Column
name: String
@Column
surcharge: Number
@Column
capacity: Number
@Default(false)
@Column
standingArea: Boolean
@ForeignKey(() => Location)
@Column
locationId: Number
// Relations
@BelongsTo(() => Location)
location: Location
@HasMany(() => SeatRow)
seatRows: SeatRow[]
}