40 lines
977 B
Protocol Buffer
40 lines
977 B
Protocol Buffer
|
|
syntax = "proto3";
|
|||
|
|
package mall;
|
|||
|
|
option go_package =".;mall";
|
|||
|
|
import "blocks.proto";
|
|||
|
|
|
|||
|
|
// Store(店铺)微服务-公告
|
|||
|
|
service Notice{
|
|||
|
|
// 公告列表
|
|||
|
|
rpc Fetch(FetchRequest) returns (NoticeListReply){};
|
|||
|
|
|
|||
|
|
// 新建公告
|
|||
|
|
rpc Create (NoticeItem) returns (StatusReply){};
|
|||
|
|
|
|||
|
|
// 修改公告
|
|||
|
|
rpc Modify (NoticeItem) returns (StatusReply){};
|
|||
|
|
|
|||
|
|
// 删除公告
|
|||
|
|
rpc Delete (IdentRequest) returns (StatusReply){};
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 公告列表
|
|||
|
|
message NoticeListReply{
|
|||
|
|
repeated NoticeItem data = 1;
|
|||
|
|
int64 count = 2;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 公告
|
|||
|
|
message NoticeItem{
|
|||
|
|
string identity = 1; // 唯一标识
|
|||
|
|
string title = 2; // 标题
|
|||
|
|
string content = 3; // 内容
|
|||
|
|
string author = 4; // 作者
|
|||
|
|
int64 store_id=5 [json_name="store_id"]; // 店铺ID
|
|||
|
|
string store_identity = 6 [json_name="store_identity"]; // 店铺唯一标识
|
|||
|
|
string created_at = 7 [json_name="created_at"];
|
|||
|
|
int64 status = 8;// 状态:默认为0,-1禁止,1为正常
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|