2026-01-04 11:49:06 +08:00

155 lines
2.8 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.designhub.entity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 自动奖励规则实体
*/
@Data
@TableName("reward_rule")
public class RewardRule implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.AUTO)
private Long id;
/**
* 规则名称
*/
private String name;
/**
* 规则描述
*/
private String description;
/**
* 规则类型:daily-每日奖励, weekly-每周奖励, monthly-每月奖励, task-任务奖励, rating-好评奖励
*/
private String ruleType;
/**
* 触发条件(JSON对象)
* 例如:{"type":"task_count","operator":">=","value":10}
*/
private String triggerCondition;
/**
* 奖励类型:score-积分, badge-徽章, both-两者
*/
private String rewardType;
/**
* 奖励积分数
*/
private Integer rewardScore;
/**
* 奖励徽章(JSON对象)
*/
private String rewardBadge;
/**
* 适用范围:all-全员, designer-设计师, department-指定部门
*/
private String scope;
/**
* 指定部门ID列表(JSON数组)
*/
private String scopeDeptIds;
/**
* 是否启用:0-禁用,1-启用
*/
private Integer enabled;
/**
* 执行周期(cron 表达式,仅周期性奖励使用)
*/
private String cronExpression;
/**
* 上次执行时间
*/
private LocalDateTime lastExecuteTime;
/**
* 优先级(数值越大优先级越高)
*/
private Integer priority;
/**
* 触发次数
*/
private Integer triggerCount;
/**
* 奖励经验值
*/
private Integer rewardExp;
/**
* 奖励称号
*/
private String rewardTitle;
/**
* 奖励特权JSON
*/
private String rewardPrivilege;
/**
* 每用户最大获得次数(0=无限)
*/
private Integer maxTimesPerUser;
/**
* 总预算积分(0=无限)
*/
private Integer totalBudget;
/**
* 已使用预算
*/
private Integer usedBudget;
/**
* 生效开始时间
*/
private LocalDateTime startTime;
/**
* 生效结束时间
*/
private LocalDateTime endTime;
/**
* 是否删除:0-否,1-是
*/
@TableLogic
private Integer deleted;
/**
* 创建人ID
*/
private Long creatorId;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateTime;
}