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>
 * 仓单持有记录表 - 导历史
账户服务结算时导历史，当前表 qty=0, freezeqty=0的记录删除
 * </p>
 *
 * @author XKF
 * @since 2024-12-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("WRHOLDLB")
@ApiModel(value="Wrholdlb对象", description="仓单持有记录表 - 导历史 账户服务结算时导历史，当前表 qty=0, freezeqty=0的记录删除")
public class Wrholdlb extends Model<Wrholdlb> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "提单ID(208+Unix秒时间戳(10位)+xxxxxx)")
      @TableId(value = "LADINGBILLID", type = IdType.AUTO)
    private Long ladingbillid;

    @ApiModelProperty(value = "提单子单号")
    @TableField("SUBNUM")
    private Long subnum;

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

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

    @ApiModelProperty(value = "数量")
    @TableField("QTY")
    private Long qty;

    @ApiModelProperty(value = "冻结数量")
    @TableField("FREEZERQTY")
    private Long freezerqty;

    @ApiModelProperty(value = "持有人ID")
    @TableField("USERID")
    private Long userid;

    @ApiModelProperty(value = "持有人帐户ID")
    @TableField("ACCOUNTID")
    private Long accountid;

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

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

    @ApiModelProperty(value = "仓单变更ID")
    @TableField("WRID")
    private Long wrid;

    @ApiModelProperty(value = "拆分父子单号")
    @TableField("PARENTSUBNUM")
    private Long parentsubnum;


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

}
