-
Notifications
You must be signed in to change notification settings - Fork 0
/
teacher.proto
48 lines (40 loc) · 1.01 KB
/
teacher.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
syntax = "proto3";
package pb;
message Teacher{
int64 ID = 1;
string Name =2;
int64 Age =3;
string Department =4;
bool IsHead =5;
int64 SchoolCode =6;
int64 IdentityNumber =7;
}
message AddTeacherRequest{
Teacher input =1;
}
message GetTeacherRequest{
int64 ID = 1;
}
message DeleteTeacherRequest{
int64 ID = 1;
}
message UpdateTeacherRequest{
int64 ID = 1;
Teacher input =2;
}
message AddTeacherResponse{
Teacher teacher =1;
}
message GetTeachersRequest{
int64 SchoolCode = 1;
}
message GetTeachersResponse{
repeated Teacher teacher =1;
}
service TeacherService {
rpc AddTeacher (AddTeacherRequest) returns (AddTeacherResponse) {}
rpc GetTeacher (GetTeacherRequest) returns (AddTeacherResponse) {}
rpc UpdateTeacher (UpdateTeacherRequest) returns (AddTeacherResponse) {}
rpc DeleteTeacher (DeleteTeacherRequest) returns (AddTeacherResponse) {}
rpc GetTeachers (GetTeachersRequest) returns (GetTeachersResponse) {}
}