refactor: reorganize modules and add Linux build tooling
This commit is contained in:
43
module/ec/mall/proto/ads.proto
Normal file
43
module/ec/mall/proto/ads.proto
Normal file
@@ -0,0 +1,43 @@
|
||||
syntax = "proto3";
|
||||
package mall;
|
||||
option go_package = ".;mall";
|
||||
import "blocks.proto";
|
||||
|
||||
//Store(店铺)微服务 - 广告
|
||||
service Ads{
|
||||
//通过广告位获取广告信息
|
||||
rpc ByPos(ByPosRequest) returns (AdsListReply) {}
|
||||
|
||||
// 广告列表
|
||||
rpc Fetch(FetchRequest) returns (AdsListReply){};
|
||||
|
||||
// 新建广告
|
||||
rpc Create (AdsItem) returns (StatusReply){};
|
||||
|
||||
// 修改广告
|
||||
rpc Modify (AdsItem) returns (StatusReply){};
|
||||
|
||||
// 删除广告
|
||||
rpc Delete (IdentRequest) returns (StatusReply){};
|
||||
}
|
||||
message ByPosRequest{
|
||||
repeated string pos_key = 1 [json_name="pos_key"];
|
||||
string store_identity = 2 [json_name="store_identity"]; // 店铺唯一标识
|
||||
}
|
||||
|
||||
// 公告列表
|
||||
message AdsListReply{
|
||||
repeated AdsItem data = 1;
|
||||
int64 count = 2;
|
||||
}
|
||||
|
||||
message AdsItem{
|
||||
int64 id = 1;
|
||||
string pos_key=2 [json_name="pos_key"]; // 广告位置
|
||||
string title = 3;// 广告名称
|
||||
string content = 4;// 广告内容
|
||||
int32 type = 5;// 广告类型 1.文本 2.图片 3.视频
|
||||
string to_url = 6 [json_name="to_url"];// 跳转链接
|
||||
string created_at = 7 [json_name="created_at"];// 创建时间
|
||||
int64 status = 8;// 状态:默认为0,-1禁止,1为正常
|
||||
}
|
||||
Reference in New Issue
Block a user