package com.muchinfo.mtp3pojos.entity;

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.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

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

/**
 * <p>
 * 仓单出入库申请表
 * </p>
 *
 * @author XKF
 * @since 2024-11-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("WROUTINAPPLY")
@ApiModel(value="Wroutinapply对象", description="仓单出入库申请表")
public class Wroutinapply extends Model<Wroutinapply> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "申请ID(610+Unix秒时间戳(10位)+xxxxxx)")
    private Long applyid;

    @ApiModelProperty(value = "申请类型 - 1:预约入库 2:预约出库 3:入库注册 4:出库注销")
    @TableField("APPLYTYPE")
    private Integer applytype;

    @ApiModelProperty(value = "现货商品ID")
    @TableField("WRSTANDARDID")
    private Long wrstandardid;

    @ApiModelProperty(value = "现货商品代码")
    @TableField("WRSTANDARDCODE")
    private String wrstandardcode;

    @ApiModelProperty(value = "品种ID")
    @TableField("DELIVERYGOODSID")
    private Long deliverygoodsid;

    @ApiModelProperty(value = "仓库ID")
    @TableField("WAREHOUSEID")
    private Long warehouseid;

    @ApiModelProperty(value = "申请人ID")
    @TableField("USERID")
    private Long userid;

    @ApiModelProperty(value = "申请人账户ID")
    @TableField("ACCOUNTID")
    private Long accountid;

    @ApiModelProperty(value = "申请人手机号")
    @TableField("MOBILE")
    private String mobile;

    @ApiModelProperty(value = "预约日期")
    @TableField("APPOINTMENTDATE")
    private Date appointmentdate;

    @ApiModelProperty(value = "预约方式 - 1:物流 2:自送 3:自提")
    @TableField("APPOINTMENTMODEL")
    private Integer appointmentmodel;

    @ApiModelProperty(value = "国家[1:物流]")
    @TableField("COUNTRYID")
    private Long countryid;

    @ApiModelProperty(value = "省[1:物流]")
    @TableField("PROVINCEID")
    private Long provinceid;

    @ApiModelProperty(value = "区[1:物流]")
    @TableField("DISTRICTID")
    private Long districtid;

    @ApiModelProperty(value = "市[1:物流]")
    @TableField("CITYID")
    private Long cityid;

    @ApiModelProperty(value = "详细地址[1:物流]")
    @TableField("ADDRESS")
    private String address;

    @ApiModelProperty(value = "收货人提货人")
    @TableField("CONTACTNAME")
    private String contactname;

    @ApiModelProperty(value = "收货人提货人手机")
    @TableField("CONTACTNUM")
    private String contactnum;

    @ApiModelProperty(value = "预约备注")
    @TableField("APPOINTMENTREMARK")
    private String appointmentremark;

    @ApiModelProperty(value = "申请状态 - 1:待初审 2:初审通过 3:初审拒绝 4:初审失败 5复审通过 6:复审拒绝 7:复审失败 8:已撤销")
    @TableField("APPLYSTATUS")
    private Integer applystatus;

    @ApiModelProperty(value = "申请时间")
    @TableField("APPLYTIME")
    private Date applytime;

    @ApiModelProperty(value = "创建人")
    @TableField("CREATORID")
    private Long creatorid;

    @ApiModelProperty(value = "创建时间")
    @TableField("CREATETIME")
    private Date createtime;

    @ApiModelProperty(value = "初审人")
    @TableField("FIRSTAUDITID")
    private Long firstauditid;

    @ApiModelProperty(value = "初审时间")
    @TableField("FIRSTAUDITTIME")
    private Date firstaudittime;

    @ApiModelProperty(value = "初审备注")
    @TableField("FIRSTREMARK")
    private String firstremark;

    @ApiModelProperty(value = "复审人")
    @TableField("SECONDAUDITID")
    private Long secondauditid;

    @ApiModelProperty(value = "复审时间")
    @TableField("SECONDAUDITTIME")
    private Date secondaudittime;

    @ApiModelProperty(value = "复审备注")
    @TableField("SECONDREMARK")
    private String secondremark;

    @ApiModelProperty(value = "注册注销状态(枚举WROutInApplyStatus2) - 0:预约成功 1:待初审 2:初审通过 3:初审拒绝 4:初审失败 5复审通过 6:复审拒绝 7:复审失败 8:已撤销")
    @TableField("APPLYSTATUS2")
    private Integer applystatus2;

    @ApiModelProperty(value = "注册注销初审人")
    @TableField("FIRSTAUDITID2")
    private Long firstauditid2;

    @ApiModelProperty(value = "注册注销初审时间")
    @TableField("FIRSTAUDITTIME2")
    private Date firstaudittime2;

    @ApiModelProperty(value = "注册注销初审备注")
    @TableField("FIRSTREMARK2")
    private String firstremark2;

    @ApiModelProperty(value = "注册注销复审人")
    @TableField("SECONDAUDITID2")
    private Long secondauditid2;

    @ApiModelProperty(value = "注册注销复审时间")
    @TableField("SECONDAUDITTIME2")
    private Date secondaudittime2;

    @ApiModelProperty(value = "注册注销复审备注")
    @TableField("SECONDREMARK2")
    private String secondremark2;

    @ApiModelProperty(value = "交易日(yyyyMMdd)")
    @TableField("TRADEDATE")
    private String tradedate;

    @ApiModelProperty(value = "出入库预约数量 ")
    @TableField("INQTY")
    private Long inqty;

    @ApiModelProperty(value = "注册注销实际数量")
    @TableField("INREALQTY")
    private Long inrealqty;

    @ApiModelProperty(value = "注册入库真实数量 [1:入库] - 作废")
    @TableField("INREALQTY2")
    private BigDecimal inrealqty2;

    @ApiModelProperty(value = "客户端流水号")
    @TableField("CLIENTTICKET")
    private String clientticket;

    @ApiModelProperty(value = "仓单要素类型ID [入库]")
    @TableField("WRFACTORTYPEID")
    private Long wrfactortypeid;


    @Override
    public Serializable pkVal() {
        return this.applyid;
    }

}
