import { ResourceInterface } from './resources'; export enum AddonRelationType { CHILD = 'child', UPSALE = 'upsale', } export enum ProductSubTypesEnum { // league season registartion type SEASON_INDIVIDUAL = 'season_individual', SEASON_TEAM = 'season_team', SEASON_PER_PLAYER = 'season_per_player', } export interface ProductPrice { id: number; createdAt: string; updatedAt: string; organizationId: number; productId: number; name: string; price: number; currency: string; // paymentProcessorId: string; startDate: string; endDate: string; originalPrice?: number; } export interface Product { id: number; organizationId?: number; name: string; quantity?: string; startDate?: string; endDate?: string; description?: string; prices?: ProductPrice[]; currPrice: ProductPrice; downpayment?: number; productSubType?: ProductSubTypesEnum; punchCard: boolean; resources?: ResourceInterface; requiredProductIds?: number[]; } export interface ProductPackageChild { product: Product; relationType: AddonRelationType; } // the children of a product export interface ProductPackage { parentProduct: Product; children: ProductPackageChild[]; }