package com.xingxi.business.Order.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xingxi.common.annotation.Excel;
import com.xingxi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单明细对象 t_order_detail
 *
 * @author xingxi
 * @date 2025-02-10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString
public class OrderDetail extends BaseEntity {
    private static final long serialVersionUID = 1L;

    // 订单明细ID
    private Long orderDetailId;

    // 订单ID
    @Excel(name = "订单ID")
    private Long orderId;

    // 订单明细状态
    @Excel(name = "订单明细状态")
    private String orderDetailStatus;

    // 商品ID
    @Excel(name = "商品ID")
    private Long prodId;

    // 商品名
    @Excel(name = "商品名")
    private String prodName;

    // 属性组合编号
    @Excel(name = "属性组合编号")
    private Long prodAttrId;

    // 属性组合名称
    @Excel(name = "属性组合名称")
    private String prodAttrName;

    // 供应商ID
    @Excel(name = "供应商ID")
    private Long vendorId;

    // 购买数量
    @Excel(name = "购买数量")
    private Integer quantity;

    // 售后中数量
    @Excel(name = "售后中数量")
    private Integer afterQty;

    // 已退货数量
    @Excel(name = "已退货数量")
    private Integer returnQty;

    // 购买单价
    @Excel(name = "购买单价")
    private BigDecimal price;

    // 总金额
    @Excel(name = "总金额")
    private BigDecimal orderAmount;

    // 支付金额
    @Excel(name = "支付金额")
    private BigDecimal payAmount;

    // 确认收货时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "确认收货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date confirmTime;

    // 完成时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date finishTime;

    // 删除标志（0代表存在 1代表删除）
    @Excel(name = "删除标志", readConverterExp = "0=代表存在,1=代表删除")
    private String delFlag;

}
