import { EventLog } from '../entities/event-log.entity';
import { EventName } from '../value-objects/event-name.vo';

export interface DauQueryResult {
  total: number;
  byProvince: Map<string, number>;
  byCity: Map<string, number>;
}

export interface IEventLogRepository {
  batchInsert(logs: EventLog[]): Promise<void>;
  insert(log: EventLog): Promise<EventLog>;
  queryDau(eventName: EventName, startTime: Date, endTime: Date): Promise<DauQueryResult>;
  findByTimeRange(eventName: EventName, startTime: Date, endTime: Date, limit?: number): Promise<EventLog[]>;
}

export const EVENT_LOG_REPOSITORY = 'EVENT_LOG_REPOSITORY';
