package com.qs.mp.user.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.qs.mp.common.enums.DeliverOrderResourceEnum;
import com.qs.mp.common.enums.DeliverOrderStatusEnum;
import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @describe 用户提货订单实体类
 * @auther quanshu
 * @create 2022-03-07 20:45:43
 */
@TableName("mp_user_deliver_order")
@Data
@ApiModel("用户提货订单实体类")
public class UserDeliverOrder implements Serializable {

  private static final long serialVersionUID = 1L;

  /**
   * 主键
   */
  @ApiModelProperty("订单 id")
  @TableId(value = "order_id", type = IdType.INPUT)
  private String orderId;

  /**
   * 用户ID
   */
  @ApiModelProperty("用户ID")
  @TableField("user_id")
  private Long userId;

  /**
   * 收货人
   */
  @ApiModelProperty("收货人")
  @TableField("receiver")
  private String receiver;

  /**
   * 收货人电话
   */
  @ApiModelProperty("收货人电话")
  @TableField("tel")
  private String tel;

  /**
   * 省
   */
  @ApiModelProperty("省")
  @TableField("province")
  private String province;

  /**
   * 市
   */
  @ApiModelProperty("市")
  @TableField("city")
  private String city;

  /**
   * 区
   */
  @ApiModelProperty("区")
  @TableField("area")
  private String area;

  /**
   * 详细地址
   */
  @ApiModelProperty("详细地址")
  @TableField("address")
  private String address;

  /**
   * 总商品数
   */
  @ApiModelProperty("总商品数")
  @TableField("order_num")
  private Integer orderNum;

  /**
   * 支付金额
   */
  @ApiModelProperty("支付金额")
  @TableField("pay_amt")
  private Integer payAmt;

  /**
   * 运费
   */
  @ApiModelProperty("运费")
  @TableField("freight_amt")
  private Integer freightAmt;

  /**
   * 备注
   */
  @ApiModelProperty("备注")
  @TableField("memo")
  private String memo;


  @ApiModelProperty("订单来源:1提货订单,2现金购买")
  @TableField("resource")
  @JSONField(serialzeFeatures = SerializerFeature.WriteEnumUsingToString)
  private DeliverOrderResourceEnum resource;

  /**
   * 订单状态;-1 已取消 0:待付款 1:待发货 2:待收货 3:已完成
   */
  @ApiModelProperty("订单状态;-1 已取消 0:待付款 1:待发货 2:待收货 3:已完成 4:部分发货")
  @TableField("status")
  @JSONField(serialzeFeatures = SerializerFeature.WriteEnumUsingToString)
  private DeliverOrderStatusEnum status;

  @TableField("delivery_time")
  @ApiModelProperty("发货时间")
  private Date deliveryTime;

  @TableField("confirm_Time")
  @ApiModelProperty("确认收货时间")
  private Date confirmTime;

  @ApiModelProperty("支付时间")
  @TableField("pay_time")
  private Date payTime;

  /**
   * 创建时间
   */
  @ApiModelProperty("创建时间")
  @TableField("created_time")
  private Date createdTime;

  /**
   * 更新时间
   */
  @ApiModelProperty("更新时间")
  @TableField("updated_time")
  @Version
  private Date updatedTime;


}
