import { Notification, NotificationStatus } from '../entities/notification.entity';

export interface INotificationRepository {
  findById(id: string): Promise<Notification | null>;
  findByIdAndUserId(id: string, userId: string): Promise<Notification | null>;
  findByUserId(userId: string, skip: number, take: number): Promise<[Notification[], number]>;
  countByUserIdAndStatus(userId: string, status: NotificationStatus): Promise<number>;
  create(data: Partial<Notification>): Promise<Notification>;
  save(notification: Notification): Promise<Notification>;
  updateStatus(id: string, status: NotificationStatus, extra?: Partial<Notification>): Promise<void>;
  getStatusCounts(): Promise<Array<{ status: string; count: string }>>;
  getChannelStatusCounts(): Promise<Array<{ channel: string; status: string; count: string }>>;
  countTodaySent(): Promise<number>;
}

export const NOTIFICATION_REPOSITORY = Symbol('INotificationRepository');
