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;

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

    // 订单类别
    @Excel(name = "订单类别", dictType = "orderType")
    private String orderType;

    // 优定团编号
    @Excel(name = "优定团编号")
    private Long groupId;

    // 楼号
    @Excel(name = "楼号")
    private String buildingNo;

    // 房号
    @Excel(name = "房号")
    private String roomNo;

    // 跟团号
    @Excel(name = "跟团号")
    private Integer groupNo;

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

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

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

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

    // 购方用户角色
    @Excel(name = "购方用户角色")
    private String buyerRole;

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

    // 销方用户角色
    @Excel(name = "销方用户角色")
    private String sellerRole;

    // 收款方ID
    @Excel(name = "收款方ID")
    private Long payeeId;

    // 收款方角色
    @Excel(name = "收款方角色")
    private String payeeRole;

    // 推荐人用户ID
    @Excel(name = "推荐人用户ID")
    private Long referrerId;

    // 推荐人用户角色
    @Excel(name = "推荐人用户角色")
    private String referrerRole;

    // 推荐人分佣比率
    @Excel(name = "推荐人分佣比率")
    private BigDecimal referrerRate;

    // 平台服务费率
    @Excel(name = "平台服务费率")
    private BigDecimal serviceRate;

    // 取消时间
    @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 Long recProvId;

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

    // 收件人市
    @Excel(name = "收件人市")
    private Long recCityId;

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

    // 收件人区
    @Excel(name = "收件人区")
    private Long recAreaId;

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

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

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

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

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