export interface AdminDashboardSummary {
  users_by_role: Record<string, number>;
  events_by_status: Record<string, number>;
}

export interface ActivityLogEntry {
  id: number;
  actor: string | null;
  role_context: string;
  action: string;
  entity_type: string;
  entity_id: number;
  description: string | null;
  ip_address: string | null;
  created_at: string;
}

/** FR-110. */
export interface ErrorLogEntry {
  id: number;
  level: string;
  exception_class: string;
  message: string;
  file: string;
  line: number;
  url: string | null;
  method: string | null;
  user: string | null;
  created_at: string;
}

export interface ErrorLogDetail extends ErrorLogEntry {
  trace: string | null;
}

/** FR-091. */
export interface AdminPaymentEntry {
  id: number;
  order_number: string;
  holder_name: string;
  holder_email: string;
  total_amount: string;
  status: string;
  event: string | null;
  organizer: string | null;
  payment_method: string | null;
  payment_status: string | null;
  paid_at: string | null;
  created_at: string;
}

/** FR-092. */
export interface AdminCheckinEntry {
  id: number;
  success: boolean;
  ticket: { id: number; ticket_code: string; holder_name: string; companion_name?: string | null } | null;
  petugas: string | null;
  event: { id: number; title: string } | null;
  method: "qr" | "manual";
  checked_in_at: string | null;
  notes: string | null;
}
