Files
barker/bookie/src/app/sales/product.ts
T
2026-01-24 03:26:03 +00:00

42 lines
945 B
TypeScript

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<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);
}
}