export const MODERATION_AUDIT_LOG_REPOSITORY = Symbol(
  'MODERATION_AUDIT_LOG_REPOSITORY',
);

export type ModerationAction = 'approve' | 'reject' | 'flag' | 'edit' | string;
export type ModerationTargetType =
  | 'listing'
  | 'property'
  | 'inquiry'
  | 'review'
  | string;

export interface ModerationAuditLogEntry {
  id: string;
  targetType: string;
  targetId: string;
  action: string;
  moderatorId: string;
  reason: string | null;
  metadata: Record<string, unknown> | null;
  createdAt: Date;
}

export interface CreateModerationAuditLogInput {
  targetType: ModerationTargetType;
  targetId: string;
  action: ModerationAction;
  moderatorId: string;
  reason?: string;
  metadata?: Record<string, unknown>;
}

export interface ModerationAuditLogListParams {
  page: number;
  limit: number;
  targetType?: string;
  targetId?: string;
  action?: string;
  moderatorId?: string;
  startDate?: Date;
  endDate?: Date;
}

export interface ModerationAuditLogListResult {
  data: ModerationAuditLogEntry[];
  total: number;
  page: number;
  limit: number;
  totalPages: number;
}

export interface IModerationAuditLogRepository {
  create(input: CreateModerationAuditLogInput): Promise<ModerationAuditLogEntry>;
  findAll(
    params: ModerationAuditLogListParams,
  ): Promise<ModerationAuditLogListResult>;
}
