2025-11-17 01:20:07 +03:30
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
|
|
package products;
|
|
|
|
|
|
|
|
|
|
import "google/protobuf/empty.proto";
|
|
|
|
|
import "google/protobuf/wrappers.proto";
|
2025-11-21 04:19:33 +03:30
|
|
|
import "google/protobuf/duration.proto";
|
2025-11-17 01:20:07 +03:30
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
|
|
|
|
|
|
option csharp_namespace = "FrontOffice.BFF.Products.Protobuf.Protos.Products";
|
|
|
|
|
|
|
|
|
|
service ProductsContract
|
|
|
|
|
{
|
2025-11-21 04:19:33 +03:30
|
|
|
rpc GetProducts(GetProductsRequest) returns (GetProductsResponse){
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
get: "/GetProducts"
|
|
|
|
|
|
2025-11-17 01:20:07 +03:30
|
|
|
};
|
2025-11-21 04:19:33 +03:30
|
|
|
};
|
|
|
|
|
rpc GetAllProductsByFilter(GetAllProductsByFilterRequest) returns (GetAllProductsByFilterResponse){
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
get: "/GetAllProductsByFilter"
|
|
|
|
|
|
2025-11-17 01:20:07 +03:30
|
|
|
};
|
2025-11-21 04:19:33 +03:30
|
|
|
};
|
2025-11-17 01:20:07 +03:30
|
|
|
}
|
|
|
|
|
message GetProductsRequest
|
|
|
|
|
{
|
2025-11-21 04:19:33 +03:30
|
|
|
int64 id = 1;
|
2025-11-17 01:20:07 +03:30
|
|
|
}
|
|
|
|
|
message GetProductsResponse
|
|
|
|
|
{
|
2025-11-21 04:19:33 +03:30
|
|
|
int64 id = 1;
|
|
|
|
|
string title = 2;
|
|
|
|
|
string description = 3;
|
|
|
|
|
string short_infomation = 4;
|
|
|
|
|
string full_information = 5;
|
|
|
|
|
int64 price = 6;
|
|
|
|
|
int32 discount = 7;
|
|
|
|
|
int32 rate = 8;
|
|
|
|
|
string image_path = 9;
|
|
|
|
|
string thumbnail_path = 10;
|
|
|
|
|
int32 sale_count = 11;
|
|
|
|
|
int32 view_count = 12;
|
|
|
|
|
int32 remaining_count = 13;
|
2025-11-17 01:20:07 +03:30
|
|
|
}
|
2025-11-17 20:42:57 +03:30
|
|
|
message GetAllProductsByFilterRequest
|
|
|
|
|
{
|
2025-11-21 04:19:33 +03:30
|
|
|
PaginationState pagination_state = 1;
|
|
|
|
|
google.protobuf.StringValue sort_by = 2;
|
|
|
|
|
GetAllProductsByFilterFilter filter = 3;
|
2025-11-17 20:42:57 +03:30
|
|
|
}
|
2025-11-17 01:20:07 +03:30
|
|
|
message GetAllProductsByFilterFilter
|
|
|
|
|
{
|
2025-11-21 04:19:33 +03:30
|
|
|
google.protobuf.Int64Value id = 1;
|
|
|
|
|
google.protobuf.StringValue title = 2;
|
|
|
|
|
google.protobuf.StringValue description = 3;
|
|
|
|
|
google.protobuf.StringValue short_infomation = 4;
|
|
|
|
|
google.protobuf.StringValue full_information = 5;
|
|
|
|
|
google.protobuf.Int64Value price = 6;
|
|
|
|
|
google.protobuf.Int32Value discount = 7;
|
|
|
|
|
google.protobuf.Int32Value rate = 8;
|
2025-11-17 01:20:07 +03:30
|
|
|
}
|
2025-11-17 20:42:57 +03:30
|
|
|
message GetAllProductsByFilterResponse
|
|
|
|
|
{
|
2025-11-21 04:19:33 +03:30
|
|
|
MetaData meta_data = 1;
|
|
|
|
|
repeated GetAllProductsByFilterResponseModel models = 2;
|
2025-11-17 20:42:57 +03:30
|
|
|
}
|
2025-11-17 01:20:07 +03:30
|
|
|
message GetAllProductsByFilterResponseModel
|
|
|
|
|
{
|
2025-11-21 04:19:33 +03:30
|
|
|
int64 id = 1;
|
|
|
|
|
string title = 2;
|
|
|
|
|
string description = 3;
|
|
|
|
|
string short_infomation = 4;
|
|
|
|
|
string full_information = 5;
|
|
|
|
|
int64 price = 6;
|
|
|
|
|
int32 discount = 7;
|
|
|
|
|
int32 rate = 8;
|
|
|
|
|
string image_path = 9;
|
|
|
|
|
string thumbnail_path = 10;
|
|
|
|
|
int32 sale_count = 11;
|
|
|
|
|
int32 view_count = 12;
|
|
|
|
|
int32 remaining_count = 13;
|
2025-11-17 01:20:07 +03:30
|
|
|
}
|
|
|
|
|
|
2025-11-21 04:19:33 +03:30
|
|
|
message PaginationState
|
|
|
|
|
{
|
|
|
|
|
int32 page_number = 1;
|
2025-11-17 01:20:07 +03:30
|
|
|
|
2025-11-21 04:19:33 +03:30
|
|
|
int32 page_size = 2;
|
|
|
|
|
}
|
|
|
|
|
message MetaData
|
|
|
|
|
{
|
|
|
|
|
int64 current_page = 1;
|
2025-11-17 01:20:07 +03:30
|
|
|
|
2025-11-21 04:19:33 +03:30
|
|
|
int64 total_page = 2;
|
2025-11-17 01:20:07 +03:30
|
|
|
|
2025-11-21 04:19:33 +03:30
|
|
|
int64 page_size = 3;
|
2025-11-17 01:20:07 +03:30
|
|
|
|
2025-11-21 04:19:33 +03:30
|
|
|
int64 total_count = 4;
|
2025-11-17 01:20:07 +03:30
|
|
|
|
2025-11-21 04:19:33 +03:30
|
|
|
bool has_previous = 5;
|
2025-11-17 01:20:07 +03:30
|
|
|
|
2025-11-21 04:19:33 +03:30
|
|
|
bool has_next = 6;
|
|
|
|
|
}
|
|
|
|
|
message DecimalValue
|
|
|
|
|
{
|
2025-11-17 01:20:07 +03:30
|
|
|
|
2025-11-21 04:19:33 +03:30
|
|
|
int64 units = 1;
|
2025-11-17 01:20:07 +03:30
|
|
|
|
2025-11-21 04:19:33 +03:30
|
|
|
sfixed32 nanos = 2;
|
|
|
|
|
}
|
2025-11-17 01:20:07 +03:30
|
|
|
|