// 订单列表项
export interface OrderListItem {
  id: number;
  orderNo: string;
  totalAmount: number;
  payAmount: number;
  status: number;
  statusText: string;
  createTime: string;
  productCount: number;
}

// 订单详情
export interface OrderDetail {
  id: number;
  orderNo: string;
  userId: number;
  totalAmount: number;
  payAmount: number;
  freightAmount: number;
  payType: number;
  status: number;
  receiverName: string;
  receiverPhone: string;
  receiverAddress: string;
  payTime: string;
  deliveryTime: string;
  receiveTime: string;
  createTime: string;
  orderItems: OrderItem[];
}

// 订单项
export interface OrderItem {
  id: number;
  orderId: number;
  orderNo: string;
  productId: number;
  skuId: number;
  productName: string;
  skuName: string;
  productImage: string;
  price: number;
  quantity: number;
  totalPrice: number;
  createTime: string;
  updateTime: string;
}

// 订单分页请求参数
export interface OrderPageParams {
  page: number;
  size: number;
  userId: number;
  status?: number;
}

// 订单分页响应数据
export interface OrderPageResponse {
  list: OrderListItem[];
  total: number;
  page: number;
  size: number;
}

// 创建订单DTO
export interface OrderCreateDTO {
  userId: number;
  receiverName: string;
  receiverPhone: string;
  receiverAddress: string;
  payType?: number;
}
