syntax = "proto3"; package user; message ExistUserReq { string username = 1; } message ExistUserReply { } message RegisterUserReq { string username = 1; string password = 2; string phoneNum = 3; string verifyCode = 4; } message RegisterUserReply { UserInfo userInfo = 1; } message EntireUserInfoReq { string userId = 1; int32 type = 2; //个人或公司 string trueName = 3; string email = 4; string industryId = 5; int32 areaId = 6; string companyName = 7; string contact = 8; int32 userType = 9;//普通用户或者开发者 } message EntireUserInfoReply { } message LoginReq { string username = 1; string password = 2; string phoneNum = 3; string verifyCode = 4; } message RoleInfo { string id = 1; string name = 2; } message UserInfo { string id = 1; string username = 2; string phoneNum = 3; bool reEditPwd = 4; repeated string permissions = 5; repeated RoleInfo sysRoles = 6; } message LoginReply { UserInfo userInfo = 1; } message LoginRespWithToken { UserInfo userInfo = 1; string access_token = 2; string refresh_token = 3; string scope = 4; string token_type = 5; int64 expires_in = 6; } message UpdatePwdReq { string username = 1; string oldPwd = 2; string newPwd = 3; } message UpdatePwdReply { } message ForgetPwdReq { string phoneNum = 1; string newPwd = 2; } message ForgetPwdReply { } message GetVerifyCodeReq { string phoneNum = 1; int32 type = 2; } message GetVerifyCodeReply { string verifyCode = 1; } message GetUserByIdReq { string userId = 1; } message GetUserByIdReply { string username = 1; string phoneNum = 2; int32 userType = 3; int32 type = 4; string trueName = 5; string email = 6; string industryId = 7; string companyName = 8; string contact = 9; int32 provinceId = 10; int32 areaId = 11; string industryName = 12; string provinceName = 13; string cityName = 14; int32 source = 15; repeated string menuIds = 16; } message VerifyCodeReq { string phoneNum = 1; string verifyCode = 2; } message VerifyCodeReply { } message LogoutReq { } message LogoutReply { } message ValidateTokenReq { string token = 1; } message ValidateTokenReply { string userId = 1; } message UpdatePhoneNumReq { string userId = 1; string newPhoneNum = 2; string verifyCode = 3; } message UpdatePhoneNumReply { } message SaveUserReq { string id = 1; string username = 2; string password = 3; int32 userType = 4; int32 type = 5; string trueName = 6; string email = 7; string industryId = 8; int32 areaId = 9; string companyName = 10; string contact = 11; string createUserId = 12; bool isChangePwd = 13; } message SaveManagerReq { string id = 1; string username = 2; string password = 3; string trueName = 4; string email = 5; string pos = 6; repeated string menuIds = 7; string createUserId = 8; bool isChangePwd = 9; } message SaveUserReply { } message GetUserListReq { string userId = 1; int32 page = 2; int32 size = 3; int32 type = 4; string inputText = 5; } message GetManagerListReq { string userId = 1; int32 page = 2; int32 size = 3; string inputText = 4; } message UserDetail { string id = 1; string username = 2; int32 type = 3; int32 userType = 4; string trueName = 5; string phoneNum = 6; string email = 7; string companyName = 8; string contact = 9; string industryId = 10; string industryName = 11; int32 areaId = 12; string areaName = 13; int32 provinceId = 14; string provinceName = 15; int32 source = 16; string createTime = 17; string lastLoginTime = 18; } message GetUserListReply { int32 total = 1; repeated UserDetail dataList = 2; } message ManagerDetail { string id = 1; string username = 2; string trueName = 3; string phoneNum = 4; string email = 5; string pos = 6; string createTime = 7; string lastLoginTime = 8; repeated string menuIds = 9; } message GetManagerListReply { int32 total = 1; repeated ManagerDetail dataList = 2; } service UserService { rpc GetVerifyCode (GetVerifyCodeReq) returns (GetVerifyCodeReply) {} rpc ExistUser (ExistUserReq) returns (ExistUserReply) {} rpc RegisterUser (RegisterUserReq) returns (RegisterUserReply) {} rpc EntireUserInfo (EntireUserInfoReq) returns (EntireUserInfoReply) {} rpc Login (LoginReq) returns (LoginReply) {} rpc Logout (LogoutReq) returns (LogoutReply) {} rpc UpdatePwd (UpdatePwdReq) returns (UpdatePwdReply) {} rpc UpdatePhoneNum (UpdatePhoneNumReq) returns (UpdatePhoneNumReply) {} rpc ForgetPwd (ForgetPwdReq) returns (ForgetPwdReply) {} rpc GetUserById (GetUserByIdReq) returns (GetUserByIdReply) {} rpc VerifyCode (VerifyCodeReq) returns (VerifyCodeReply) {} rpc ValidateToken (ValidateTokenReq) returns (ValidateTokenReply) {} rpc SaveUser (SaveUserReq) returns (SaveUserReply) {} rpc SaveManager (SaveManagerReq) returns (SaveUserReply) {} rpc GetUserList (GetUserListReq) returns (GetUserListReply) {} rpc GetManagerList (GetManagerListReq) returns (GetManagerListReply) {} }