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;

/**
 * <p>
 * 市场交易参数配置表 - 现货类
 * </p>
 *
 * @author XKF
 * @since 2025-08-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("MARKETTRADECONFIG")
@ApiModel(value="Markettradeconfig对象", description="市场交易参数配置表 - 现货类")
public class Markettradeconfig extends Model<Markettradeconfig> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "市场ID-仓单贸易、竞拍、预售")
    private Long marketid;

    @ApiModelProperty(value = "买方保证金方式 - 1：比率  2：固定")
    @TableField("BUYMARGINALGORITHM")
    private Integer buymarginalgorithm;

    @ApiModelProperty(value = "买方保证金设置值")
    @TableField("BUYMARGINVALUE")
    private BigDecimal buymarginvalue;

    @ApiModelProperty(value = "卖方保证金方式 - 1：比率  2：固定")
    @TableField("SELLMARGINALGORITHM")
    private Integer sellmarginalgorithm;

    @ApiModelProperty(value = "卖方保证金设置值")
    @TableField("SELLMARGINVALUE")
    private BigDecimal sellmarginvalue;

    @ApiModelProperty(value = "卖方保证金设置值(无仓单)")
    @TableField("SELLMARGINVALUE2")
    private BigDecimal sellmarginvalue2;

    @ApiModelProperty(value = "买方手续费收取方式 1：比率  2：固定")
    @TableField("BUYCHARGEALGORITHM")
    private Integer buychargealgorithm;

    @ApiModelProperty(value = "买方手续费设置值(交易所部分)")
    @TableField("BUYCHARGEALGORITHMVALUE")
    private BigDecimal buychargealgorithmvalue;

    @ApiModelProperty(value = "买方手续费设置值(会员部分)")
    @TableField("BUYCHARGEALGORITHMVALUE2")
    private BigDecimal buychargealgorithmvalue2;

    @ApiModelProperty(value = "卖方手续费收取方式  1：比率  2：固定")
    @TableField("SELLCHARGEALGORITHM")
    private Integer sellchargealgorithm;

    @ApiModelProperty(value = "卖方手续费设置值(交易所部分)")
    @TableField("SELLCHARGEALGORITHMVALUE")
    private BigDecimal sellchargealgorithmvalue;

    @ApiModelProperty(value = "卖方手续费设置值(会员部分)")
    @TableField("SELLCHARGEALGORITHMVALUE2")
    private BigDecimal sellchargealgorithmvalue2;

    @ApiModelProperty(value = "流拍手续费收取方式  1：比率  2：固定")
    @TableField("FAILEDCHARGEALGORITHM")
    private Integer failedchargealgorithm;

    @ApiModelProperty(value = "流拍手续费设置值")
    @TableField("FAILEDCHARGEVALUE")
    private BigDecimal failedchargevalue;

    @ApiModelProperty(value = "流拍卖方手续费设置值")
    @TableField("FAILEDCHARGEVALUE2")
    private BigDecimal failedchargevalue2;

    @ApiModelProperty(value = "买方出价保证金方式 - 1：比率  2：固定 - [竞拍]")
    @TableField("BUYFIRSTMARGINALGORITHM")
    private Integer buyfirstmarginalgorithm;

    @ApiModelProperty(value = "买方出价保证金设置值 - [竞拍]")
    @TableField("BUYFIRSTMARGINVALUE")
    private BigDecimal buyfirstmarginvalue;

    @ApiModelProperty(value = "交货模式 - 1:履约计划 2:分步履约 3:分步提货[文昌]")
    @TableField("PERFORMANCEWAY")
    private Integer performanceway;

    @ApiModelProperty(value = "履约计划模板ID(有仓单) - 根据交货模式: 1:履约 - 履约计划模板 2:分步履约 - 履约计划模板 3:分步提货 - 履约方式： 立即执行(-1)")
    @TableField("PERFORMANCETEMPID")
    private Long performancetempid;

    @ApiModelProperty(value = "履约计划模板ID(无仓单) - 根据交货模式: 1:履约 - 履约计划模板 2:分步履约 - 履约计划模板 3:分步提货 - 履约方式： 立即执行")
    @TableField("PERFORMANCETEMPID2")
    private Long performancetempid2;

    @ApiModelProperty(value = "买方释放比率[2:分步履约]")
    @TableField("BUYRELEASERATIO")
    private BigDecimal buyreleaseratio;

    @ApiModelProperty(value = "卖方释放比率[2:分步履约]")
    @TableField("SELLRELEASERATIO")
    private BigDecimal sellreleaseratio;

    @ApiModelProperty(value = "执行方式[2:分步履约] - 1:顺序执行 2:交叉执行")
    @TableField("EXECUTEMODE")
    private Integer executemode;

    @ApiModelProperty(value = "执行方[2:分步履约] - 1:买方 2:卖方")
    @TableField("EXECUTESIDE")
    private Integer executeside;

    @ApiModelProperty(value = "最小执行量[2:分步履约]")
    @TableField("MINQTY")
    private Integer minqty;

    @ApiModelProperty(value = "合同期限[2:分步履约]")
    @TableField("HOLDDAYS")
    private Integer holddays;

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

    @ApiModelProperty(value = "更新时间")
    @TableField("UPDATETIME")
    private Date updatetime;

    @ApiModelProperty(value = "回购买方手续费收取方式 1：比率  2：固定 --77:现货商城")
    @TableField("BUYCHARGEALGORITHM2")
    private Integer buychargealgorithm2;

    @ApiModelProperty(value = "回购买方手续费设置值(交易所部分) --77:现货商城")
    @TableField("BUYCHARGEALGORITHMVALUE3")
    private BigDecimal buychargealgorithmvalue3;

    @ApiModelProperty(value = "回购买方手续费设置值(会员部分) --77:现货商城")
    @TableField("BUYCHARGEALGORITHMVALUE4")
    private BigDecimal buychargealgorithmvalue4;

    @ApiModelProperty(value = "回购卖方手续费收取方式  1：比率  2：固定 --77:现货商城")
    @TableField("SELLCHARGEALGORITHM2")
    private Integer sellchargealgorithm2;

    @ApiModelProperty(value = "回购卖方手续费设置值(交易所部分) --77:现货商城")
    @TableField("SELLCHARGEALGORITHMVALUE3")
    private BigDecimal sellchargealgorithmvalue3;

    @ApiModelProperty(value = "回购卖方手续费设置值(会员部分) --77:现货商城")
    @TableField("SELLCHARGEALGORITHMVALUE4")
    private BigDecimal sellchargealgorithmvalue4;

    @ApiModelProperty(value = "浮动价基差上限比率(仓单贸易)")
    @TableField("BASISUPRATIO")
    private BigDecimal basisupratio;

    @ApiModelProperty(value = "浮动价基差下限比率(仓单贸易)")
    @TableField("BASISDOWNRATIO")
    private BigDecimal basisdownratio;

    @ApiModelProperty(value = "是否校验无仓单额度(仓单贸易) - 0:否 1:是")
    @TableField("NOWRQUOTAFLAG")
    private Integer nowrquotaflag;

    @ApiModelProperty(value = "挂牌方式 - 1:一口价 2:浮动价 3:贸易圈 4:协议指定")
    @TableField("LISTINGMODE")
    private Integer listingmode;

    @ApiModelProperty(value = "履约计划模板IDs(有仓单)- 根据交货模式, 多个逗号分隔: 1:履约 - 履约计划模板 2:分步履约 - 履约计划模板 3:分步提货 - 履约方式： 立即执行(-1)")
    @TableField("PERFORMANCETEMPIDS")
    private String performancetempids;

    @ApiModelProperty(value = "履约计划模板IDs(无仓单) - 根据交货模式, 多个逗号分隔: 1:履约 - 履约计划模板 2:分步履约 - 履约计划模板 3:分步提货 - 履约方式： 立即执行")
    @TableField("PERFORMANCETEMPID2S")
    private String performancetempid2s;


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

}
