55 lines
1.2 KiB
Protocol Buffer
55 lines
1.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
package AxibugProtobuf;
|
|
option optimize_for = SPEED;
|
|
|
|
enum CommandID
|
|
{
|
|
CMD_DEFAUL = 0;//缺省不使用
|
|
CMD_LOGIN = 2001; //登录 对应上行|下行 Protobuf_Login | Protobuf_Login_RESP
|
|
}
|
|
|
|
enum ErrorCode
|
|
{
|
|
ERROR_DEFAUL = 0;//缺省
|
|
ERROR_OK = 1; //成功
|
|
}
|
|
|
|
enum LoginType
|
|
{
|
|
BaseDefault = 0;//缺省
|
|
HaoYueAuth = 1;
|
|
}
|
|
|
|
enum DeviceType
|
|
{
|
|
Default = 0;//缺省
|
|
PC = 1;
|
|
Android = 2;
|
|
IOS = 3;
|
|
PSV = 4;
|
|
}
|
|
|
|
enum LoginResultStatus
|
|
{
|
|
LoginResultStatus_BaseDefault = 0;//缺省不使用
|
|
OK = 1;
|
|
AccountErr = 2;
|
|
}
|
|
|
|
//登录数据上行
|
|
message Protobuf_Login
|
|
{
|
|
LoginType loginType = 1;//登录操作类型
|
|
DeviceType deviceType = 2;//设备类型
|
|
string Account = 3;//用户名
|
|
string Password = 4;//密码
|
|
}
|
|
|
|
//登录数据下行
|
|
message Protobuf_Login_RESP
|
|
{
|
|
string Token = 1;//登录凭据 (本次登录之后,所有业务请求凭据,需要存储在内存中)
|
|
string LastLoginDate = 2;//上次登录时间(只用于呈现的字符串,若界面需求需要)
|
|
string RegDate = 3;//注册时间(只用于呈现的字符串,若界面需求需要)
|
|
LoginResultStatus Status = 4;//账号状态 (预留) [1]正常[0]被禁封
|
|
} |