package com.xingxi.mq.entity;

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;

    // 套组ID
    @Excel(name = "套组ID")
    private String suiteId;

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

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

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

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

    // 用户设计编号
    @Excel(name = "用户设计编号")
    private String upId;

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

    // 商品区分
    @Excel(name = "商品区分")
    private String prodType;

    // 素材ID
    @Excel(name = "素材ID")
    private Long mateId;

    // 素材名称
    @Excel(name = "素材名称")
    private String mateName;

    // 素材区分
    @Excel(name = "素材区分")
    private String mateType;

    // 平台经销标志 0：供应商直销，1：平台经销
    @Excel(name = "平台经销标志")
    private String pfSellFlag;

    // 平台服务费率（供应商）
    @Excel(name = "平台服务费率（供应商）")
    private BigDecimal vendorServiceRate;

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

    // 设计面数量
    @Excel(name = "设计面数量")
    private Integer surfaceQty;

    // 单位数量
    @Excel(name = "单位数量")
    private Integer unitQty;

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

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

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

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

    // 销方结算价
    @Excel(name = "销方结算价")
    private BigDecimal salePrice;

    // 确认收货时间
    @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;

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

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