import { MenuCategory } from '../core/menu-category'; import { SaleCategory } from '../core/sale-category'; import { Tax } from '../core/tax'; export class Product { id: string | undefined; versionId?: string; name: string; units: string; menuCategory?: MenuCategory; saleCategory?: SaleCategory; price: number; hasHappyHour: boolean; isNotAvailable: boolean; quantity: number; isActive: boolean; sortOrder: number; enabled: boolean; tax: Tax; validFrom: string | null; validTill: string | null; public constructor(init?: Partial) { this.id = undefined; this.name = ''; this.units = ''; this.price = 0; this.hasHappyHour = false; this.isNotAvailable = false; this.quantity = 0; this.isActive = true; this.sortOrder = 0; this.enabled = true; this.validFrom = null; this.validTill = null; this.tax = new Tax(); Object.assign(this, init); } }