2025-11-20 00:26:12 +03:30
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
|
|
package shopingcart;
|
|
|
|
|
|
|
|
|
|
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.ShopingCart.Protobuf.Protos.ShopingCart";
|
|
|
|
|
|
|
|
|
|
service ShopingCartContract
|
|
|
|
|
{
|
|
|
|
|
rpc AddNewUserCart(AddNewUserCartRequest) returns (google.protobuf.Empty){
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/AddNewUserCart"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
rpc GetAllUserCart(google.protobuf.Empty) returns (GetAllUserCartResponse){
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
get: "/GetAllUserCart"
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
rpc UpdateUserCart(UpdateUserCartRequest) returns (google.protobuf.Empty){
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/UpdateUserCart"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
message AddNewUserCartRequest
|
|
|
|
|
{
|
|
|
|
|
int64 product_id = 1;
|
|
|
|
|
int32 count = 2;
|
|
|
|
|
}
|
|
|
|
|
message GetAllUserCartResponse
|
|
|
|
|
{
|
|
|
|
|
MetaData meta_data = 1;
|
2025-11-21 04:50:04 +03:30
|
|
|
repeated GetAllUserCartResponseModel models = 2;
|
2025-11-20 00:26:12 +03:30
|
|
|
}
|
2025-11-21 04:50:04 +03:30
|
|
|
message GetAllUserCartResponseModel
|
2025-11-20 00:26:12 +03:30
|
|
|
{
|
|
|
|
|
int64 id = 1;
|
2025-11-21 04:50:04 +03:30
|
|
|
string product_title = 2;
|
|
|
|
|
string product_short_infomation = 3;
|
|
|
|
|
int64 product_price = 4;
|
|
|
|
|
int32 product_discount = 5;
|
|
|
|
|
string product_thumbnail_path = 6;
|
|
|
|
|
int32 count = 7;
|
|
|
|
|
google.protobuf.Timestamp created = 8;
|
2025-11-21 07:37:25 +03:30
|
|
|
int64 product_id = 9;
|
2025-11-20 00:26:12 +03:30
|
|
|
}
|
|
|
|
|
message UpdateUserCartRequest
|
|
|
|
|
{
|
|
|
|
|
int64 user_cart_id = 1;
|
|
|
|
|
int32 count = 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|