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("GOODSTRADEFEE")
@ApiModel(value="Goodstradefee对象", description="商品交易费用表")
public class Goodstradefee extends Model<Goodstradefee> {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(value = "交易费用ID - 101建仓(买)手续费 102平仓(卖)手续费 103买递延费(仓储费) 103卖递延费 104买交割手续费 105卖交割手续费")
    @TableId(value = "TRADEFEEID", type = IdType.AUTO)
    private Integer tradefeeid;

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

    @ApiModelProperty(value = "交易所费用值")
    @TableField("EXCHANGEVALUE")
    private BigDecimal exchangevalue;

    @ApiModelProperty(value = "会员费用默认值")
    @TableField("MEMBERDEFAULTVALUE")
    private BigDecimal memberdefaultvalue;

    @ApiModelProperty(value = "会员费用最小值")
    @TableField("MEMBERMINVALUE")
    private BigDecimal memberminvalue;

    @ApiModelProperty(value = "会员费用最大值")
    @TableField("MEMBERMAXVALUE")
    private BigDecimal membermaxvalue;

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

    @TableField(select = false)
    private String tradefeename;// 费用名称
    @TableField(select = false)
    private Integer ismandatory; // 是否必填
    @TableField(select = false)
    private Integer flag ; //1-是商品组的设置，2-商品的设置
    @Override
    public Serializable pkVal() {
        return this.tradefeeid;
    }

}
