refactor: 目标,任务,习惯都放一张表中
This commit is contained in:
@@ -6,7 +6,9 @@ import lombok.EqualsAndHashCode;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class Goal extends Entity {
|
||||
private GoalEnum status;
|
||||
private GoalStatusEnum status;
|
||||
|
||||
private GoalTypeEnum type;
|
||||
|
||||
private String name;
|
||||
|
||||
|
||||
@@ -3,14 +3,14 @@ package com.dota.nexus.entity;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum GoalEnum {
|
||||
public enum GoalStatusEnum {
|
||||
DOING("进行中"),
|
||||
DONE("完成"),
|
||||
CANCEL("已取消");
|
||||
|
||||
private final String value;
|
||||
|
||||
GoalEnum(String value) {
|
||||
GoalStatusEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
13
src/main/java/com/dota/nexus/entity/GoalTypeEnum.java
Normal file
13
src/main/java/com/dota/nexus/entity/GoalTypeEnum.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package com.dota.nexus.entity;
|
||||
|
||||
public enum GoalTypeEnum {
|
||||
GOAL("目标"),
|
||||
TASK("任务"),
|
||||
HABIT("习惯");
|
||||
|
||||
private String value;
|
||||
|
||||
GoalTypeEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user