import { IOrganization } from 'organization'; import { IProduct } from './product.entity'; export interface IDiscount { id: string; name: string; availableFrom: string; availableUntil: string; enabled: boolean; highlight: boolean; cumulative: boolean; discountType: string; code: string; percentage: number; amount: number; quantity: number; quantityPerUser: number; customers: string[]; productRestrictions: IProductRestriction[]; dateRestrictions: IDateRestriction[]; owner: IOrganization; ownerUri?: string; visibleToPublic: boolean; } export interface IDateRestriction { date: string; dayOfWeek: string; fromHour: string; toHour: string; } export interface IProductRestriction { requiredQuantity: number; productUri: string; categoryUri?: string; product?: IProduct; category?: { name: string; }; }