Spaces:
Sleeping
Sleeping
File size: 714 Bytes
d9eec61 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
import {
BaseEntity,
Column,
Entity,
ManyToOne,
OneToMany,
PrimaryGeneratedColumn,
Relation,
} from 'typeorm';
import { BranchEntity } from './branch.entity.js';
import { MenuItemEntity } from './menu-item.entity.js';
@Entity('branch_menu')
export class BranchMenuEntity extends BaseEntity {
@PrimaryGeneratedColumn('uuid')
id: string;
@Column()
branch_id: string;
@Column()
menu_id: string;
@Column()
description: string;
@Column()
is_open: boolean;
@ManyToOne(() => BranchEntity, (a) => a.menu_items)
branch: Relation<BranchEntity>;
@ManyToOne(() => MenuItemEntity, (a) => a.branch_menus)
menu_item: Relation<MenuItemEntity>;
}
|