package com.game.business.domain;

import java.math.BigDecimal;
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.game.common.constant.finance.FinTranType3;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.game.common.annotation.Excel;
import com.game.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import lombok.Data;

/**
 * 主播分成比例对象 app_deal_scale
 *
 * @author game
 * @date 2024-08-11
 */
@ApiModel(value = "app_deal_scale", description = "主播分成比例")
@TableName(value= "app_deal_scale")
@Data
public class AppDealScale
        {
private static final long serialVersionUID=1L;

    /** $column.columnComment */
    @ApiModelProperty(value = "$column.columnComment")
    @TableId(value = "id" , type = IdType.AUTO)
    private Long id;

    /** 交易比例 */
    @ApiModelProperty(value = "交易比例")
    @Excel(name = "交易比例")
    @TableField(value = "deal_scale")
    private BigDecimal dealScale;

    /** 0默认 1修改 */
    @ApiModelProperty(value = "0默认 1修改")
    @Excel(name = "0默认 1修改")
    @TableField(value = "is_true")
    private Long isTrue;

    /** 方案id */
    @ApiModelProperty(value = "方案id")
    @Excel(name = "方案id")
    @TableField(value = "plan_id")
    private Long planId;

    /**  2级交易类型 FinTranType2 */
    @ApiModelProperty(value = " 2级交易类型 FinTranType2")
    @Excel(name = " 2级交易类型 FinTranType2")
    @TableField(value = "tran_type2")
    private Long tranType2;

    /**  3级交易类型 FinTranType3 */
    @ApiModelProperty(value = " 3级交易类型 FinTranType3")
    @Excel(name = " 3级交易类型 FinTranType3")
    @TableField(value = "tran_type3")
    private Long tranType3;

    /** 用户id */
    @ApiModelProperty(value = "用户id")
    @Excel(name = "用户id")
    @TableField(value = "uid")
    private Long uid;

    public void setFinTranType(FinTranType3 finTranType3) {
        tranType3 = Long.parseLong(String.valueOf(finTranType3.getCode()));
        tranType2 = Long.parseLong(String.valueOf(finTranType3.getTranType2().getType()));;
    }

}