package com.qs.mp.channel.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.ChannelOrderStatusEnum;
import java.io.Serializable;
import java.util.Date;

import com.qs.mp.common.enums.ChannelOrderTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @describe 经销商盲票采购订单实体类
 * @auther quanshu
 * @create 2022-03-02 12:22:24
 */
@TableName("mp_channel_order")
@Data
@ApiModel("经销商盲票采购订单实体类")
public class ChannelOrder implements Serializable {

  private static final long serialVersionUID = 1L;

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

  /**
   * 渠道ID
   */
  @TableField("channel_id")
  @ApiModelProperty("渠道id")
  private Long channelId;

  /**
   * 标题
   */
  @TableField("title")
  @ApiModelProperty("标题")
  private String title;

  /**
   * 订单金额
   */
  @TableField("order_amt")
  @ApiModelProperty("订单金额")
  private Integer orderAmt;

  /**
   * 优惠金额
   */
  @TableField("discount_amt")
  @ApiModelProperty("优惠金额")
  private Integer discountAmt;

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

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

  @ApiModelProperty("订单类型1普通票,2线下预购票,3线上预付票")
  @TableField("type")
  @JSONField(serialzeFeatures = SerializerFeature.WriteEnumUsingToString)
  private ChannelOrderTypeEnum type;

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

  /**
   * 盲票总包数
   */
  @TableField("pkg_num")
  @ApiModelProperty("盲票总包数")
  private Integer pkgNum;

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

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

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

  /**
   * 收货地址-省
   */
  @TableField("province")
  @ApiModelProperty("收货地址-省")
  private String province;

  /**
   * 收货地址-市
   */
  @TableField("city")
  @ApiModelProperty("收货地址-市")
  private String city;

  /**
   * 收货地址-区
   */
  @TableField("area")
  @ApiModelProperty("收货地址-区")
  private String area;

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

  /**
   * 物流ID
   */
  @TableField("delivery_id")
  @ApiModelProperty("物流ID")
  private Long deliveryId;

  /**
   * 物流单号
   */
  @TableField("delivery_flow_id")
  @ApiModelProperty("物流单号")
  private String deliveryFlowId;
  
  /**
   * 发货时间
   */
  @TableField("delivery_time")
  @ApiModelProperty("发货时间")
  private Date deliveryTime;

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

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

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

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


}
