/**
 * Order types based on API DTO (Data Transfer Object).
 * Represents the order data structure returned by the API.
 *
 * Note: This is different from OrderFilters (in schemas/order.schema.ts),
 * which represents search/filter parameters (input), not the order data itself (output).
 */
export interface Order {
  // Identifiers
  orderId?: number | string;
  id?: number | string;
  orderSaleId?: number | string;

  // Dates
  createDate?: string;
  createDateIni?: string;
  deliveryDate?: string;
  invoiceDate?: string;
  confirmDeliveryDate?: string;
  releaseDate?: string;
  shipmentDate?: string;

  // Time
  invoiceHour?: number | string;
  invoiceMinute?: number | string;
  'HORA FATURAMENTO'?: number | string;
  'MINUTO FATURAMENTO'?: number | string;

  // Customer
  customerId?: number;
  customerName?: string;

  // Store
  storeId?: string | number;
  codfilial?: string | number;
  store?: string;

  // Status and Type
  status?: string;
  orderType?: string;
  type?: string;

  // Financial
  amount?: number;
  invoiceNumber?: string;
  billingId?: string;
  billingName?: string;
  paymentId?: number | string;
  paymentName?: string;
  payment?: any;

  // Seller
  sellerId?: number | string;
  sellerName?: string;

  // Delivery
  deliveryType?: string;
  deliveryLocal?: string;
  masterDeliveryLocal?: string;
  deliveryPriority?: number | string | null;
  totalWeigth?: number;
  totalWeight?: number;
  carrier?: string;
  driver?: string;
  schedulerDelivery?: string;

  // User and Partner
  fatUserName?: string;
  fatUserCode?: number | string;
  fatUserDescription?: string;
  partnerId?: number | string;
  partnerName?: string;
  codusur2Name?: string;
  releaseUserName?: string;

  // Additional
  processOrder?: any;
  statusTransfer?: string;
  carDescription?: string;
  codEmitente?: number | string;
  emitenteNome?: string;
}

export interface NormalizedOrderRow {
  id: string;
  orderId: number | string;
  createDate?: string;
  customerName: string;
  status: string;
  orderType: string;
  amount: number;
  invoiceNumber: string;
  billingId?: string;
  sellerName: string;
  deliveryType: string;
  totalWeight: number;
  fatUserName: string;
  customerId?: number;
  deliveryDate?: string;
  deliveryLocal: string;
  masterDeliveryLocal: string;
  deliveryPriority: string | null;
  invoiceDate?: string;
  invoiceHour?: number | string;
  invoiceMinute?: number | string;
  invoiceTime?: string;
  confirmDeliveryDate?: string;
  paymentId?: number | string;
  paymentName: string;
  sellerId?: number | string;
  storeId?: string | number;
  store?: string;
  partnerId?: number | string;
  partnerName: string;
  codusur2Name: string;
  releaseDate?: string;
  releaseUserName: string;
  shipmentDate?: string;
  processOrder?: any;
  payment?: any;
  driver: string;
  orderSaleId?: number | string;
  carDescription: string;
  carrier: string;
  statusTransfer?: string;
  schedulerDelivery: string;
  fatUserCode?: number | string;
  fatUserDescription: string;
  codEmitente?: number | string;
  emitenteNome: string;
}
