فهرست منبع

feat(doa): 新增DoaStage/DoaGoal/DoaWeek实体与Mapper

Sisyphus 1 هفته پیش
والد
کامیت
df81a0e25c

+ 31 - 0
cfc-backend/src/main/java/com/etotem/cfc/entity/DoaGoal.java

@@ -0,0 +1,31 @@
+package com.etotem.cfc.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@TableName("doa_goal")
+public class DoaGoal implements Serializable {
+
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    private Long stageId;
+
+    private String domain;
+
+    private String content;
+
+    private String status;
+
+    private Integer sortOrder;
+
+    private Date createdAt;
+
+    private Date updatedAt;
+}

+ 60 - 0
cfc-backend/src/main/java/com/etotem/cfc/entity/DoaStage.java

@@ -0,0 +1,60 @@
+package com.etotem.cfc.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;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+@Data
+@TableName("doa_stage")
+public class DoaStage implements Serializable {
+
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    private Long familyId;
+
+    private Long memberId;
+
+    private String title;
+
+    private Date startDate;
+
+    private Date endDate;
+
+    private Integer durationWeeks;
+
+    private String status;
+
+    private Long createdBy;
+
+    private Date createdAt;
+
+    private Date updatedAt;
+
+    /** 非表字段:目标列表 */
+    @TableField(exist = false)
+    private List<DoaGoal> goals;
+
+    /** 非表字段:周记录列表 */
+    @TableField(exist = false)
+    private List<DoaWeek> weeks;
+
+    /** 非表字段:目标成员昵称 */
+    @TableField(exist = false)
+    private String memberNickname;
+
+    /** 非表字段:已完成周数(复盘过的周) */
+    @TableField(exist = false)
+    private Integer reviewedWeeks;
+
+    /** 非表字段:周总数 */
+    @TableField(exist = false)
+    private Integer totalWeeks;
+}

+ 43 - 0
cfc-backend/src/main/java/com/etotem/cfc/entity/DoaWeek.java

@@ -0,0 +1,43 @@
+package com.etotem.cfc.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@TableName("doa_week")
+public class DoaWeek implements Serializable {
+
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    private Long stageId;
+
+    private Integer weekNo;
+
+    private Date weekStart;
+
+    private Date weekEnd;
+
+    private String plan;
+
+    private String achieved;
+
+    private String experience;
+
+    private String worked;
+
+    private String improve;
+
+    private String nextChallenge;
+
+    private String status;
+
+    private Date createdAt;
+
+    private Date updatedAt;
+}

+ 7 - 0
cfc-backend/src/main/java/com/etotem/cfc/mapper/DoaGoalMapper.java

@@ -0,0 +1,7 @@
+package com.etotem.cfc.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.etotem.cfc.entity.DoaGoal;
+
+public interface DoaGoalMapper extends BaseMapper<DoaGoal> {
+}

+ 7 - 0
cfc-backend/src/main/java/com/etotem/cfc/mapper/DoaStageMapper.java

@@ -0,0 +1,7 @@
+package com.etotem.cfc.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.etotem.cfc.entity.DoaStage;
+
+public interface DoaStageMapper extends BaseMapper<DoaStage> {
+}

+ 7 - 0
cfc-backend/src/main/java/com/etotem/cfc/mapper/DoaWeekMapper.java

@@ -0,0 +1,7 @@
+package com.etotem.cfc.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.etotem.cfc.entity.DoaWeek;
+
+public interface DoaWeekMapper extends BaseMapper<DoaWeek> {
+}