adminFront/src/model/tariff.ts

50 lines
1.1 KiB
TypeScript
Raw Normal View History

2023-03-06 13:23:13 +00:00
export const SERVICE_LIST = [
{
serviceKey: "templategen",
displayName: "Шаблонизатор документов",
},
{
serviceKey: "squiz",
displayName: "Опросник",
},
{
serviceKey: "dwarfener",
2023-05-24 16:27:10 +00:00
displayName: "Аналитика сокращателя",
},
2023-03-06 13:23:13 +00:00
] as const;
export type ServiceType = (typeof SERVICE_LIST)[number]["serviceKey"];
2023-03-06 13:23:13 +00:00
export type PrivilegeType = "unlim" | "gencount" | "activequiz" | "abcount" | "extended";
2023-03-06 13:23:13 +00:00
export interface Privilege_BACKEND {
name: string;
privilegeId: string;
serviceKey: string;
amount: number;
description: string;
price: number;
type: string;
value: string;
updatedAt: string;
_id: string;
2023-03-06 13:23:13 +00:00
}
export type Tariff_BACKEND = {
_id: string,
name: string,
price: number,
isCustom: boolean,
isFront: boolean,
privilegies: Privilege_BACKEND[],
isDeleted: boolean,
createdAt: string,
updatedAt: string
}
export type Tariff_FRONTEND = {
id: string,
name: string,
amount:number,
isFront: boolean,
privilegeId: string,
customPricePerUnit: number
}