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-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("CPTRADE_POSITIONAPPLY")
@ApiModel(value="CptradePositionapply对象", description="远期订单申请表")
public class CptradePositionapply extends Model<CptradePositionapply> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "转入记录ID(180+Unix秒时间戳(10位)+xxxxxx)")
    private Long applyid;

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

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

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

    @ApiModelProperty(value = "商品ID")
    @TableField("GOODSID")
    private Long goodsid;

    @ApiModelProperty(value = "仓单数量 = 交易合约手数*u*k*(r2/r1)")
    @TableField("WRQTY")
    private Long wrqty;

    @ApiModelProperty(value = "商品数量")
    @TableField("GOODSQTY")
    private Long goodsqty;

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

    @ApiModelProperty(value = "处理状态")
    @TableField("HANDLESTATUS")
    private Integer handlestatus;

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

    @ApiModelProperty(value = "申请备注")
    @TableField("APPLYREMARK")
    private String applyremark;

    @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 = "客户端流水号")
    @TableField("CLIENTTICKET")
    private String clientticket;

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

    @ApiModelProperty(value = "市场ID")
    @TableField("MARKETID")
    private Long marketid;


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

}
