diff --git a/shenxianhe/v1/account.proto b/shenxianhe/v1/account.proto index 70b81e2..2841b49 100644 --- a/shenxianhe/v1/account.proto +++ b/shenxianhe/v1/account.proto @@ -5,11 +5,19 @@ option go_package = "shenxianhe/gen/shenxianhe/v1;shenxianhev1"; // 认证类型枚举 enum AuthenticationType { AUTHENTICATION_TYPE_UNSPECIFIED = 0; - AUTHENTICATION_TYPE_PHONE = 1; // 手机号 - AUTHENTICATION_TYPE_EMAIL = 2; // 邮箱 - AUTHENTICATION_TYPE_WECHAT = 3; // 微信 + AUTHENTICATION_TYPE_NAME = 1; // 用户名 + AUTHENTICATION_TYPE_PHONE = 2; // 手机号 + AUTHENTICATION_TYPE_EMAIL = 3; // 邮箱 + AUTHENTICATION_TYPE_WECHAT = 4; // 微信 } +message SendCredentialRequest { + AuthenticationType auth_type = 1; // 认证类型 + string auth_id = 2; // 认证ID,根据auth_type存储不同的账号信息 +} + +message SendCredentialResponse {} + message AuthRequest { AuthenticationType auth_type = 1; // 认证类型 string auth_id = 2; // 认证ID,根据auth_type存储不同的账号信息 @@ -37,13 +45,16 @@ message SetAvatarResponse {} message GetUserInfoRequest {} message GetUserInfoResponse { - string name = 1; - string avatar_url = 2; - string phone = 3; - string email = 4; + string id = 1; + string avatar = 2; + string invitation_code = 3; + string name = 4; + string phone = 5; + string email = 6; } service AccountService { + rpc SendCredential(SendCredentialRequest) returns (SendCredentialResponse); rpc Auth(AuthRequest) returns (AuthResponse); rpc SetPassword(SetPasswordRequest) returns (SetPasswordResponse); rpc SetName(SetNameRequest) returns (SetNameResponse);