export type AdminTicketItemRow = {
  id: number;
  ticket_no: string;
  agent_node_id?: number | null;
  agent_code?: string | null;
  agent_name?: string | null;
  player_id: number;
  site_code: string | null;
  site_player_id: string | null;
  username: string | null;
  nickname: string | null;
  funding_mode?: string | null;
  uses_credit?: boolean;
  order_no: string | null;
  draw_no: string | null;
  currency_code: string | null;
  play_code: string;
  original_number: string | null;
  /** @deprecated 历史字段，单位为 minor；优先使用 total_bet_amount_minor */
  total_bet_amount: number;
  total_bet_amount_minor: number;
  total_bet_amount_formatted: string;
  /** @deprecated 历史字段，单位为 minor；优先使用 actual_deduct_amount_minor */
  actual_deduct_amount: number;
  actual_deduct_amount_minor: number;
  actual_deduct_amount_formatted: string;
  status: string;
  fail_reason_code: string | null;
  fail_reason_text: string | null;
  /** @deprecated 历史字段，单位为 minor；优先使用 win_amount_minor */
  win_amount: number;
  win_amount_minor: number;
  win_amount_formatted: string;
  /** @deprecated 历史字段，单位为 minor；优先使用 jackpot_win_amount_minor */
  jackpot_win_amount: number;
  jackpot_win_amount_minor: number;
  jackpot_win_amount_formatted: string;
  placed_at: string | null;
  updated_at: string | null;
};

export type AdminTicketCombinationRow = {
  combination_no: number;
  number_4d: string;
  bet_amount: number;
  estimated_payout: number;
};

export type AdminTicketItemDetail = {
  id: number;
  ticket_no: string;
  order_no: string | null;
  order_status: string | null;
  draw_id: number;
  draw_no: string | null;
  currency_code: string | null;
  player_id: number;
  site_code: string | null;
  site_player_id: string | null;
  username: string | null;
  nickname: string | null;
  funding_mode: string | null;
  agent_node_id: number | null;
  agent_code: string | null;
  agent_name: string | null;
  play_code: string;
  dimension: number | null;
  digit_slot: number | null;
  original_number: string | null;
  normalized_number: string | null;
  combination_count: number;
  unit_bet_amount: number;
  total_bet_amount_minor: number;
  total_bet_amount_formatted: string;
  actual_deduct_amount_minor: number;
  actual_deduct_amount_formatted: string;
  risk_locked_amount: number;
  status: string;
  fail_reason_code: string | null;
  fail_reason_text: string | null;
  win_amount_minor: number;
  win_amount_formatted: string;
  placed_at: string | null;
  updated_at: string | null;
  combinations: AdminTicketCombinationRow[];
};

export type AdminTicketItemsData = {
  items: AdminTicketItemRow[];
  total: number;
  page: number;
  per_page: number;
  last_page: number;
};
