export const AUDIT_LOG_REPOSITORY = Symbol('AUDIT_LOG_REPOSITORY');

export interface AuditLogEntry {
  id: string;
  action: string;
  actorId: string;
  targetId: string;
  targetType: string;
  metadata: Record<string, unknown> | null;
  ipAddress: string | null;
  userAgent: string | null;
  createdAt: Date;
}

export interface AuditLogListResult {
  data: AuditLogEntry[];
  total: number;
  page: number;
  limit: number;
  totalPages: number;
}

export interface CreateAuditLogInput {
  action: string;
  actorId: string;
  targetId: string;
  targetType: string;
  metadata?: Record<string, unknown>;
}

export interface IAuditLogRepository {
  create(input: CreateAuditLogInput): Promise<AuditLogEntry>;
  findAll(params: {
    page: number;
    limit: number;
    action?: string;
    actorId?: string;
    targetId?: string;
    targetType?: string;
    startDate?: Date;
    endDate?: Date;
  }): Promise<AuditLogListResult>;
}
