65 lines
1.2 KiB
TypeScript
65 lines
1.2 KiB
TypeScript
export interface IDiscountEmail {
|
|
id?: string;
|
|
_id?: string;
|
|
companyId: string;
|
|
discountId: string;
|
|
email: string;
|
|
startDate: Date;
|
|
endDate: Date;
|
|
createdAt: Date;
|
|
}
|
|
|
|
export type DiscountEmailView = {
|
|
id: string;
|
|
companyId: string;
|
|
discountId: string;
|
|
discountName: string;
|
|
discountType: string;
|
|
discountValue: number;
|
|
discountCode: string;
|
|
email: string;
|
|
startDate: Date;
|
|
endDate: Date;
|
|
};
|
|
|
|
export type FindDiscountsEmailParams = {
|
|
id?: string;
|
|
companyId: string;
|
|
discountId?: string;
|
|
email?: string;
|
|
sessionUser: string;
|
|
searchDate?: Date;
|
|
};
|
|
|
|
export type PaginateDiscountsEmailParams = FindDiscountsEmailParams & {
|
|
page: number;
|
|
limit: number;
|
|
};
|
|
|
|
export type PaginateDiscountsEmailResults = {
|
|
data: IDiscountEmail[];
|
|
page: number;
|
|
pages: number;
|
|
};
|
|
|
|
export type PaginateDiscountsEmailViewResults = {
|
|
data: DiscountEmailView[];
|
|
page: number;
|
|
pages: number;
|
|
};
|
|
|
|
export type CreateDiscountEmailParams = {
|
|
companyId: string;
|
|
discountId: string;
|
|
email: string;
|
|
startDate: Date;
|
|
endDate: Date;
|
|
sessionUser: string;
|
|
};
|
|
|
|
export type DeleteDiscountEmailParams = {
|
|
id: string;
|
|
companyId: string;
|
|
sessionUser: string;
|
|
};
|