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;

/**
 * <p>
 * 用户合约数据表 - 导历史
 * </p>
 *
 * @author XKF
 * @since 2025-06-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("CPTRADE_USERGOODSDATA")
@ApiModel(value="CptradeUsergoodsdata对象", description="用户合约数据表 - 导历史")
public class CptradeUsergoodsdata extends Model<CptradeUsergoodsdata> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "账户ID")
    @TableId(value = "ACCOUNTID")
    private Long accountid;

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

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

    @ApiModelProperty(value = "用户ID")
    @TableField("USERID")
    private Long userid;

    @ApiModelProperty(value = "转入量")
    @TableField("INQTY")
    private Long inqty;

    @ApiModelProperty(value = "注销量")
    @TableField("CANCELQTY")
    private Long cancelqty;

    @ApiModelProperty(value = "交割量")
    @TableField("DELIVERYQTY")
    private Long deliveryqty;

    @ApiModelProperty(value = "当前预售量")
    @TableField("CURPRESALEQTY")
    private Long curpresaleqty;

    @ApiModelProperty(value = "已预售量")
    @TableField("PRESALEDQTY")
    private Long presaledqty;

    @ApiModelProperty(value = "已预售总金额")
    @TableField("PRESALEDAMOUNT")
    private BigDecimal presaledamount;

    @ApiModelProperty(value = "冻结金额")
    @TableField("FREEZEAMOUNT")
    private BigDecimal freezeamount;

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

    @ApiModelProperty(value = "是否有现货冻结 - 0:否 1:有")
    @TableField("HASSPOTFREEZE")
    private Integer hasspotfreeze;


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

}
