adminFront/src/model/promocodes.ts
2024-03-26 18:41:22 +03:00

49 lines
817 B
TypeScript

export type CreatePromocodeBody = {
codeword: string;
description: string;
greetings: string;
dueTo: number;
activationCount: number;
bonus: {
privilege: {
privilegeID: string;
amount: number;
};
discount: {
layer: number;
factor: number;
target: string;
threshold: number;
};
};
};
export type GetPromocodeListBody = {
page: number;
limit: number;
filter: {
active: boolean;
text?: string;
};
};
export type Promocode = CreatePromocodeBody & {
id: string;
outdated: boolean;
offLimit: boolean;
delete: boolean;
createdAt: string;
};
export type PromocodeList = {
count: number;
items: Promocode[];
};
export type PromocodeStatistics = {
id: string;
link: string;
useCount: number;
purchasesCount: number;
};