43 lines
1.3 KiB
Protocol Buffer
43 lines
1.3 KiB
Protocol Buffer
syntax = "proto3";
|
||
package mall;
|
||
option go_package = "bsm/full/module/ec/mall/pb;mall";
|
||
import "module/ec/mall/proto/const.proto";
|
||
|
||
//Store(店铺)微服务 - 广告
|
||
service Ads{
|
||
//通过广告位获取广告信息
|
||
rpc ByPos(ByPosRequest) returns (AdsListReply) {}
|
||
|
||
// 广告列表
|
||
rpc Fetch(blocks.MallFetchRequest) returns (AdsListReply){};
|
||
|
||
// 新建广告
|
||
rpc Create (AdsItem) returns (blocks.IdentityStatusReply){};
|
||
|
||
// 修改广告
|
||
rpc Modify (AdsItem) returns (blocks.IdentityStatusReply){};
|
||
|
||
// 删除广告
|
||
rpc Delete (blocks.IdentRequest) returns (blocks.IdentityStatusReply){};
|
||
}
|
||
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为正常
|
||
} |