Adding Seat plan component and database tables
This commit is contained in:
18
software/backend/models/locations/seat.model.ts
Normal file
18
software/backend/models/locations/seat.model.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { BelongsTo, Column, ForeignKey, Model, Table } from "sequelize-typescript";
|
||||
import { SeatRow } from "./seatRow.model";
|
||||
|
||||
@Table({ timestamps: false })
|
||||
export class Seat extends Model {
|
||||
@Column
|
||||
seatNr: number
|
||||
|
||||
@ForeignKey(() => SeatRow)
|
||||
@Column
|
||||
seatRowId: Number
|
||||
|
||||
|
||||
// Relations
|
||||
|
||||
@BelongsTo(() => SeatRow)
|
||||
seatRow: SeatRow
|
||||
}
|
||||
Reference in New Issue
Block a user