package com.ruoyi.mall.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseAudit;
import lombok.Data;

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

/**
 * 订单表对象 oms_order
 *
 */
@Data
@TableName("oms_order")
public class Order extends BaseAudit {
    private static final long serialVersionUID = 1L;


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


    private Long payId;


    @Excel(name = "订单编号")
    private String orderSn;


    @Excel(name = "MEMBER_ID")
    private Long memberId;


    @Excel(name = "用户帐号")
    private String memberUsername;


    @Excel(name = "订单总金额")
    private BigDecimal totalAmount;


    @Excel(name = "采购价")
    private BigDecimal purchasePrice;


    @Excel(name = "应付金额", readConverterExp = "实际支付金额")
    private BigDecimal payAmount;


    @Excel(name = "运费金额")
    private BigDecimal freightAmount;


    @Excel(name = "支付方式：0->未支付；1->支付宝；2->微信")
    private Integer payType;


    @Excel(name = "订单状态：0->待付款；1->待发货；2->已发货；3->已完成；4->已关闭；5->无效订单")
    private Integer status;


    @Excel(name = "退款状态，枚举值：1：无售后或售后关闭，2：售后处理中，3：退款中，4： 退款成功")
    private Integer aftersaleStatus;


    @Excel(name = "物流公司(配送方式)")
    private String deliveryCompany;


    @Excel(name = "物流单号")
    private String deliverySn;


    @Excel(name = "自动确认时间", readConverterExp = "天=")
    private Integer autoConfirmDay;


    @Excel(name = "收货人姓名")
    private String receiverName;


    @Excel(name = "收货人电话")
    private String receiverPhone;

    @Excel(name = "加密的手机号")
    private String receiverPhoneEncrypted;

    @Excel(name = "收货人邮编")
    private String receiverPostCode;

    @Excel(name = "省份/直辖市")
    private String receiverProvince;

    @Excel(name = "城市")
    private String receiverCity;
    @Excel(name = "区")
    private String receiverDistrict;

    @Excel(name = "省份/直辖市id")
    private Long receiverProvinceId;

    @Excel(name = "城市id")
    private Long receiverCityId;

    @Excel(name = "区id")
    private Long receiverDistrictId;

    @Excel(name = "详细地址")
    private String receiverDetailAddress;

    @Excel(name = "订单备注")
    private String note;

    @Excel(name = "商家备注")
    private String merchantNote;

    @Excel(name = "确认收货状态：0->未确认；1->已确认")
    private Integer confirmStatus;

    @Excel(name = "删除状态：0->未删除；1->已删除")
    private Integer deleteStatus;

    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime paymentTime;


    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deliveryTime;


    @Excel(name = "确认收货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime receiveTime;

    private Long memberCouponId;


    private BigDecimal couponAmount;

}
