add: user accomplished
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package ="./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
// ------------------------------------
|
||||
// Messages
|
||||
// ------------------------------------
|
||||
|
||||
//--------------------------------userVerifications--------------------------------
|
||||
message UserVerifications {
|
||||
int64 id = 1; //id
|
||||
int64 userId = 2; //userId
|
||||
string role = 3; //role
|
||||
string status = 4; //status
|
||||
string materials = 5; //materials
|
||||
string rejectReason = 6; //rejectReason
|
||||
int64 reviewedBy = 7; //reviewedBy
|
||||
int64 reviewedAt = 8; //reviewedAt
|
||||
int64 createdAt = 9; //createdAt
|
||||
int64 updatedAt = 10; //updatedAt
|
||||
}
|
||||
|
||||
message AddUserVerificationsReq {
|
||||
int64 userId = 1; //userId
|
||||
string role = 2; //role
|
||||
string status = 3; //status
|
||||
string materials = 4; //materials
|
||||
string rejectReason = 5; //rejectReason
|
||||
int64 reviewedBy = 6; //reviewedBy
|
||||
int64 reviewedAt = 7; //reviewedAt
|
||||
int64 createdAt = 8; //createdAt
|
||||
int64 updatedAt = 9; //updatedAt
|
||||
}
|
||||
|
||||
message AddUserVerificationsResp {
|
||||
}
|
||||
|
||||
message UpdateUserVerificationsReq {
|
||||
int64 id = 1; //id
|
||||
int64 userId = 2; //userId
|
||||
string role = 3; //role
|
||||
string status = 4; //status
|
||||
string materials = 5; //materials
|
||||
string rejectReason = 6; //rejectReason
|
||||
int64 reviewedBy = 7; //reviewedBy
|
||||
int64 reviewedAt = 8; //reviewedAt
|
||||
int64 createdAt = 9; //createdAt
|
||||
int64 updatedAt = 10; //updatedAt
|
||||
}
|
||||
|
||||
message UpdateUserVerificationsResp {
|
||||
}
|
||||
|
||||
message DelUserVerificationsReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message DelUserVerificationsResp {
|
||||
}
|
||||
|
||||
message GetUserVerificationsByIdReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message GetUserVerificationsByIdResp {
|
||||
UserVerifications userVerifications = 1; //userVerifications
|
||||
}
|
||||
|
||||
message SearchUserVerificationsReq {
|
||||
int64 page = 1; //page
|
||||
int64 limit = 2; //limit
|
||||
int64 id = 3; //id
|
||||
int64 userId = 4; //userId
|
||||
string role = 5; //role
|
||||
string status = 6; //status
|
||||
string materials = 7; //materials
|
||||
string rejectReason = 8; //rejectReason
|
||||
int64 reviewedBy = 9; //reviewedBy
|
||||
int64 reviewedAt = 10; //reviewedAt
|
||||
int64 createdAt = 11; //createdAt
|
||||
int64 updatedAt = 12; //updatedAt
|
||||
}
|
||||
|
||||
message SearchUserVerificationsResp {
|
||||
repeated UserVerifications userVerifications = 1; //userVerifications
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ------------------------------------
|
||||
// Rpc Func
|
||||
// ------------------------------------
|
||||
|
||||
service user_verifications{
|
||||
|
||||
//-----------------------userVerifications-----------------------
|
||||
rpc AddUserVerifications(AddUserVerificationsReq) returns (AddUserVerificationsResp);
|
||||
rpc UpdateUserVerifications(UpdateUserVerificationsReq) returns (UpdateUserVerificationsResp);
|
||||
rpc DelUserVerifications(DelUserVerificationsReq) returns (DelUserVerificationsResp);
|
||||
rpc GetUserVerificationsById(GetUserVerificationsByIdReq) returns (GetUserVerificationsByIdResp);
|
||||
rpc SearchUserVerifications(SearchUserVerificationsReq) returns (SearchUserVerificationsResp);
|
||||
|
||||
}
|
||||
+75
-48
@@ -8,50 +8,62 @@ package pb;
|
||||
// Messages
|
||||
// ------------------------------------
|
||||
|
||||
//--------------------------------users--------------------------------
|
||||
//--------------------------------users--------------------------------
|
||||
message Users {
|
||||
int64 userId = 1; //userId
|
||||
int64 id = 1; //id
|
||||
string username = 2; //username
|
||||
string passwd = 3; //passwd
|
||||
string nickname = 4; //nickname
|
||||
string phone = 5; //phone
|
||||
int64 roleType = 6; //roleType
|
||||
bool isVerified = 7; //isVerified
|
||||
bool state = 8; //state
|
||||
int64 createdAt = 9; //createdAt
|
||||
int64 updatedAt = 10; //updatedAt
|
||||
int64 deletedAt = 11; //deletedAt
|
||||
string passwordHash = 3; //passwordHash
|
||||
string phone = 4; //phone
|
||||
string email = 5; //email
|
||||
string nickname = 6; //nickname
|
||||
string avatar = 7; //avatar
|
||||
string bio = 8; //bio
|
||||
string currentRole = 9; //currentRole
|
||||
repeated string verifiedRoles = 10; //verifiedRoles
|
||||
string verificationStatus = 11; //verificationStatus
|
||||
bool isAdmin = 12; //isAdmin
|
||||
int64 createdAt = 13; //createdAt
|
||||
int64 updatedAt = 14; //updatedAt
|
||||
int64 deletedAt = 15; //deletedAt
|
||||
}
|
||||
|
||||
message AddUsersReq {
|
||||
int64 userId = 1; //userId
|
||||
string username = 2; //username
|
||||
string passwd = 3; //passwd
|
||||
string nickname = 4; //nickname
|
||||
string phone = 5; //phone
|
||||
int64 roleType = 6; //roleType
|
||||
bool isVerified = 7; //isVerified
|
||||
bool state = 8; //state
|
||||
int64 createdAt = 9; //createdAt
|
||||
int64 updatedAt = 10; //updatedAt
|
||||
int64 deletedAt = 11; //deletedAt
|
||||
string username = 1; //username
|
||||
string passwordHash = 2; //passwordHash
|
||||
string phone = 3; //phone
|
||||
string email = 4; //email
|
||||
string nickname = 5; //nickname
|
||||
string avatar = 6; //avatar
|
||||
string bio = 7; //bio
|
||||
string currentRole = 8; //currentRole
|
||||
repeated string verifiedRoles = 9; //verifiedRoles
|
||||
string verificationStatus = 10; //verificationStatus
|
||||
bool isAdmin = 11; //isAdmin
|
||||
int64 createdAt = 12; //createdAt
|
||||
int64 updatedAt = 13; //updatedAt
|
||||
int64 deletedAt = 14; //deletedAt
|
||||
}
|
||||
|
||||
message AddUsersResp {
|
||||
}
|
||||
|
||||
message UpdateUsersReq {
|
||||
int64 userId = 1; //userId
|
||||
string username = 2; //username
|
||||
string passwd = 3; //passwd
|
||||
string nickname = 4; //nickname
|
||||
string phone = 5; //phone
|
||||
int64 roleType = 6; //roleType
|
||||
bool isVerified = 7; //isVerified
|
||||
bool state = 8; //state
|
||||
int64 createdAt = 9; //createdAt
|
||||
int64 updatedAt = 10; //updatedAt
|
||||
int64 deletedAt = 11; //deletedAt
|
||||
int64 id = 1; //id
|
||||
optional string username = 2; //username
|
||||
optional string passwordHash = 3; //passwordHash
|
||||
optional string phone = 4; //phone
|
||||
optional string email = 5; //email
|
||||
optional string nickname = 6; //nickname
|
||||
optional string avatar = 7; //avatar
|
||||
optional string bio = 8; //bio
|
||||
optional string currentRole = 9; //currentRole
|
||||
repeated string verifiedRoles = 10; //verifiedRoles
|
||||
optional string verificationStatus = 11; //verificationStatus
|
||||
optional bool isAdmin = 12; //isAdmin
|
||||
optional int64 createdAt = 13; //createdAt
|
||||
optional int64 updatedAt = 14; //updatedAt
|
||||
optional int64 deletedAt = 15; //deletedAt
|
||||
}
|
||||
|
||||
message UpdateUsersResp {
|
||||
@@ -73,19 +85,23 @@ message GetUsersByIdResp {
|
||||
}
|
||||
|
||||
message SearchUsersReq {
|
||||
int64 page = 1; //page
|
||||
int64 limit = 2; //limit
|
||||
int64 userId = 3; //userId
|
||||
string username = 4; //username
|
||||
string passwd = 5; //passwd
|
||||
string nickname = 6; //nickname
|
||||
string phone = 7; //phone
|
||||
int64 roleType = 8; //roleType
|
||||
bool isVerified = 9; //isVerified
|
||||
bool state = 10; //state
|
||||
int64 createdAt = 11; //createdAt
|
||||
int64 updatedAt = 12; //updatedAt
|
||||
int64 deletedAt = 13; //deletedAt
|
||||
optional int64 page = 1; //page
|
||||
optional int64 limit = 2; //limit
|
||||
optional int64 id = 3; //id
|
||||
optional string username = 4; //username
|
||||
optional string passwordHash = 5; //passwordHash
|
||||
optional string phone = 6; //phone
|
||||
optional string email = 7; //email
|
||||
optional string nickname = 8; //nickname
|
||||
optional string avatar = 9; //avatar
|
||||
optional string bio = 10; //bio
|
||||
optional string currentRole = 11; //currentRole
|
||||
repeated string verifiedRoles = 12; //verifiedRoles
|
||||
optional string verificationStatus = 13; //verificationStatus
|
||||
optional bool isAdmin = 14; //isAdmin
|
||||
optional int64 createdAt = 15; //createdAt
|
||||
optional int64 updatedAt = 16; //updatedAt
|
||||
optional int64 deletedAt = 17; //deletedAt
|
||||
}
|
||||
|
||||
message SearchUsersResp {
|
||||
@@ -121,7 +137,7 @@ message ValidateTokenResp {
|
||||
bool valid = 1; // token 是否有效(不在黑名单中)
|
||||
string message = 2; // 验证失败原因
|
||||
int64 userId = 3; // 用户ID
|
||||
int64 roleType = 4; // 用户角色
|
||||
string roleType = 4; // 用户角色
|
||||
}
|
||||
|
||||
message CheckPermissionReq {
|
||||
@@ -156,7 +172,17 @@ message LogoutResp {
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------
|
||||
message ResetPasswordReq {
|
||||
string newPassword = 1;
|
||||
string email = 2;
|
||||
string requestId = 3;
|
||||
string vcode = 4;
|
||||
}
|
||||
|
||||
message ResetPasswordResp {
|
||||
|
||||
}
|
||||
// ------------------------------------
|
||||
// Rpc Func
|
||||
// ------------------------------------
|
||||
|
||||
@@ -174,4 +200,5 @@ service usercenter {
|
||||
rpc ValidateToken(ValidateTokenReq) returns (ValidateTokenResp);
|
||||
rpc CheckPermission(CheckPermissionReq) returns (CheckPermissionResp);
|
||||
rpc Logout(LogoutReq) returns (LogoutResp);
|
||||
}
|
||||
rpc ResetPassword(ResetPasswordReq) returns (ResetPasswordResp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user