rpc
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.4 KiB

syntax = "proto3";
package user;
// 使用token查询用户信息请求结构
message UserRequest {
string dbname = 1;
string token = 2;
}
// 使用token查询用户信息响应结构
message UserResponse {
string user_id = 1; //ID
string username = 2; //用户名
string nickname = 3; //昵称
string mobile = 4; //手机
string email = 5; //邮箱
string status = 6; //状态
string business_id = 7; //所属商家
string store_id = 8; //门店
string fans_to = 9;//被谁锁粉
string is_vip = 10;//是否VIP
string usercode = 11;//工号
string group_id = 12;//分组ID
}
// 用户登录请求结构
message LoginRequest {
string dbname = 1;
string account = 2;
string password = 3;
}
// 使用token查询用户信息响应结构
message LoginResponse {
string user_id = 1; //ID
string username = 2; //用户名
string nickname = 3; //昵称
string mobile = 4; //手机
string email = 5; //邮箱
string status = 6; //状态
string business_id = 7; //所属商家
string store_id = 8; //门店
string fans_to = 9;//被谁锁粉
string is_vip = 10;//是否VIP
string token = 11;//token
string usercode = 12;//工号
string group_id = 13;//分组ID
}
// rpc方法
service UserService {
rpc getByToken (UserRequest) returns (UserResponse); // 使用token查询用户
rpc login (LoginRequest) returns (LoginResponse); // 登录
}