package com.mall.order.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Getter
@Setter
@Accessors(chain = true)
@TableName("oms_order")
@Schema(name = "Order对象", title = "订单", description = "订单的实体类对象")
public class Order {


    @Schema(name = "id", title = "id")

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;


    @Schema(name = "memberId", title = "member_id")

    private Long memberId;


    @Schema(name = "orderSn", title = "订单号")

    private String orderSn;


    @Schema(name = "couponId", title = "使用的优惠券")

    private Long couponId;


    @Schema(name = "createTime", title = "create_time")

    private LocalDateTime createTime;


    @Schema(name = "memberUsername", title = "用户名")

    private String memberUsername;


    @Schema(name = "totalAmount", title = "订单总额")

    private BigDecimal totalAmount;


    @Schema(name = "payAmount", title = "应付总额")

    private BigDecimal payAmount;


    @Schema(name = "freightAmount", title = "运费金额")

    private BigDecimal freightAmount;


    @Schema(name = "promotionAmount", title = "促销优化金额（促销价、满减、阶梯价）")

    private BigDecimal promotionAmount;


    @Schema(name = "integrationAmount", title = "积分抵扣金额")

    private BigDecimal integrationAmount;


    @Schema(name = "couponAmount", title = "优惠券抵扣金额")

    private BigDecimal couponAmount;


    @Schema(name = "discountAmount", title = "后台调整订单使用的折扣金额")

    private BigDecimal discountAmount;


    @Schema(name = "payType", title = "支付方式【1->支付宝；2->微信；3->银联； 4->货到付款；】")

    private Integer payType;


    @Schema(name = "sourceType", title = "订单来源[0->PC订单；1->app订单]")

    private Integer sourceType;


    @Schema(name = "status", title = "订单状态【0->待付款；1->待发货；2->已发货；3->已完成；4->已关闭；5->无效订单】")

    private Integer status;


    @Schema(name = "deliveryCompany", title = "物流公司(配送方式)")

    private String deliveryCompany;


    @Schema(name = "deliverySn", title = "物流单号")

    private String deliverySn;


    @Schema(name = "autoConfirmDay", title = "自动确认时间（天）")

    private Integer autoConfirmDay;


    @Schema(name = "integration", title = "可以获得的积分")

    private Integer integration;


    @Schema(name = "growth", title = "可以获得的成长值")

    private Integer growth;


    @Schema(name = "billType", title = "发票类型[0->不开发票；1->电子发票；2->纸质发票]")

    private Integer billType;


    @Schema(name = "billHeader", title = "发票抬头")

    private String billHeader;


    @Schema(name = "billContent", title = "发票内容")

    private String billContent;


    @Schema(name = "billReceiverPhone", title = "收票人电话")

    private String billReceiverPhone;


    @Schema(name = "billReceiverEmail", title = "收票人邮箱")

    private String billReceiverEmail;


    @Schema(name = "receiverName", title = "收货人姓名")

    private String receiverName;


    @Schema(name = "receiverPhone", title = "收货人电话")

    private String receiverPhone;


    @Schema(name = "receiverPostCode", title = "收货人邮编")

    private String receiverPostCode;


    @Schema(name = "receiverProvince", title = "省份/直辖市")

    private String receiverProvince;


    @Schema(name = "receiverCity", title = "城市")

    private String receiverCity;


    @Schema(name = "receiverRegion", title = "区")

    private String receiverRegion;


    @Schema(name = "receiverDetailAddress", title = "详细地址")

    private String receiverDetailAddress;


    @Schema(name = "note", title = "订单备注")

    private String note;


    @Schema(name = "confirmStatus", title = "确认收货状态[0->未确认；1->已确认]")

    private Integer confirmStatus;


    @Schema(name = "deleteStatus", title = "删除状态【0->未删除；1->已删除】")

    private Integer deleteStatus;


    @Schema(name = "useIntegration", title = "下单时使用的积分")

    private Integer useIntegration;


    @Schema(name = "paymentTime", title = "支付时间")

    private LocalDateTime paymentTime;


    @Schema(name = "deliveryTime", title = "发货时间")

    private LocalDateTime deliveryTime;


    @Schema(name = "receiveTime", title = "确认收货时间")

    private LocalDateTime receiveTime;


    @Schema(name = "commentTime", title = "评价时间")

    private LocalDateTime commentTime;


    @Schema(name = "modifyTime", title = "修改时间")

    private LocalDateTime modifyTime;

}