package org.jeecg.modules.oroqen.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

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

/**
 * @Description: 订单
 * @Author: jeecg-boot
 * @Date: 2025-01-08
 * @Version: V1.0
 */
@Data
@TableName("oroqen_order")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "订单")
public class OroqenOrder implements Serializable {
    private static final long serialVersionUID = 1L;

    /**主键*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "主键")
    private String id;

    /**订单号*/
    @Excel(name = "订单号", width = 15)
    @Schema(description = "订单号")
    private String orderNo;

    /**用户ID*/
    @Excel(name = "用户ID", width = 15)
    @Schema(description = "用户ID")
    private String userId;

    /**订单状态(0-待付款,1-待发货,2-待收货,3-已完成,4-已取消)*/
    @Excel(name = "订单状态", width = 15)
    @Schema(description = "订单状态(0-待付款,1-待发货,2-待收货,3-已完成,4-已取消)")
    private Integer status;

    /**商品总金额*/
    @Excel(name = "商品总金额", width = 15)
    @Schema(description = "商品总金额")
    private BigDecimal totalAmount;

    /**运费*/
    @Excel(name = "运费", width = 15)
    @Schema(description = "运费")
    private BigDecimal shippingFee;

    /**优惠金额*/
    @Excel(name = "优惠金额", width = 15)
    @Schema(description = "优惠金额")
    private BigDecimal discountAmount;

    /**实付金额*/
    @Excel(name = "实付金额", width = 15)
    @Schema(description = "实付金额")
    private BigDecimal payAmount;

    /**支付方式(1-微信,2-支付宝,3-银行卡)*/
    @Excel(name = "支付方式", width = 15)
    @Schema(description = "支付方式(1-微信,2-支付宝,3-银行卡)")
    private Integer paymentMethod;

    /**支付时间*/
    @Excel(name = "支付时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "支付时间")
    private Date paymentTime;

    /**收货人姓名*/
    @Excel(name = "收货人姓名", width = 15)
    @Schema(description = "收货人姓名")
    private String receiverName;

    /**收货人电话*/
    @Excel(name = "收货人电话", width = 15)
    @Schema(description = "收货人电话")
    private String receiverPhone;

    /**收货地址*/
    @Excel(name = "收货地址", width = 15)
    @Schema(description = "收货地址")
    private String receiverAddress;

    /**物流公司*/
    @Excel(name = "物流公司", width = 15)
    @Schema(description = "物流公司")
    private String shippingCompany;

    /**物流单号*/
    @Excel(name = "物流单号", width = 15)
    @Schema(description = "物流单号")
    private String trackingNumber;

    /**发货时间*/
    @Excel(name = "发货时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "发货时间")
    private Date shippingTime;

    /**收货时间*/
    @Excel(name = "收货时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "收货时间")
    private Date receivedTime;

    /**订单备注*/
    @Excel(name = "订单备注", width = 15)
    @Schema(description = "订单备注")
    private String remark;

    /**创建人*/
    @Schema(description = "创建人")
    private String createBy;

    /**创建日期*/
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建日期")
    private Date createTime;

    /**更新人*/
    @Schema(description = "更新人")
    private String updateBy;

    /**更新日期*/
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新日期")
    private Date updateTime;
}