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-09-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("GOODSMARGINCONFIG")
@ApiModel(value="Goodsmarginconfig对象", description="商品保证金配置表")
public class Goodsmarginconfig extends Model<Goodsmarginconfig> {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(value = "投资者客户类别(枚举项的值)")
    @TableField("CUSTOMERTYPEID")
    private Integer customertypeid;

    @ApiModelProperty(value = "保证金计算方式 - 1:比率 2.固定")
    @TableField("MARGINALGORITHM")
    private Integer marginalgorithm;

    @ApiModelProperty(value = "即市保证金值")
    @TableField("MARKETMARGINVALUE")
    private BigDecimal marketmarginvalue;

    @ApiModelProperty(value = "结算保证金值")
    @TableField("RECKONMARGINVALUE")
    private BigDecimal reckonmarginvalue;

    @ApiModelProperty(value = "锁仓保证金")
    @TableField("LOCKMARGINVALUE")
    private BigDecimal lockmarginvalue;

    @ApiModelProperty(value = "是否默认 - 0:非默认  1：默认")
    @TableField("ISDEFAULT")
    private Integer isdefault;

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

    @ApiModelProperty(value = "实付保证金值[做市收益权市场“是否交易授信” = 1 ]")
    @TableField("REALMARGINVALUE")
    private BigDecimal realmarginvalue;

    @ApiModelProperty(value = "实付保证金计算方式 - 1:比率 2.固定")
    @TableField("REALMARGINALGORITHM")
    private Integer realmarginalgorithm;


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

}
