18 lines
345 B
TypeScript
18 lines
345 B
TypeScript
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
|
|
} |