/**
 * 订单主信息
 * 字段以后端返回的数据结构为准
 */
export interface OrderMain {
  id?: number;
  parentOrderId?: number;
  orderNo?: string;
  shipmentNo?: string;
  subOrderNo?: string;
  companyId?: number;
  customerId?: number;
  customerCode?: string;
  userId?: number;
  createName?: string;
  shippingAddressId?: number;
  purchaseReason?: string;
  invoiceType?: string;
  payType?: string;
  warehouseId?: number;
  orderStatus?: string;
  checkStatus?: string;
  payStatus?: string;
  deliveryStatus?: string;
  totalAmount?: number;
  discountAmount?: number;
  actualAmount?: number;
  freight?: number;
  remark?: string;
  createTime?: string;
  updateTime?: string;
  [key: string]: any;
}

/**
 * 订单商品明细
 * 字段以后端返回的数据结构为准
 */
export interface OrderProduct {
  id?: number;
  orderId?: number;
  orderNo?: string;
  shipmentNo?: string;
  productId?: number;
  productNo?: string;
  productName?: string;
  productSpec?: string;
  productBrand?: string;
  productUnit?: string;
  quantity?: number;
  unitPrice?: number;
  totalPrice?: number;
  discountAmount?: number;
  actualPrice?: number;
  remark?: string;
  [key: string]: any;
}

/**
 * 订单状态统计
 * 字段以后端返回的数据结构为准
 */
export interface OrderStatusStats {
  pendingPaymentCount?: number;
  pendingShipmentCount?: number;
  shippedCount?: number;
  completedCount?: number;
  closedCount?: number;
  totalCount?: number;
}

/**
 * 订单流程保存BO
 * 用于新增或编辑订单流程
 */
export interface OrderCustomerFlowSaveBo {
  id?: number | string;
  flowName: string;
  flowDesc?: string;
  flowType?: string;
  status?: string;
  remark?: string;
  flowNodes?: OrderCustomerFlowNode[];
  [key: string]: any;
}

/**
 * 订单流程节点
 */
export interface OrderCustomerFlowNode {
  id?: number | string;
  flowId?: number;
  nodeName: string;
  //节点类型（0开始节点 1中间节点 2结束节点）
  nodeType: string;
  //节点顺序(开始节点默认是0,结束节点最大)
  sort: number;
  //处理人id
  handlerId?: string;
  remark?: string;
  [key: string]: any;
}

/**
 * 订单流程审核BO
 */
export interface OrderCustomerFlowLinkBo {
  id: number | string;
  auditStatus: string;
  auditOpinion?: string;
  [key: string]: any;
}

/**
 * 订单流程详情
 */
export interface OrderCustomerFlow {
  id?: number | string;
  flowName?: string;
  flowDesc?: string;
  flowType?: string;
  status?: string;
  createBy?: string;
  createTime?: string;
  updateBy?: string;
  updateTime?: string;
  remark?: string;
  flowNodes?: OrderCustomerFlowNode[];
  [key: string]: any;
}
