| | |
| | | package com.ruoyi.study.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | 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> |
| | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | @TableId(value = "id", type = IdType.NONE) |
| | | private Long 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(); |
| | | } |
| | | } |