This commit is contained in:
masoodafar-web
2025-11-27 03:14:43 +03:30
parent b18e131e31
commit ad3cc728df
13 changed files with 318 additions and 2 deletions

View File

@@ -40,6 +40,26 @@ service ProductsContract
get: "/GetAllProductsByFilter"
};
};
rpc AddProductImage(AddProductImageRequest) returns (AddProductImageResponse){
option (google.api.http) = {
post: "/AddProductImage"
body: "*"
};
};
rpc GetProductGallery(GetProductGalleryRequest) returns (GetProductGalleryResponse){
option (google.api.http) = {
get: "/GetProductGallery"
};
};
rpc RemoveProductImage(RemoveProductImageRequest) returns (google.protobuf.Empty){
option (google.api.http) = {
delete: "/RemoveProductImage"
body: "*"
};
};
}
message ImageFileModel
@@ -174,3 +194,42 @@ message DecimalValue
sfixed32 nanos = 2;
}
message AddProductImageRequest
{
int64 product_id = 1;
string title = 2;
ImageFileModel image_file = 3;
}
message AddProductImageResponse
{
int64 product_gallery_id = 1;
int64 product_image_id = 2;
string title = 3;
string image_path = 4;
string image_thumbnail_path = 5;
}
message GetProductGalleryRequest
{
int64 product_id = 1;
}
message ProductGalleryItem
{
int64 product_gallery_id = 1;
int64 product_image_id = 2;
string title = 3;
string image_path = 4;
string image_thumbnail_path = 5;
}
message GetProductGalleryResponse
{
repeated ProductGalleryItem items = 1;
}
message RemoveProductImageRequest
{
int64 product_gallery_id = 1;
}