UIKit/src/model/discount.ts

58 lines
1.3 KiB
TypeScript
Raw Normal View History

2023-07-10 17:41:55 +00:00
export const SERVICE_LIST = [
{
serviceKey: "templategen",
displayName: "Шаблонизатор документов",
},
{
serviceKey: "squiz",
displayName: "Опросник",
},
{
serviceKey: "dwarfener",
displayName: "Аналитика сокращателя",
},
] as const;
export type ServiceType = (typeof SERVICE_LIST)[number]["serviceKey"];
export interface Discount {
ID: string;
Name: string;
Layer: number;
Description: string;
Condition: {
Period: {
From: string;
To: string;
};
User: string;
UserType: string;
Coupon: string;
PurchasesAmount: number;
CartPurchasesAmount: number;
Product: string;
Term: string;
Usage: string;
PriceFrom: number;
Group: ServiceType;
};
Target: {
Products: [{
ID: string;
Factor: number;
Overhelm: boolean;
}];
Factor: number;
TargetScope: string;
TargetGroup: ServiceType;
Overhelm: boolean;
};
Audit: {
UpdatedAt: string;
CreatedAt: string;
DeletedAt?: string;
Deleted: boolean;
};
Deprecated: boolean;
};