2025-09-27 08:46:36 +03:30
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
|
|
package user;
|
|
|
|
|
|
|
|
|
|
import "public_messages.proto";
|
|
|
|
|
import "google/protobuf/empty.proto";
|
|
|
|
|
import "google/protobuf/wrappers.proto";
|
|
|
|
|
import "google/protobuf/duration.proto";
|
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
|
|
|
|
|
|
option csharp_namespace = "CMSMicroservice.Protobuf.Protos.User";
|
|
|
|
|
|
|
|
|
|
service UserContract
|
|
|
|
|
{
|
|
|
|
|
rpc CreateNewUser(CreateNewUserRequest) returns (CreateNewUserResponse){
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/CreateNewUser"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
rpc UpdateUser(UpdateUserRequest) returns (google.protobuf.Empty){
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
put: "/UpdateUser"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
rpc DeleteUser(DeleteUserRequest) returns (google.protobuf.Empty){
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
delete: "/DeleteUser"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
rpc GetUser(GetUserRequest) returns (GetUserResponse){
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
get: "/GetUser"
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
rpc GetAllUserByFilter(GetAllUserByFilterRequest) returns (GetAllUserByFilterResponse){
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
get: "/GetAllUserByFilter"
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
};
|
2025-09-27 23:59:05 +03:30
|
|
|
rpc GetJwtToken(GetJwtTokenRequest) returns (GetJwtTokenResponse){
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
get: "/GetJwtToken"
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
};
|
2025-09-27 08:46:36 +03:30
|
|
|
}
|
|
|
|
|
message CreateNewUserRequest
|
|
|
|
|
{
|
|
|
|
|
google.protobuf.StringValue first_name = 1;
|
|
|
|
|
google.protobuf.StringValue last_name = 2;
|
|
|
|
|
string mobile = 3;
|
|
|
|
|
google.protobuf.StringValue national_code = 4;
|
|
|
|
|
google.protobuf.StringValue avatar_path = 5;
|
|
|
|
|
google.protobuf.Int64Value parent_id = 6;
|
|
|
|
|
}
|
|
|
|
|
message CreateNewUserResponse
|
|
|
|
|
{
|
|
|
|
|
int64 id = 1;
|
|
|
|
|
}
|
|
|
|
|
message UpdateUserRequest
|
|
|
|
|
{
|
|
|
|
|
int64 id = 1;
|
|
|
|
|
google.protobuf.StringValue first_name = 2;
|
|
|
|
|
google.protobuf.StringValue last_name = 3;
|
2025-09-27 23:48:41 +03:30
|
|
|
google.protobuf.StringValue national_code = 4;
|
|
|
|
|
google.protobuf.StringValue avatar_path = 5;
|
2025-09-28 06:30:13 +03:30
|
|
|
bool is_rules_accepted = 6;
|
|
|
|
|
google.protobuf.Timestamp rules_accepted_at = 7;
|
2025-09-27 08:46:36 +03:30
|
|
|
}
|
|
|
|
|
message DeleteUserRequest
|
|
|
|
|
{
|
|
|
|
|
int64 id = 1;
|
|
|
|
|
}
|
|
|
|
|
message GetUserRequest
|
|
|
|
|
{
|
|
|
|
|
int64 id = 1;
|
|
|
|
|
}
|
|
|
|
|
message GetUserResponse
|
|
|
|
|
{
|
|
|
|
|
int64 id = 1;
|
|
|
|
|
google.protobuf.StringValue first_name = 2;
|
|
|
|
|
google.protobuf.StringValue last_name = 3;
|
|
|
|
|
string mobile = 4;
|
|
|
|
|
google.protobuf.StringValue national_code = 5;
|
|
|
|
|
google.protobuf.StringValue avatar_path = 6;
|
|
|
|
|
google.protobuf.Int64Value parent_id = 7;
|
2025-09-27 23:48:41 +03:30
|
|
|
string referral_code = 8;
|
|
|
|
|
bool is_mobile_verified = 9;
|
|
|
|
|
google.protobuf.Timestamp mobile_verified_at = 10;
|
2025-09-27 08:46:36 +03:30
|
|
|
}
|
|
|
|
|
message GetAllUserByFilterRequest
|
|
|
|
|
{
|
|
|
|
|
messages.PaginationState pagination_state = 1;
|
|
|
|
|
google.protobuf.StringValue sort_by = 2;
|
|
|
|
|
GetAllUserByFilterFilter filter = 3;
|
|
|
|
|
}
|
|
|
|
|
message GetAllUserByFilterFilter
|
|
|
|
|
{
|
|
|
|
|
google.protobuf.Int64Value id = 1;
|
|
|
|
|
google.protobuf.StringValue first_name = 2;
|
|
|
|
|
google.protobuf.StringValue last_name = 3;
|
|
|
|
|
google.protobuf.StringValue mobile = 4;
|
|
|
|
|
google.protobuf.StringValue national_code = 5;
|
|
|
|
|
google.protobuf.StringValue avatar_path = 6;
|
|
|
|
|
google.protobuf.Int64Value parent_id = 7;
|
2025-09-27 23:48:41 +03:30
|
|
|
google.protobuf.StringValue referral_code = 8;
|
|
|
|
|
google.protobuf.BoolValue is_mobile_verified = 9;
|
|
|
|
|
google.protobuf.Timestamp mobile_verified_at = 10;
|
2025-09-27 08:46:36 +03:30
|
|
|
}
|
|
|
|
|
message GetAllUserByFilterResponse
|
|
|
|
|
{
|
|
|
|
|
messages.MetaData meta_data = 1;
|
|
|
|
|
repeated GetAllUserByFilterResponseModel models = 2;
|
|
|
|
|
}
|
|
|
|
|
message GetAllUserByFilterResponseModel
|
|
|
|
|
{
|
|
|
|
|
int64 id = 1;
|
|
|
|
|
google.protobuf.StringValue first_name = 2;
|
|
|
|
|
google.protobuf.StringValue last_name = 3;
|
|
|
|
|
string mobile = 4;
|
|
|
|
|
google.protobuf.StringValue national_code = 5;
|
|
|
|
|
google.protobuf.StringValue avatar_path = 6;
|
|
|
|
|
google.protobuf.Int64Value parent_id = 7;
|
2025-09-27 23:48:41 +03:30
|
|
|
string referral_code = 8;
|
|
|
|
|
bool is_mobile_verified = 9;
|
|
|
|
|
google.protobuf.Timestamp mobile_verified_at = 10;
|
2025-09-27 08:46:36 +03:30
|
|
|
}
|
2025-09-27 23:59:05 +03:30
|
|
|
message GetJwtTokenRequest
|
|
|
|
|
{
|
|
|
|
|
int64 id = 1;
|
|
|
|
|
}
|
|
|
|
|
message GetJwtTokenResponse
|
|
|
|
|
{
|
|
|
|
|
string token = 1;
|
|
|
|
|
}
|