export enum DiscountType {
    FIXED = "fixed",
    PERCENTAGE = "percentage",
}

export interface IDiscount {
    id: string;
    _id: string;
    companyId: string;
    name: string;
    code: string;
    type: DiscountType;
    value: number;
    createdAt: Date;
}

export type FindDiscountsParams = {
    id?: string;
    companyId: string;
    code?: string;
    type?: DiscountType;
    sessionUser: string;
    startDate?: Date;
    endDate?: Date;
    startValue?: number;
    endValue?: number;
};

export type PaginateDiscountsParams = FindDiscountsParams & {
    page: number;
    limit: number;
};

export type PaginateDiscountsResults = {
    data: IDiscount[];
    page: number;
    pages: number;
};

export type CreateDiscountParams = {
    companyId: string;
    name: string;
    code: string;
    type: DiscountType;
    value: number;
    sessionUser: string;
};

export type DeleteDiscountParams = {
    id: string;
    companyId: string;
    sessionUser: string;
};
