export type OfficeBuyoutLotOption = {
  id: string;
  agent_id: string;
  agent_name: string;
  lot_code: string;
  grade: string;
  available_qty: number;
  unit_code: string;
  mal_unit_price: number;
  agent_share_percent: number;
  warehouse: string;
  location: string | null;
};

export type OfficeBuyoutAgentOption = {
  id: string;
  code: string;
  name: string;
};

export type OfficeBuyoutBootstrap = {
  agents: OfficeBuyoutAgentOption[];
  lots: OfficeBuyoutLotOption[];
};

export type OfficeBuyoutLineItem = {
  id: string;
  source_lot_id: string;
  source_lot_code: string;
  result_lot_code: string;
  grade: string;
  qty_buyout: number;
  unit_code: string;
  buyout_unit_price: number;
  mal_unit_price_snapshot: number;
  agent_share_percent: number;
  profit_amount: number;
  agent_commission: number;
};

export type OfficeBuyoutListItem = {
  id: string;
  purchase_no: string;
  purchase_date: string;
  status: string;
  source_agent: {
    id: string;
    name: string;
  } | null;
  line_count: number;
  total_qty: number;
  total_buyout_amount: number;
  total_agent_commission: number;
  lines: OfficeBuyoutLineItem[];
};
