import { BaseEntity, Column, CreateDateColumn, DeleteDateColumn, Entity, OneToMany, PrimaryColumn, Relation, } from 'typeorm'; import { BranchMenuEntity } from './branch-menu.entity.js'; import { MenuItemType } from '../common/enums/MenuItemType.enum.js'; @Entity('menu_items') export class MenuItemEntity extends BaseEntity { @PrimaryColumn() id: string; @Column() item_name: string; @Column({ nullable: true }) image_url: string; @Column({ default: 0 }) item_type: number; @Column() description: string; @Column() price: number; @OneToMany(() => BranchMenuEntity, (a) => a.menu_item) branch_menus: Relation[]; @CreateDateColumn() create_at: Date; @DeleteDateColumn() delete_at: Date; }