All checks were successful
Build / build (push) Successful in 2m17s
Extract business logic from gRPC handlers into a dedicated service package. Add context support throughout for cancellation and timeouts. Move models to their own package, remove hardcoded credentials from config, and simplify parsers to only handle HTML parsing.
33 lines
587 B
Go
33 lines
587 B
Go
package models
|
|
|
|
// ScoreType 成绩类型
|
|
type ScoreType string
|
|
|
|
const (
|
|
ScoreTypeFinal ScoreType = "final"
|
|
ScoreTypeMidterm ScoreType = "midterm"
|
|
)
|
|
|
|
// GradeEntry 成绩条目
|
|
type GradeEntry struct {
|
|
Term string
|
|
Code string
|
|
Name string
|
|
Nature string
|
|
Category string
|
|
Credit string
|
|
Score string
|
|
GradePoint string
|
|
IsExam string
|
|
}
|
|
|
|
// GPASummary 学分绩概要
|
|
type GPASummary struct {
|
|
AverageGPA string
|
|
Rank string
|
|
ExamTotalGPA string
|
|
ExamTotalCredits string
|
|
FailCredits string
|
|
Semesters string
|
|
}
|