import { Modifier } from './modifier'; export class BillViewItem { id: string | undefined; kotId: string | undefined; isKot: boolean; info: string; productId: string; isHappyHour: boolean; isPrinted: boolean; quantity: number; modifiers: Modifier[]; public get isOldKot(): boolean { return this.isKot && this.kotId !== undefined; } public get isNewKot(): boolean { return this.isKot && this.kotId === undefined; } public constructor(init?: Partial) { this.isKot = true; this.info = ''; this.kotId = ''; this.productId = ''; this.isHappyHour = false; this.isPrinted = false; this.quantity = 0; this.modifiers = []; Object.assign(this, init); } }