feat: 🗓️ 新增任务块排期能力并完善课程与日程模型

Version: 0.1.1.dev.260207

- 新增并测试通过将任务块排进日程接口 
- 批量导入课程接口增加单双周功能,支持只在单双周上课的课程 📚
- 任务块时间定位逻辑调整为「第几周-周几」模式 🧭

refactor: 🔨 重构时间与日程数据结构

- 完成绝对日期与相对时间的转换逻辑 🔄
  - 后续可根据需求灵活决定时间的传入与输出类型
- 再次重构 schedule 表单结构
  - 拆分为 schedule_event(单)与 schedule(多)
  - 建立前者对后者的一对多关系 🧩

fix: 🐛 大幅调整表结构与业务逻辑,修复大量历史遗留 bug 🔥
This commit is contained in:
LoveLosita
2026-02-07 16:33:30 +08:00
parent 132b7095ac
commit f4bea0576c
17 changed files with 546 additions and 40 deletions

View File

@@ -148,4 +148,39 @@ var ( //请求相关的响应
Status: "40021",
Info: "user task class forbidden",
}
TaskClassItemNotBelongToUser = Response{ //任务类项目不属于用户
Status: "40022",
Info: "task class item does not belong to user",
}
TimeOutOfRangeOfThisSemester = Response{ //时间超出本学期范围
Status: "40023",
Info: "time out of range of this semester",
}
CourseNotBelongToUser = Response{ //课程不属于用户
Status: "40024",
Info: "course does not belong to user",
}
CourseAlreadyEmbeddedByOtherTaskBlock = Response{ //课程已被其他任务块嵌入
Status: "40025",
Info: "course already embedded by other task block",
}
ScheduleConflict = Response{ //日程冲突
Status: "40026",
Info: "schedule conflict",
}
WrongCourseID = Response{ //课程ID错误
Status: "40027",
Info: "wrong course id",
}
CourseTimeNotMatch = Response{ //课程时间不匹配
Status: "40028",
Info: "course time not match",
}
)