This commit is contained in:
2026-02-08 08:50:08 +03:30
commit 8af4936ed0
323 changed files with 92747 additions and 0 deletions
@@ -0,0 +1,30 @@
import { Entity, ManyToOne, Property, Enum } from '@mikro-orm/core';
import { BaseEntity } from '../../../common/entities/base.entity';
import { User } from '../../users/entities/user.entity';
import { Restaurant } from '../../restaurants/entities/restaurant.entity';
import { PagerStatus } from '../interface/pager';
import { Admin } from 'src/modules/admin/entities/admin.entity';
@Entity({ tableName: 'pagers' })
export class Pager extends BaseEntity {
@Property({ type: 'string' })
cookieId!: string;
@ManyToOne(() => Restaurant)
restaurant!: Restaurant;
@Property({ type: 'string' })
tableNumber!: string;
@ManyToOne(() => User, { nullable: true })
user?: User;
@ManyToOne(() => Admin, { nullable: true })
staff?: Admin;
@Property({ type: 'string', nullable: true })
message?: string;
@Enum(() => PagerStatus)
status: PagerStatus = PagerStatus.Pending;
}