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 2024-09-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("USERGROUPTRADECONFIG")
@KeySequence(value = "SEQ_USERGROUPTRADECONFIG")
@ApiModel(value="Usergrouptradeconfig对象", description="用户分组交易参数配置表 (个性化到用户分组或资金账号)")

public class Usergrouptradeconfig extends Model<Usergrouptradeconfig> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增ID")
    @TableId(value = "AUTOID", type = IdType.INPUT)
    private Long autoid;

    @ApiModelProperty(value = "用户分组ID(0的为会员默认设置)")
    @TableField("USERGROUPID")
    private Long usergroupid;

    @ApiModelProperty(value = "所属会员ID")
    @TableField("MEMBERUSERID")
    private Long memberuserid;

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

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

    @ApiModelProperty(value = "参数类型 -1.保证金类 2.交易规则 3.交易费用")
    @TableField("RULETYPE")
    private Integer ruletype;

    @ApiModelProperty(value = "个性化参数ID - 1. 参照交易模式规则费用对应-参考表 可个性化类型 2.保证金类保存交易所创建的投资者客户类别ID")
    @TableField("PARAMID")
    private Integer paramid;

    @ApiModelProperty(value = "费用算法 - 1：比率 2：固定")
    @TableField("FEEALGORITHM")
    private Integer feealgorithm;

    @ApiModelProperty(value = "参数值(保证金类此项为空)")
    @TableField("PARAMVALUE")
    private BigDecimal paramvalue;

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

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

    @TableField(select = false)
    private String goodsname;

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

}
