package cn.pluss.platform.entity;

import com.baomidou.mybatisplus.annotation.*;
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 bzg
 * @since 2022-02-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_pluss_reward_config")
public class RewardConfig implements Serializable {

    private static final long serialVersionUID = 1L;

    public static final String DEFAULT_TYPE = "areaPartner";

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;


    /**
     * 奖励名称
     */
    @TableField("name")
    private String name;


    /**
     * 所属角色
     */
    @TableField("roleCode")
    private String roleCode;


    /**
     * 奖励类型
     */
    @TableField("type")
    private String type;


    /**
     * 比例
     */
    @TableField("scale")
    private BigDecimal scale;


    /**
     * 创建时间
     */
    @TableField(value = "createTime", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 创建时间 开始时间
     */
    @TableField(exist = false, condition = "createTime &gt; #{%s}")
    private Date createTimeStart;

    /**
     * 创建时间 截止时间
     */
    @TableField(exist = false, condition = "createTime &lt; #{%s}")
    private Date createTimeEnd;

}