31 lines
565 B
TypeScript
31 lines
565 B
TypeScript
export type PromotionType = 'percent' | 'fixed_amount';
|
|
|
|
export interface Promotion {
|
|
code: string;
|
|
type: PromotionType;
|
|
value: number;
|
|
startsAt: Date;
|
|
endsAt: Date;
|
|
usageLimit: number | null;
|
|
usageCount: number;
|
|
active: boolean;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
}
|
|
|
|
export interface NewPromotion {
|
|
code: string;
|
|
type: PromotionType;
|
|
value: number;
|
|
startsAt: Date;
|
|
endsAt: Date;
|
|
usageLimit?: number | null;
|
|
active?: boolean;
|
|
}
|
|
|
|
export interface PromotionDiscount {
|
|
code: string;
|
|
type: PromotionType;
|
|
discountCents: number;
|
|
}
|