export type AdminReportJobExportFormat = "csv" | "xlsx";

export type AdminReportJobStatus = "pending" | "processing" | "completed" | "failed" | string;

export type AdminReportJobRow = {
  id: number;
  job_no: string;
  admin_user_id: number | null;
  report_type: string;
  export_format: AdminReportJobExportFormat;
  status: AdminReportJobStatus;
  finished_at: string | null;
  created_at: string | null;
};

export type AdminReportJobListData = {
  items: AdminReportJobRow[];
  meta: {
    current_page: number;
    per_page: number;
    total: number;
    last_page: number;
  };
};

export type AdminReportJobCreatePayload = {
  report_type: string;
  export_format?: AdminReportJobExportFormat;
  parameters?: Record<string, unknown>;
  filter_json?: Record<string, unknown>;
};

export type AdminReportJobCreateResult = {
  id: number;
  job_no: string;
  report_type: string;
  export_format: AdminReportJobExportFormat;
  status: AdminReportJobStatus;
};
