package com.fzm.mall.server.front.order.model;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 用户购物订单表
 * </p>
 *
 * @author fzm
 * @since 2021-03-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Order对象", description="用户购物订单表")
@TableName("order_info")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键自增编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "订单编号")
    private String oid;

    @ApiModelProperty(value = "用户编号")
    private String uid;

    @ApiModelProperty(value = "支付单号")
    private String payId;

    @ApiModelProperty(value = "卖家编号")
    private String merchantId;
//
//    @ApiModelProperty(value = "具体商品编号")
//    private String skuId;

    @ApiModelProperty(value = "邮费")
    private BigDecimal postFee;

    @ApiModelProperty(value = "总价")
    private BigDecimal total;

    @ApiModelProperty(value = "是否接受数字货币：1->接受，2->不接受")
    private Integer acceptDigital;

    @ApiModelProperty(value = "支付方式，1->支付宝，2->微信，3->ccny")
    private Integer payType;

    @ApiModelProperty(value = "1.普通 2.预售 3.拍卖")
    private Integer orderType;

    @ApiModelProperty(value = "订单状态，1->交易成功，2->交易关闭，3->定金已付，4->待退款，5->已退款，6->支付中，7->待支付 ,8 撤销退款," +
            " 9->退款驳回, 10 待付尾款 11->链上退款失败 12->退款中 13->退款失败 14->交易结束")
    private Integer orderState;

    @ApiModelProperty(value = "是否直接提货，0->否，1->是")
    private Integer delivery;

    @ApiModelProperty(value = "收货人名称")
    private String uname;

    @ApiModelProperty(value = "收人手机号")
    private String phone;

    @ApiModelProperty(value = "提货地址")
    private String address;

    @ApiModelProperty(value = "是否删除，0->否，1->是")
    private Integer isDelete;

    @ApiModelProperty(value = "审核备注")
    private String vNote;

    @ApiModelProperty(value = "下单时间")
    @TableField(fill = FieldFill.INSERT)
    private Long createTime;

    @ApiModelProperty(value = "支付或取消时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateTime;

    @ApiModelProperty(value = "客户协商优惠金额")
    private BigDecimal consultDiscountAmount;

    private Integer consultDiscountType;

    @ApiModelProperty(value = "优惠金额")
    private BigDecimal discountAmount;

    @ApiModelProperty(value = "应付金额")
    private BigDecimal amount;


}
