front-hub/src/model/privilege.ts
nflnkr a6ac175f22 fix cart & custom tariff calculations
use discount type from kitui package
use functions for finding discounts from kitui package
remove old discount types
2023-07-13 21:59:38 +03:00

22 lines
587 B
TypeScript

export interface Privilege {
_id: string;
name: string;
privilegeId: string;
serviceKey: string;
description: string;
type: "day" | "count";
value: PrivilegeValueType;
price: number;
updatedAt?: string;
isDeleted?: boolean;
createdAt?: string;
};
export type ServiceKeyToPrivilegesMap = Record<string, Privilege[]>;
export type PrivilegeValueType = "шаблон" | "день" | "МБ";
export type PrivilegeWithAmount = Omit<Privilege, "_id"> & { amount: number; };
export type PrivilegeWithoutPrice = Omit<PrivilegeWithAmount, "price">;