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:
masoodafar-web
2026-01-30 08:53:09 +03:30
parent 96daf899c7
commit 658d076bdf
170 changed files with 3770 additions and 4364 deletions
@@ -1,21 +0,0 @@
using CMSMicroservice.Application.UserCartsCQ.Queries.GetAllUserCartsByFilter;
namespace CMSMicroservice.Application.Common.Mappings;
public class UserCartsProfile : IRegister
{
void IRegister.Register(TypeAdapterConfig config)
{
config.NewConfig<UserCart,GetAllUserCartsByFilterResponseModel>()
.Map(dest => dest.Id, src => src.Id)
.Map(dest => dest.Count, src => src.Count)
.Map(dest => dest.ProductId, src => src.ProductId)
.Map(dest => dest.ProductTitle, src => src.Product.Title)
.Map(dest => dest.ProductShortInfomation, src => src.Product.ShortInfomation)
.Map(dest => dest.ProductDiscount, src => src.Product.Discount)
.Map(dest => dest.ProductPrice, src => src.Product.Price)
.Map(dest => dest.ProductThumbnailPath, src => src.Product.ThumbnailPath)
.Map(dest => dest.Created, src => src.Created)
;
}
}
@@ -1,58 +0,0 @@
using CMSMicroservice.Application.UserOrderCQ.Queries.GetAllUserOrderByFilter;
using CMSMicroservice.Application.UserOrderCQ.Queries.GetUserOrder;
namespace CMSMicroservice.Application.Common.Mappings;
public class UserOrderProfile : IRegister
{
void IRegister.Register(TypeAdapterConfig config)
{
config.NewConfig<UserOrder,GetUserOrderResponseDto>()
.Map(dest => dest.Id, src => src.Id)
.Map(dest => dest.Amount, src => src.Amount)
.Map(dest => dest.PackageId, src => src.PackageId)
.Map(dest => dest.TransactionId, src => src.TransactionId)
.Map(dest => dest.PaymentStatus, src => src.PaymentStatus)
.Map(dest => dest.PaymentDate, src => src.PaymentDate)
.Map(dest => dest.UserId, src => src.UserId)
.Map(dest => dest.UserAddressId, src => src.UserAddressId)
.Map(dest => dest.PaymentMethod, src => src.PaymentMethod)
.Map(dest => dest.UserAddressText, src => src.UserAddress.Address)
.Map(dest => dest.FactorDetails, src => src.FactorDetails.Select(s=>s.Adapt<GetUserOrderResponseFactorDetail>()))
;
config.NewConfig<UserOrder,GetAllUserOrderByFilterResponseModel>()
.Map(dest => dest.Id, src => src.Id)
.Map(dest => dest.Amount, src => src.Amount)
.Map(dest => dest.PackageId, src => src.PackageId)
.Map(dest => dest.TransactionId, src => src.TransactionId)
.Map(dest => dest.PaymentStatus, src => src.PaymentStatus)
.Map(dest => dest.PaymentDate, src => src.PaymentDate)
.Map(dest => dest.UserId, src => src.UserId)
.Map(dest => dest.UserAddressId, src => src.UserAddressId)
.Map(dest => dest.PaymentMethod, src => src.PaymentMethod)
.Map(dest => dest.UserAddressText, src => src.UserAddress.Address)
.Map(dest => dest.FactorDetails, src => src.FactorDetails.Select(s=>s.Adapt<GetUserOrderResponseFactorDetail>()))
;
config.NewConfig<FactorDetails,GetUserOrderResponseFactorDetail>()
.Map(dest => dest.ProductId, src => src.ProductId)
.Map(dest => dest.ProductTitle, src => src.Product.Title)
.Map(dest => dest.ProductThumbnailPath, src => src.Product.ThumbnailPath)
.Map(dest => dest.UnitPrice, src => src.Product.Price)
.Map(dest => dest.Count, src => src.Count)
.Map(dest => dest.UnitDiscountPrice, src => src.Product.Price*(src.Product.Discount/100))
;
config.NewConfig<FactorDetails,GetAllUserOrderByFilterResponseModelFactorDetail>()
.Map(dest => dest.ProductId, src => src.ProductId)
.Map(dest => dest.ProductTitle, src => src.Product.Title)
.Map(dest => dest.ProductThumbnailPath, src => src.Product.ThumbnailPath)
.Map(dest => dest.UnitPrice, src => src.Product.Price)
.Map(dest => dest.Count, src => src.Count)
.Map(dest => dest.UnitDiscountPrice, src => src.Product.Price*(src.Product.Discount/100))
;
}
}