front-hub/src/model/customTariffs.ts

23 lines
633 B
TypeScript
Raw Normal View History

2023-06-30 15:35:31 +00:00
import { PrivilegeWithAmount, PrivilegeWithoutPrice } from "./privilege";
2023-05-27 11:50:21 +00:00
type ServiceKey = string;
2023-05-27 11:50:21 +00:00
export type CustomTariffUserValues = Record<string, number>;
export type CustomTariffUserValuesMap = Record<ServiceKey, CustomTariffUserValues>;
2023-05-27 11:50:21 +00:00
export type ServiceKeyToPriceMap = Record<ServiceKey, number>;
2023-06-11 10:07:47 +00:00
export interface CustomTariff {
name: string;
price?: number;
isCustom: boolean;
privilegies: PrivilegeWithAmount[];
updatedAt?: string;
isDeleted?: boolean;
createdAt?: string;
2023-06-30 15:35:31 +00:00
}
export type CreateTariffBody = Omit<CustomTariff, "privilegies"> & { privilegies: PrivilegeWithoutPrice[]; };