56 lines
728 B
Protocol Buffer
56 lines
728 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package common;
|
|
|
|
// 通用响应结构
|
|
message Response {
|
|
int32 code = 1;
|
|
string message = 2;
|
|
bytes data = 3;
|
|
}
|
|
|
|
// 分页请求
|
|
message PaginationRequest {
|
|
int32 page = 1;
|
|
int32 page_size = 2;
|
|
}
|
|
|
|
// 分页响应
|
|
message PaginationResponse {
|
|
int32 total = 1;
|
|
int32 page = 2;
|
|
int32 page_size = 3;
|
|
int32 total_pages = 4;
|
|
}
|
|
|
|
// 错误信息
|
|
message Error {
|
|
int32 code = 1;
|
|
string message = 2;
|
|
string details = 3;
|
|
}
|
|
|
|
// 空请求
|
|
message EmptyRequest {
|
|
}
|
|
|
|
// 空响应
|
|
message EmptyResponse {
|
|
}
|
|
|
|
// ID 请求
|
|
message IDRequest {
|
|
string id = 1;
|
|
}
|
|
|
|
// ID 响应
|
|
message IDResponse {
|
|
string id = 1;
|
|
}
|
|
|
|
// 状态响应
|
|
message StatusResponse {
|
|
bool success = 1;
|
|
string message = 2;
|
|
}
|