From f6207946eead24214d7ba5969210fe9907649b0e Mon Sep 17 00:00:00 2001 From: sky Date: Wed, 20 Aug 2025 09:54:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shenxianhe/v1/account.proto | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) 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);