Complete FrontOffice BFF to CMS Migration
- Migrated all 9 services from FrontOffice.BFF to CMS architecture - Enhanced user.proto with 7 additional Customer API endpoints: * UpdateCustomerProfile, GetCustomerProfile * ChangeCustomerPassword with validation * GetCustomerReferrals with commission stats * UploadCustomerAvatar with file validation * GetCustomerSettings, UpdateCustomerSettings - All services now support Customer endpoints with /Customer/ prefix - Mock implementations with realistic Persian data - Fixed namespace conflicts and compilation issues - Comprehensive testing completed for all endpoints - Services migrated: Categories, City, UserCarts, Products, UserWallet, Transaction, UserOrder, Package, User (enhanced)
This commit is contained in:
@@ -66,6 +66,19 @@ service ProductsContract
|
||||
body: "*"
|
||||
};
|
||||
};
|
||||
|
||||
// ============= Customer-specific Methods =============
|
||||
|
||||
rpc GetCustomerProducts(GetProductsRequest) returns (GetProductsResponse){
|
||||
option (google.api.http) = {
|
||||
get: "/Customer/GetProduct"
|
||||
};
|
||||
};
|
||||
rpc GetCustomerProductsByFilter(GetAllProductsByFilterRequest) returns (GetCustomerProductsByFilterResponse){
|
||||
option (google.api.http) = {
|
||||
get: "/Customer/GetProducts"
|
||||
};
|
||||
};
|
||||
}
|
||||
message CreateNewProductsRequest
|
||||
{
|
||||
@@ -129,8 +142,17 @@ message GetProductsResponse
|
||||
int32 sale_count = 11;
|
||||
int32 view_count = 12;
|
||||
int32 remaining_count = 13;
|
||||
// لیست شناسه دستهبندیهای محصول
|
||||
repeated int64 category_ids = 14;
|
||||
repeated ProductGalleryItem gallery = 14;
|
||||
repeated ProductCategoryPath categories = 15;
|
||||
}
|
||||
|
||||
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 GetAllProductsByFilterRequest
|
||||
{
|
||||
@@ -179,6 +201,44 @@ message GetAllProductsByFilterResponseModel
|
||||
repeated int64 category_ids = 14;
|
||||
}
|
||||
|
||||
message GetCustomerProductsByFilterResponse
|
||||
{
|
||||
messages.MetaData meta_data = 1;
|
||||
repeated GetCustomerProductsByFilterResponseModel models = 2;
|
||||
}
|
||||
|
||||
message GetCustomerProductsByFilterResponseModel
|
||||
{
|
||||
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;
|
||||
repeated ProductCategoryPath categories = 14;
|
||||
}
|
||||
|
||||
message ProductCategoryPath
|
||||
{
|
||||
int64 category_id = 1;
|
||||
string title = 2;
|
||||
repeated CategoryNode path = 3;
|
||||
}
|
||||
|
||||
message CategoryNode
|
||||
{
|
||||
int64 id = 1;
|
||||
string title = 2;
|
||||
google.protobuf.Int64Value parent_id = 3;
|
||||
}
|
||||
|
||||
// Bulk Update Product Prices
|
||||
message BulkUpdateProductPricesRequest
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user