Mostly working with Product + Version and Sku + Version.
There will still be many errors. But this is working somewhat
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import { MenuCategory } from './menu-category';
|
||||
import { SaleCategory } from './sale-category';
|
||||
import { Tax } from './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<Product>) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user