83 lines
2.6 KiB
Protocol Buffer
83 lines
2.6 KiB
Protocol Buffer
syntax = "proto3";
|
||
package market;
|
||
option go_package = ".;market";
|
||
import "blocks.proto";
|
||
|
||
// 营销服务 - 代理商
|
||
service Agency{
|
||
// 登录
|
||
rpc Login(LoginRequest) returns (LoginReply) {}
|
||
|
||
// 新增代理商
|
||
rpc Create(MarketAgenctyItem) returns (StatusReply) {}
|
||
|
||
// 获取一个代理商
|
||
rpc Get(IdentRequest) returns (MarketAgenctyItem) {}
|
||
|
||
// 代理商列表
|
||
rpc Fetch(FetchRequest) returns (AgencyReply) {}
|
||
|
||
// 更新代理商数据
|
||
rpc Modify(MarketAgenctyItem) returns (StatusReply) {}
|
||
|
||
// 删除一个代理商
|
||
rpc Delete(IdentRequest) returns (StatusReply) {}
|
||
|
||
// 更新密码
|
||
rpc SetPassword(SetPasswordRequest) returns (StatusReply) {}
|
||
|
||
//待审核
|
||
rpc Pending(FetchRequest) returns (AgencyReply) {}
|
||
|
||
// 审核
|
||
rpc Approve(ApproveRequest) returns (StatusReply) {};
|
||
|
||
}
|
||
|
||
|
||
message LoginRequest {
|
||
string account = 1; // 账号 必填
|
||
string password = 2; // 密码 必填
|
||
string verify = 3; // 检验码 必填
|
||
}
|
||
|
||
message MarketAgenctyItem {
|
||
string identity = 1; // 唯一标识
|
||
string created_at = 2 [json_name="created_at"]; // 创建时间
|
||
|
||
string name = 3 ; // 联系人名称 必填
|
||
string avatar = 4; // 头像
|
||
string account = 5; // 帐号
|
||
string phone = 6; // 手机号
|
||
string password = 7; // 密码
|
||
string org_name = 8 [json_name="org_name"]; // 机构名称
|
||
string org_photo = 9 [json_name="org_photo"]; // 机构照片
|
||
string id_name = 10 [json_name="id_name"]; // 证件姓名
|
||
string id_before = 11 [json_name="id_before"]; // 证件照片
|
||
string id_after = 12 [json_name="id_after"]; // 证件照片
|
||
string remark = 13; // 备注
|
||
int32 commission_rate = 14 [json_name="commission_rate"]; // 佣金比例
|
||
int32 agency_type = 15 [json_name ="agency_type"]; // 服务 状态:1:代理商 2:安装商
|
||
int32 status = 16; // 状态:默认为0,-1禁止,1为正常
|
||
string email = 17;// 邮箱
|
||
string country = 18;// 国家
|
||
string area = 19;// 地区
|
||
int32 approve = 20;// 审核状态:0:待审核 2:审核通过 -2:审核未通过
|
||
|
||
}
|
||
|
||
message SetPasswordRequest {
|
||
string identity = 1;
|
||
string old_password = 2 [json_name="old_password"]; // 旧密码
|
||
string new_password = 3 [json_name="new_password"];// 新密码
|
||
}
|
||
|
||
message AgencyReply {
|
||
int64 count = 1;// 总数
|
||
repeated MarketAgenctyItem data = 2;// 数据
|
||
}
|
||
|
||
message ApproveRequest {
|
||
int32 approve = 1; // 1:通过 2:拒绝
|
||
string identity = 2; // 唯一标识
|
||
} |