- 迁移:study_expectations.session_num 改为 varchar 对齐会话编码
- StudyExpectationsEntity / Mapper / Service:每会话一条预期,重复创建覆盖
- StudySessionController:PUT/GET /{sessionNum}/expectation
- 移除空的 studySessionList 占位方法
33 lines
865 B
Java
33 lines
865 B
Java
package com.guo.learningprogresstracker.entity;
|
|
|
|
import com.baomidou.mybatisplus.annotation.IdType;
|
|
import com.baomidou.mybatisplus.annotation.TableField;
|
|
import com.baomidou.mybatisplus.annotation.TableId;
|
|
import com.baomidou.mybatisplus.annotation.TableName;
|
|
import lombok.Data;
|
|
|
|
import java.io.Serializable;
|
|
|
|
/**
|
|
* 存储每次学习开始前的预期
|
|
*/
|
|
@TableName(value = "study_expectations")
|
|
@Data
|
|
public class StudyExpectationsEntity extends BaseEntity implements Serializable {
|
|
|
|
@TableId(value = "expectation_id", type = IdType.AUTO)
|
|
private Integer expectationId;
|
|
|
|
@TableField(value = "session_num")
|
|
private String sessionNum;
|
|
|
|
/**
|
|
* 学习预期的详细描述
|
|
*/
|
|
@TableField(value = "description")
|
|
private String description;
|
|
|
|
@TableField(exist = false)
|
|
private static final long serialVersionUID = 1L;
|
|
}
|