无关风月
2024-07-10 6b96492c540e24cc29d55573c5816df808279825
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
package com.ruoyi.study.domain;
 
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.web.domain.BaseModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
 
import java.util.Date;
 
/**
 * <p>
 * 用户积分明细
 * </p>
 *
 * @author 无关风月
 * @since 2024-04-26
 */
@Data
@TableName("t_integral_record")
public class TIntegralRecord extends BaseModel {
 
    private static final long serialVersionUID = 1L;
 
    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.NONE)
    private Long id;
    /**
     * 积分数量 带有负号为减少
     */
    @ApiModelProperty(value = "积分数量 带有负号为减少")
    private String integral;
    /**
     * 方式:完成题目 完成游戏 每日学习时长 商城消费
     */
    @ApiModelProperty(value = "方式:完成题目 完成游戏 每日学习时长 商城消费")
    private String method;
 
    /**
     * 用户id
     */
    private Integer userId;
 
    /**
     * 游戏id
     */
    @ApiModelProperty("游戏id 对应t_game")
    private Integer gameId;
 
    /**
     * 游戏难度
     */
    @ApiModelProperty("游戏难度")
    private Integer gameDifficulty;
 
    /**
     * 故事id
     */
    @ApiModelProperty("故事id 对应t_story_listen")
    private Integer storyId;
 
    /**
     * 故事id
     */
    @ApiModelProperty("故事类型(0:看图配音;1:框架记忆)")
    private Integer storyType;
 
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "积分变动时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @TableField(value = "createTime", fill = FieldFill.INSERT)
    private Date createTime;
 
 
    /**
     * 前端用,返回积分变动类型
     *
     * @return 变动类型中文字符串
     */
    public String getType() {
        return integral.startsWith("-") ? "减少" : "增加";
    }
 
    public Date getTime() {
        return super.getCreateTime();
    }
}