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
 *
 * @author xingxi
 * @date 2025-02-10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString
public class Order extends BaseEntity {
    private static final long serialVersionUID = 1L;

    // 订单ID
    private Long orderId;

    // 订单号
    @Excel(name = "订单号")
    private String orderNo;

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

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "订单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    // 订单状态
    @Excel(name = "订单状态", dictType = "orderStatus")
    private String orderStatus;

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

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

    // 商品数量
    @Excel(name = "商品数量")
    private Integer prodQuantity;

    // 购方用户ID
    @Excel(name = "购方用户ID")
    private Long buyerId;

    // 销方用户ID
    @Excel(name = "销方用户ID")
    private Long sellerId;

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

    // 完成时间
    @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 recProv;

    // 收件人市名称
    @Excel(name = "收件人市名称")
    private String recCity;

    // 收件人区名称
    @Excel(name = "收件人区名称")
    private String recDistrict;

    // 收件人地址
    @Excel(name = "收件人地址")
    private String recAddress;

    // 收件人姓名
    @Excel(name = "收件人姓名")
    private String recName;

    // 收件人联系方式
    @Excel(name = "收件人联系方式")
    private String recMobile;

    @Excel(name = "备注")
    private String remark;

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