package com.sqx.modules.discSpinning.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 现金红包 抽奖配置(DiscSpinningAmount)表实体类
 *
 * @author ww
 * @since 2024-12-13 15:04:07
 */
@Data
@TableName("disc_spinning_amount")
@ApiModel(value = "现金红包 抽奖配置 实体类")
public class DiscSpinningAmount extends Model<DiscSpinningAmount> {
    @ApiModelProperty("主键id")
    private Long id;
    @ApiModelProperty("从第几次开始变化")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Integer num;
    @ApiModelProperty("描述")
    private String name;
    @ApiModelProperty("0-1 小于 多少为该奖励")
    private Double random;
    @ApiModelProperty("最大金额")
    private Double maxAmount;
    @ApiModelProperty("是否启动 0否1是")
    private Integer status;

    public void setNum(Integer num) {
        if (num != null && num.equals(0)) {
            this.num = null;
        } else {
            this.num = num;
        }
    }
}

