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; @ManyToOne(() => MenuItemEntity, (a) => a.branch_menus) menu_item: Relation; }