43 lines
940 B
TypeScript
43 lines
940 B
TypeScript
// eslint-disable-next-line import/no-cycle
|
|
import { MenuCategory } from './menu-category';
|
|
import { SaleCategory } from './sale-category';
|
|
import { Tax } from './tax';
|
|
|
|
export class Product {
|
|
id: string | undefined;
|
|
versionId?: string;
|
|
code: number;
|
|
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;
|
|
validTill?: string;
|
|
|
|
public constructor(init?: Partial<Product>) {
|
|
this.id = undefined;
|
|
this.code = 0;
|
|
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.tax = new Tax();
|
|
Object.assign(this, init);
|
|
}
|
|
}
|