package com.muchinfo.mtp3pojos.entity;

import com.baomidou.mybatisplus.annotation.*;
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 2025-09-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ERMS_MIDDLEGOODS")
@ApiModel(value="ErmsMiddlegoods对象", description="套保品种表")
@KeySequence(value = "SEQ_ERMS_MIDDLEGOODS")
public class ErmsMiddlegoods extends Model<ErmsMiddlegoods> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "套保品种ID(SEQ_ERMS_MIDDLEGOODS)")
    @TableId(value = "CONFIGID", type = IdType.INPUT)
    private Long middlegoodsid;

    @ApiModelProperty(value = "套保品种名称")
    @TableField("MIDDLEGOODSNAME")
    private String middlegoodsname;

    @ApiModelProperty(value = "套保品种代码")
    @TableField("MIDDLEGOODSCODE")
    private String middlegoodscode;

    @ApiModelProperty(value = "套保品种单位ID")
    @TableField("GOODSUNITID")
    private Integer goodsunitid;

    @ApiModelProperty(value = "关联交易商品ID")
    @TableField("RELATEDGOODSID")
    private Long relatedgoodsid;

    @ApiModelProperty(value = "估价系数")
    @TableField("EVALUATERATIO")
    private BigDecimal evaluateratio;

    @ApiModelProperty(value = "是否有效 - 0:无效 1:有效")
    @TableField("ISVALID")
    private Integer isvalid;

    @ApiModelProperty(value = "数量小数位")
    @TableField("QTYDECIMALPLACE")
    private Integer qtydecimalplace;

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

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

    @ApiModelProperty(value = "修改人")
    @TableField("MODIFIERID")
    private Long modifierid;

    @ApiModelProperty(value = "修改时间")
    @TableField("MODIFYTIME")
    private Date modifytime;

    @ApiModelProperty(value = "关联商品类型 - 1:期货合约 2:现货品种")
    @TableField("RELATEDGOODSTYPE")
    private Integer relatedgoodstype;

    @ApiModelProperty(value = "套保比率")
    @TableField("NEEDHEDGERATIO")
    private BigDecimal needhedgeratio;

    @ApiModelProperty(value = "机构用户ID")
    @TableField("AREAUSERID")
    private Long areauserid;

    @ApiModelProperty(value = "关联期货品种ID")
    @TableField("GOODSGROUPID")
    private Long goodsgroupid;

    @ApiModelProperty(value = "备注")
    @TableField("REMARK")
    private String remark;

    @ApiModelProperty(value = "套利比率")
    @TableField("NEEDARBITRAGERATIO")
    private BigDecimal needarbitrageratio;

    @ApiModelProperty(value = "现货暂定价")
    @TableField("SPOTTMPPRICE")
    private BigDecimal spottmpprice;

    @ApiModelProperty(value = "期货暂定价")
    @TableField("FUTURETMPPRICE")
    private BigDecimal futuretmpprice;

    @ApiModelProperty(value = "净敞口告警值")
    @TableField("NETEXPOSUREALARMVALUE")
    private BigDecimal netexposurealarmvalue;


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

}
