package com.fzm.mall.server.admin.order.entity.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fzm.mall.server.admin.distribution.entity.dto.ParcelCenterGoodsDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

/**
 * <p>
 * 用户购物订单表
 * </p>
 *
 * @author wulixian
 * @since 2021-03-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Order对象", description = "用户购物订单表")
public class OrderDTO 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 BigDecimal postFee;

    @ApiModelProperty(value = "订单金额")
    private BigDecimal total;

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

    @ApiModelProperty(value = "订单状态，1->交易成功，2->交易关闭，3->定金已付，4->待退款，5->已退款，6->支付中，7->待支付")
    private Integer orderState;

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

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

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

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

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

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

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

    @ApiModelProperty(value = "优惠类型(1->客户协商优惠)")
    private Integer consultDiscountType;

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

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

    @ApiModelProperty(value = "下单时间")
    private Long createTime;

    @ApiModelProperty(value = "支付或取消时间")
    private Long updateTime;

    @ApiModelProperty(value = "订单商品集合")
    private List<ParcelCenterGoodsDTO> goodsList;

    @ApiModelProperty(value = "订单操作记录")
    private List<OrderLogDTO> logList;

    @ApiModelProperty(value = "支付信息记录")
    private List<PayRecordDTO> payRecordList;

    @ApiModelProperty(value = "订单商品id集合")
    private List<String> goodsIdList;
}
