Files
Edu/packages/shared-proto/proto/classes.proto
SpecialX 2ba4250165
Some checks failed
CI Go / test (push) Has been cancelled
CI Proto / lint (push) Has been cancelled
CI Python / test (push) Has been cancelled
CI TypeScript / test (push) Has been cancelled
feat(p1): complete P1 foundation stage
- monorepo: pnpm workspace + go.work + pyproject.toml + commitlint/husky
- infra: docker-compose (minimal + full profiles) + init-sql + prometheus
- arch-scan: multi-language scanner skeleton (TS/Go/Python/Proto)
- shared-proto: buf v2 + classes.proto (ClassService CRUD contract)
- api-gateway: Go/Gin + JWT HS256 auth + reverse proxy + request ID
- classes: NestJS golden template (error system + observability + middleware + CRUD + tests)
- teacher-portal: Next.js + paper-feel UI design system
- CI/CD: 4 workflows (go/ts/py/proto)
- docs: migration guide + project_rules + coding-standards + git-workflow + ui-design-system + 004 + 9 module READMEs + known-issues + spec/plan migration + roadmap
2026-07-07 23:39:37 +08:00

58 lines
1.2 KiB
Protocol Buffer
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
syntax = "proto3";
package next_edu_cloud.classes.v1;
// ClassService 定义班级域 CRUD 契约
// P1: REST 实现P3 起转 gRPC
service ClassService {
rpc CreateClass(CreateClassRequest) returns (Class);
rpc GetClass(GetClassRequest) returns (Class);
rpc ListClasses(ListClassesRequest) returns (ListClassesResponse);
rpc UpdateClass(UpdateClassRequest) returns (Class);
rpc DeleteClass(DeleteClassRequest) returns (Empty);
}
message Class {
string id = 1;
string name = 2;
string grade_id = 3;
string head_teacher_id = 4;
string description = 5;
int64 created_at = 6;
int64 updated_at = 7;
}
message CreateClassRequest {
string name = 1;
string grade_id = 2;
string head_teacher_id = 3;
string description = 4;
}
message GetClassRequest {
string id = 1;
}
message ListClassesRequest {
string grade_id = 1;
int32 page_size = 2;
string page_token = 3;
}
message ListClassesResponse {
repeated Class classes = 1;
string next_page_token = 2;
}
message UpdateClassRequest {
string id = 1;
optional string name = 2;
optional string head_teacher_id = 3;
optional string description = 4;
}
message DeleteClassRequest {
string id = 1;
}
message Empty {}