feat(grpc): enhance grades and exams data structures
All checks were successful
Build / build (push) Successful in 1m39s

Update the gRPC service definitions and handlers to provide more detailed
information for grades and exams.

- Add `GpaSummary` message to include average GPA, rank, and other
  academic statistics.
- Expand `Grade` message with additional fields like `term`, `nature`,
  `category`, and `is_exam`.
- Refactor `Exam` message to use `week` and `weekday` instead of `room`
  and `seat`.
- Update `TaskHandler.getGrades` to populate the new `GpaSummary` and
  enriched grade details.
- Update protobuf generated files to reflect schema changes.
This commit is contained in:
2026-05-11 15:53:26 +08:00
parent 478ec3e3ab
commit d64f2fa20b
4 changed files with 276 additions and 137 deletions

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v3.19.4
// - protoc-gen-go-grpc v1.6.1
// - protoc v7.34.1
// source: proto/runner/runner.proto
package runner
@@ -76,7 +76,7 @@ type RunnerHubServer interface {
type UnimplementedRunnerHubServer struct{}
func (UnimplementedRunnerHubServer) Connect(grpc.BidiStreamingServer[StreamMessage, StreamMessage]) error {
return status.Errorf(codes.Unimplemented, "method Connect not implemented")
return status.Error(codes.Unimplemented, "method Connect not implemented")
}
func (UnimplementedRunnerHubServer) mustEmbedUnimplementedRunnerHubServer() {}
func (UnimplementedRunnerHubServer) testEmbeddedByValue() {}
@@ -89,7 +89,7 @@ type UnsafeRunnerHubServer interface {
}
func RegisterRunnerHubServer(s grpc.ServiceRegistrar, srv RunnerHubServer) {
// If the following call pancis, it indicates UnimplementedRunnerHubServer was
// If the following call panics, it indicates UnimplementedRunnerHubServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.