javascript/proto/passport/info.proto

104 lines
2.5 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
package passport;
option go_package = "./passport";
message FetchRequest {
int64 page_no=1; // 页数
int64 page_size=2; // 每页记录数
map<string,string> params=3; // 条件参数,key=val,eg key:category_id=?,vlaue=11
}
message IdentRequest{
int64 id = 1; // 唯一ID
string identity = 2; // 唯一码
}
message VersionRequest {
int64 version=1; // 时序版本号
}
message SearchRequest {
string keyword=1; //关键词
}
message StatusReply{
int64 status = 1; // 状态码
string identity=2; // 标识码
string message=3; //状态说明
int64 timeseq=4; // 响应时间序列
}
message Empty{
}
// Passport(会员通行证)模块-数据
// *此模块需要Token验证
service Info{
// 绑定资料
rpc Bind(BindRequest) returns (StatusReply) {}
// 获取会员的所有信息数据
rpc GetData(Empty) returns (GetDataReply) {}
// 更新会员的信息数据
// 字段值为空或是0将不更新此数据
rpc SetData(SetDataRequest) returns (StatusReply) {}
// 更新会员的密码
rpc SetPassword(SetPasswordRequest) returns (StatusReply) {}
// 获取会员的相关统计数据
rpc Statistics(StatisticsRequest) returns (StatisticsReply) {}
}
message BindRequest {
string action =1; //操作动作
string phone = 2; // 手机号码 必填
string code = 3; // 验证码
string password = 4; // 密码 必填
string nickname = 5; // 昵称
}
message GetDataReply {
string account = 1; //帐号
string phone = 2; //手机号
string nickname = 3; //昵称
string avatar = 4; //头像
string birthday = 5; //生日
int32 sex = 6; //性别1为男性2为女性
int32 province = 7; //省
int32 city = 8; //市
int32 area = 9; //区
string sign = 10; //签名
int32 approve = 11; //状态:-2,认证未通过0为未认证1为审核中2为认证成功
}
message SetDataRequest {
string nickname = 1; //昵称
string avatar = 2; //头像
string birthday = 3; //生日
int32 sex = 4; //性别1为男性2为女性
int32 province = 5; //省
int32 city = 6; //市
int32 area = 7; //区
string sign = 8; //签名
}
message SetPasswordRequest {
string old_password = 3; // 旧密码
string new_password = 4;// 新密码
}
message StatisticsRequest {
repeated string field = 1; //要获取的统计数据字段。
}
message StatisticsReply {
map<string,int64> Data=1; //数据以Map格式输出
}