You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.3 KiB
66 lines
1.3 KiB
syntax = "proto3";
|
|
|
|
//在web层重新生成pb.go的方法
|
|
/*
|
|
protoc -I Business/Teacher/TeacherProto/ Business/Teacher/TeacherProto/Teacher.proto --go_out=plugins=grpc:Business/Teacher/TeacherProto
|
|
*/
|
|
package TeacherProto;
|
|
|
|
option go_package = ".;TeacherProto";
|
|
|
|
option java_multiple_files = true;
|
|
option java_package = "com.dsideal.dsmin.base";
|
|
option java_outer_classname = "Teacher";
|
|
option objc_class_prefix = "";
|
|
|
|
service TeacherManage {
|
|
//获取单条
|
|
rpc GetTeacher (ModelArg) returns (Reply) {}
|
|
//增加
|
|
rpc AddTeacher (ModelArg) returns (Reply) {}
|
|
//批量删除
|
|
rpc DeleteTeacher (DeleteIdsArg) returns (Reply) {}
|
|
//修改
|
|
rpc UpdateTeacher (ModelArg) returns (Reply) {}
|
|
//查询(分页)
|
|
rpc PageTeacher (QueryArg) returns (Reply) {}
|
|
}
|
|
|
|
message ModelArg {
|
|
//id
|
|
string Id = 1;
|
|
//姓名
|
|
string Xm = 2;
|
|
//性别
|
|
string Xbm = 3;
|
|
//creator
|
|
string Creator = 4;
|
|
//modifier
|
|
string Modifier = 5;
|
|
//create_time
|
|
string CreateTime = 6;
|
|
//modify_time
|
|
string ModifyTime = 7;
|
|
//需要强制更新的列
|
|
repeated string ForceUpdateFields = 8;
|
|
}
|
|
|
|
// 查询参数
|
|
message QueryArg{
|
|
int32 Page = 1;
|
|
int32 Limit = 2;
|
|
}
|
|
|
|
// 查询请求响应
|
|
message Reply{
|
|
bool Success = 1;
|
|
string Message = 2;
|
|
int32 Count = 3;
|
|
string List = 4;
|
|
}
|
|
//删除参数
|
|
message DeleteIdsArg {
|
|
//一个或多个ID
|
|
repeated string Ids = 1;
|
|
}
|