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;
import java.util.List;

/**
 * <p>
 * 风险率类型表
 * </p>
 *
 * @author XKF
 * @since 2024-09-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("RISKRATIOTYPE")
@ApiModel(value="Riskratiotype对象", description="风险率类型表")
public class Riskratiotype extends Model<Riskratiotype> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "客户类别(机构/投资者客户类别枚举项值)")
    private Integer customertype;

    @ApiModelProperty(value = "适用交易用户类型 1:投资者/机构自营 2:机构做市")
    @TableField("RISKCONTROLMODE")
    private Integer riskcontrolmode;

    @ApiModelProperty(value = "类型名称")
    @TableField("RISKRATIONAME")
    private String riskrationame;

    @ApiModelProperty(value = "风险率计算方法 - 1:占用/净值")
    @TableField("RISKRATIOCALCMODE")
    private Integer riskratiocalcmode;

    @ApiModelProperty(value = "提示保证金风险率")
    @TableField("NOTEMARGINRISKRATIO")
    private BigDecimal notemarginriskratio;

    @ApiModelProperty(value = "追加保证金风险率")
    @TableField("ADDMARGINRISKRATIO")
    private BigDecimal addmarginriskratio;

    @ApiModelProperty(value = "恢复正常交易风险率(会员)")
    @TableField("RECOVERTRADERISKRATIO")
    private BigDecimal recovertraderiskratio;

    @ApiModelProperty(value = "斩仓恢复风险率(投资者用，会员转全部净头寸)")
    @TableField("CUTBACKRISKRATIO")
    private BigDecimal cutbackriskratio;

    @ApiModelProperty(value = "斩仓风险率")
    @TableField("CUTRISKRATIO")
    private BigDecimal cutriskratio;

    @ApiModelProperty(value = "斩仓市场顺序（按市场）")
    @TableField("CUTMARGINSEQ")
    private String cutmarginseq;

    @ApiModelProperty(value = "净值斩仓标志 - 0:不启用  1:启用(做市会员用)")
    @TableField("CUTTHRESHOLDFLAG")
    private Integer cutthresholdflag;

    @ApiModelProperty(value = "净值斩仓阈值(做市会员用)")
    @TableField("CUTTHRESHOLD")
    private BigDecimal cutthreshold;

    @ApiModelProperty(value = "是否默认(每个风控模式必有且只能设置一个默认) -  0:非默认  1：默认")
    @TableField("ISDEFAULT")
    private Integer isdefault;

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

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

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

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

    @ApiModelProperty(value = "到达追加风险率是否撤单(交易) - 0:不撤 1:撤单")
    @TableField("ISSENDCANCEL")
    private Integer issendcancel;

    @ApiModelProperty(value = "到达追加风险率是否撤单(交割) - 0:不撤 1:撤单")
    @TableField("ISSENDDELIVERYCANCEL")
    private Integer issenddeliverycancel;

    @ApiModelProperty(value = "提示安全度")
    @TableField("NOTESAFERATIO")
    private BigDecimal notesaferatio;

    @ApiModelProperty(value = "追加安全度")
    @TableField("ADDSAFERATIO")
    private BigDecimal addsaferatio;

    @ApiModelProperty(value = "恢复正常安全度(会员)")
    @TableField("RECOVERSAFERATIO")
    private BigDecimal recoversaferatio;

    @ApiModelProperty(value = "斩仓安全度")
    @TableField("CUTSAFERATIO")
    private BigDecimal cutsaferatio;

    @TableField(select = false)
    private String markets;
    @Override
    public Serializable pkVal() {
        return this.customertype;
    }

}
