126 lines
2.5 KiB
Protocol Buffer
126 lines
2.5 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package role;
|
|
|
|
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 = "FrontOffice.BFF.Role.Protobuf.Protos.Role";
|
|
|
|
service RoleContract
|
|
{
|
|
rpc CreateNewRole(CreateNewRoleRequest) returns (CreateNewRoleResponse){
|
|
option (google.api.http) = {
|
|
post: "/CreateNewRole"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc UpdateRole(UpdateRoleRequest) returns (google.protobuf.Empty){
|
|
option (google.api.http) = {
|
|
put: "/UpdateRole"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc DeleteRole(DeleteRoleRequest) returns (google.protobuf.Empty){
|
|
option (google.api.http) = {
|
|
delete: "/DeleteRole"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc GetRole(GetRoleRequest) returns (GetRoleResponse){
|
|
option (google.api.http) = {
|
|
get: "/GetRole"
|
|
|
|
};
|
|
};
|
|
rpc GetAllRoleByFilter(GetAllRoleByFilterRequest) returns (GetAllRoleByFilterResponse){
|
|
option (google.api.http) = {
|
|
get: "/GetAllRoleByFilter"
|
|
|
|
};
|
|
};
|
|
}
|
|
message CreateNewRoleRequest
|
|
{
|
|
string name = 1;
|
|
string title = 2;
|
|
}
|
|
message CreateNewRoleResponse
|
|
{
|
|
int64 id = 1;
|
|
}
|
|
message UpdateRoleRequest
|
|
{
|
|
int64 id = 1;
|
|
string name = 2;
|
|
string title = 3;
|
|
}
|
|
message DeleteRoleRequest
|
|
{
|
|
int64 id = 1;
|
|
}
|
|
message GetRoleRequest
|
|
{
|
|
int64 id = 1;
|
|
}
|
|
message GetRoleResponse
|
|
{
|
|
int64 id = 1;
|
|
string name = 2;
|
|
string title = 3;
|
|
}
|
|
message GetAllRoleByFilterRequest
|
|
{
|
|
PaginationState pagination_state = 1;
|
|
google.protobuf.StringValue sort_by = 2;
|
|
GetAllRoleByFilterFilter filter = 3;
|
|
}
|
|
message GetAllRoleByFilterFilter
|
|
{
|
|
google.protobuf.Int64Value id = 1;
|
|
google.protobuf.StringValue name = 2;
|
|
google.protobuf.StringValue title = 3;
|
|
}
|
|
message GetAllRoleByFilterResponse
|
|
{
|
|
MetaData meta_data = 1;
|
|
repeated GetAllRoleByFilterResponseModel models = 2;
|
|
}
|
|
message GetAllRoleByFilterResponseModel
|
|
{
|
|
int64 id = 1;
|
|
string name = 2;
|
|
string title = 3;
|
|
}
|
|
|
|
message PaginationState
|
|
{
|
|
int32 page_number = 1;
|
|
|
|
int32 page_size = 2;
|
|
}
|
|
message MetaData
|
|
{
|
|
int64 current_page = 1;
|
|
|
|
int64 total_page = 2;
|
|
|
|
int64 page_size = 3;
|
|
|
|
int64 total_count = 4;
|
|
|
|
bool has_previous = 5;
|
|
|
|
bool has_next = 6;
|
|
}
|
|
message DecimalValue
|
|
{
|
|
|
|
int64 units = 1;
|
|
|
|
sfixed32 nanos = 2;
|
|
}
|