add: 目标crud

This commit is contained in:
kkunkka
2025-10-10 11:40:34 +08:00
parent 9e20d0f5f8
commit f86462bb24
8 changed files with 139 additions and 5 deletions

View File

@@ -1,15 +1,16 @@
package com.dota.nexus.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import java.time.LocalDateTime;
@Data
public class Entity {
@TableId(type = IdType.AUTO)
Integer id;
Integer status;
LocalDateTime createTime;
LocalDateTime updateTime;

View File

@@ -6,6 +6,8 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class Goal extends Entity {
private GoalEnum status;
private String name;
private String tag;

View File

@@ -0,0 +1,16 @@
package com.dota.nexus.entity;
import lombok.Getter;
@Getter
public enum GoalEnum {
DOING("进行中"),
DONE("完成"),
CANCEL("已取消");
private final String value;
GoalEnum(String value) {
this.value = value;
}
}

View File

@@ -0,0 +1,22 @@
package com.dota.nexus.entity;
import lombok.Data;
@Data
public class R {
private Integer code;
private String msg;
private Object data;
public static R ok() {
return ok(null);
}
public static R ok(Object data) {
var r = new R();
r.setCode(200);
r.setMsg("ok");
r.setData(data);
return r;
}
}