feat(api): implement exam and grade synchronization modules
Add new functionality for managing and synchronizing academic grades and exam schedules. This includes new models, repositories, services, and HTTP handlers, along with updated gRPC definitions and dependency injection configuration. Additionally, improve the reliability of unread message count tracking by implementing an atomic Lua script for Redis operations in the conversation cache.
This commit is contained in:
@@ -2,7 +2,7 @@ syntax = "proto3";
|
||||
|
||||
package runner;
|
||||
|
||||
option go_package = "carrot_bbs/proto/runner;runner";
|
||||
option go_package = "schedule_converter/proto/runner;runner";
|
||||
|
||||
// ============================================================
|
||||
// 服务定义
|
||||
@@ -178,20 +178,35 @@ message ScheduleTime {
|
||||
repeated int32 weeks = 3; // 周次,如 [1, 2, 3, 4, 5]
|
||||
}
|
||||
|
||||
// GpaSummary 学分绩汇总信息
|
||||
message GpaSummary {
|
||||
string average_gpa = 1; // 平均学分绩
|
||||
string rank = 2; // 专业排名
|
||||
string exam_total_gpa = 3; // 考试课学分绩
|
||||
string exam_total_credits = 4; // 考试课学分数
|
||||
string fail_credits = 5; // 考查课不及格学分
|
||||
string semesters = 6; // 计算学期数
|
||||
}
|
||||
|
||||
// GradesResultData 成绩结果数据
|
||||
message GradesResultData {
|
||||
string semester = 1; // 学期
|
||||
string student_id = 2; // 学号
|
||||
repeated Grade grades = 3; // 成绩列表
|
||||
GpaSummary gpa_summary = 4; // 学分绩汇总 (可选)
|
||||
}
|
||||
|
||||
// Grade 成绩信息
|
||||
message Grade {
|
||||
string course_code = 1; // 课程代码
|
||||
string course_name = 2; // 课程名称
|
||||
float credit = 3; // 学分
|
||||
string grade = 4; // 成绩 (可能是等级或分数)
|
||||
float grade_point = 5; // 绩点
|
||||
string term = 1; // 学期
|
||||
string course_code = 2; // 课程代码
|
||||
string course_name = 3; // 课程名称
|
||||
string nature = 4; // 课程性质
|
||||
string category = 5; // 课程类别
|
||||
string credit = 6; // 学分
|
||||
string score = 7; // 成绩 (可能是等级或分数)
|
||||
string grade_point = 8; // 绩点
|
||||
string is_exam = 9; // 是否考试课
|
||||
}
|
||||
|
||||
// ExamsResultData 考试安排结果数据
|
||||
@@ -203,13 +218,12 @@ message ExamsResultData {
|
||||
|
||||
// Exam 考试信息
|
||||
message Exam {
|
||||
string course_code = 1; // 课程代码
|
||||
string course_name = 2; // 课程名称
|
||||
string exam_type = 3; // 考试类型 (期末/期中/补考)
|
||||
string date = 4; // 考试日期 (YYYY-MM-DD)
|
||||
string time = 5; // 考试时间 (HH:MM-HH:MM)
|
||||
string room = 6; // 考场
|
||||
string seat = 7; // 座位号
|
||||
string course_name = 1; // 课程名称
|
||||
string exam_type = 2; // 考试类型 (期末/期中/补考)
|
||||
string date = 3; // 考试日期
|
||||
string time = 4; // 考试时间
|
||||
string week = 5; // 考试周次
|
||||
string weekday = 6; // 星期几
|
||||
}
|
||||
|
||||
// UserInfoResultData 用户信息结果数据
|
||||
|
||||
Reference in New Issue
Block a user