import { BaseEntity, Column, Entity, ManyToOne, OneToMany, PrimaryColumn, Relation, } from 'typeorm'; import { BranchMenuEntity } from './branch-menu.entity.js'; @Entity('menu_items') export class MenuItemEntity extends BaseEntity { @PrimaryColumn() id: string; @Column() item_name: string; @Column({ nullable: true }) image_url: string; @Column({ nullable: true }) item_group_id: string; @Column() description: string; @Column() price: number; @OneToMany(() => BranchMenuEntity, (a) => a.menu_item) branch_menus: Relation[]; @Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }) create_at: Date; }