export type FindSystemNotificationsParams = {
    _id?: string;
    userId?: string;
    companyId?: string;
    serviceId?: string;
    conversationId?: string;
    notificationDate?: Date;
    readed?: boolean;
    sessionUser: string;
};

export type ToggleStateSystemNotificationsParams = {
    state: boolean;
    sessionUser: string;
};

export type PaginateSystemNotificationsParams = {
    query?: string;
    userId?: string;
    companyId?: string;
    serviceId?: string;
    conversationId?: string;
    dateFrom?: Date;
    dateTo?: Date;
    readed?: boolean;
    page: number;
    limit: number;
    sessionUser: string;
};

export type PaginateSystemNotificationsResults = {
    data: ISystemNotification[];
    page: number;
    pages: number;
};

export type UnreadNotificationResults = {
    count: number;
};

export type UpdateSystemNotificationParams = {
    id: string;
    readed: boolean;
    sessionUser: string;
};

export type DeleteSystemNotificationParams = {
    id: string;
    sessionUser: string;
};

export type DeleteNotificationsByDateParams = {
    userId: string;
    dateFrom?: Date;
    dateTo?: Date;
    sessionUser: string;
};

export enum NotificationType {
    APPOINTMENT = 'APPOINTMENT',
    COMPANY = 'COMPANY',
    EMPLOYEE = 'EMPLOYEE',
    SCHEDULE = 'SCHEDULE',
    SCHEDULE_EXCEPTION = 'SCHEDULE_EXCEPTION',
    SCHEDULE_RESTRICTION = 'SCHEDULE_RESTRICTION',
    MESSAGE = 'MESSAGE',
    BILLING = 'BILLING',
    SYSTEM = 'SYSTEM'
}

export interface ISystemNotification {
    id: string;
    _id: string;
    userId?: string;
    companyId?: string;
    serviceId?: string;
    conversationId?: string;
    subject: string;
    message: string;
    notificationDate: Date;
    readed: boolean;
    type?: NotificationType | string;
    code?: string;
}
