Artteiv's picture
fix: update branch admin
9e8f9e3
raw
history blame contribute delete
809 Bytes
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<BranchMenuEntity>[];
@CreateDateColumn()
create_at: Date;
@DeleteDateColumn()
delete_at: Date;
}