Files

130 lines
4.3 KiB
Protocol Buffer
Raw Permalink Normal View History

syntax = "proto3";
package feedback;
option go_package = "bsm/full/module/base/feedback/pb;feedback";
// Feedback-建议反馈模块
service Method{
rpc List(ListRequest) returns (ListReply) {}
rpc Get(GetRequest) returns (GetReply) {}
rpc Add(AddRequest) returns (AddReply) {}
rpc Modify(ModifyRequest) returns (StatusReply) {}
rpc Delete(DeleteRequest) returns (StatusReply) {}
rpc Remark(RemarkRequest) returns (StatusReply) {}
}
message ListRequest {
int64 page = 1; // 页码,默认第一页
int64 size = 2; // 单页显示数量,默认10,最多50
string user_identity = 3 [json_name = "user_identity"]; //用户唯一`标识,可选
string user_name = 4 [json_name = "user_name"]; // 用户名称,可选
int32 status = 5;// 条目状态,可选,默认0,全部查找
string category = 6; //业务类型: 1,意见/2,反馈/3,申述等,默认0 调用方传
string email = 7;// 邮箱
string phone = 8;// 手机号码
string store_identity = 9 [json_name = "store_identity"];// 店铺标识
string agency = 10;// 代理
}
message ListReply {
int64 count = 1;
repeated FeedbackItem list = 2;
}
message FeedbackItem{
string identity = 1;
string user_identity = 2 [json_name = "user_identity"];// 用户唯一标识
string user_name = 3 [json_name = "user_name"];// 用户名称
int32 status = 4; //状态,1未处理,2已处理,也可以调用方自行设置,如果未设置则默认是1
string created_at = 5 [json_name = "created_at"];// 创建时间
string updated_at = 6 [json_name = "updated_at"];// 更新时间
string title = 7; // 标题
string content = 8; // 内容
repeated FeedbackImage images = 9;// 图片
string remark = 10; //反馈信息
string category = 11;// 类型: 1:pre_sales 2:after_sales
repeated FeedbackAccessory accessories = 12;
string email = 13;// 邮箱
string phone = 14;// 手机号码
string store_identity = 15 [json_name = "store_identity"];// 店铺标识
string agency = 16;// 代理
}
message FeedbackAccessory{
string identity = 1;
string item_identity = 2 [json_name = "item_identity"];
string title = 3;// 附件标题
string file_path = 4 [json_name = "file_path"];// 附件地址
}
message FeedbackImage{
string identity = 1;
string item_identity = 2;
string url = 3;
}
message GetRequest{
string identity = 1;
}
message GetReply{
FeedbackItem record = 1;
bool exists = 2;
}
message AddRequest {
string user_identity = 1 [json_name = "user_identity"];// 用户唯一标识
string user_name = 2 [json_name = "user_name"];// 用户名称
int32 status = 3; //状态,1未处理,2已处理,也可以调用方自行设置,如果未设置则默认是1
string title = 7; // 标题
string content = 8; // 内容
repeated FeedbackImage images = 9;// 图片
string category = 10;// 类型: 1:pre_sales 2:after_sales
repeated FeedbackAccessory accessories =11;// 附件
string email = 12;// 邮箱
string phone = 13;// 手机号码
string store_identity = 14[json_name = "store_identity"];// 店铺标识
string agency = 15;// 代理
}
message AddReply {
string identity = 1;
}
message ModifyRequest {
string identity = 1;
string user_identity = 2 [json_name = "user_identity"];// 用户唯一标识
string user_name = 3 [json_name = "user_name"];// 用户名称
int32 status = 4; //状态,1未处理,2已处理,也可以调用方自行设置,如果未设置则默认是1
string title = 7; // 标题
string content = 8; // 内容
repeated FeedbackImage images = 9;// 图片
string category = 10;// 类型: 1:pre_sales 2:after_sales
repeated FeedbackAccessory accessories =11;// 附件
string email = 12;// 邮箱
string phone = 13;// 手机号码
string store_identity = 14[json_name = "store_identity"];// 店铺标识
string agency = 15;// 代理
}
message DeleteRequest {
string identity = 1;
}
message RemarkRequest {
string identity = 1;
string remark = 2;
int32 status = 3;
}
message IdentRequest{
int64 id = 1; // 唯一ID
string identity = 2; // 唯一码
}
message StatusReply{
int32 code=1; // 状态码
string message=2; // 状态说明
string details=3; // 数据
int64 timeseq=4; // 响应时间序列
}