Generator Changes at 11/25/2025 2:22:16 AM +03:30

This commit is contained in:
masoodafar-web
2025-11-25 02:25:35 +03:30
parent c20b2432fb
commit 50ccd10e24
25 changed files with 783 additions and 7 deletions

View File

@@ -10,7 +10,7 @@ public class GeneralMapping : IRegister
config.NewConfig<decimal, string>()
.MapWith(src => src.ToString("R", new CultureInfo("en-us")));
config.NewConfig<decimal?, string>()
.MapWith(src => src == null ? string.Empty : src.Value.ToString("R", new CultureInfo("en-us")));

View File

@@ -0,0 +1,10 @@
namespace FrontOffice.BFF.WebApi.Common.Mappings;
public class UserWalletProfile : IRegister
{
void IRegister.Register(TypeAdapterConfig config)
{
//config.NewConfig<Source,Destination>()
// .Map(dest => dest.FullName, src => $"{src.Firstname} {src.Lastname}");
}
}

View File

@@ -0,0 +1,32 @@
using FrontOffice.BFF.Protobuf.Protos.UserWallet;
using FrontOffice.BFF.WebApi.Common.Services;
using FrontOffice.BFF.Application.UserWalletCQ.Queries.GetAllUserWalletChangeLog;
using FrontOffice.BFF.Application.UserWalletCQ.Queries.GetUserWallet;
using FrontOffice.BFF.Application.UserWalletCQ.Commands.TransferUserWalletBallance;
using FrontOffice.BFF.Application.UserWalletCQ.Commands.WithdrawBalance;
namespace FrontOffice.BFF.WebApi.Services;
public class UserWalletService : UserWalletContract.UserWalletContractBase
{
private readonly IDispatchRequestToCQRS _dispatchRequestToCQRS;
public UserWalletService(IDispatchRequestToCQRS dispatchRequestToCQRS)
{
_dispatchRequestToCQRS = dispatchRequestToCQRS;
}
public override async Task<Empty> GetAllUserWalletChangeLog(Empty request, ServerCallContext context)
{
return await _dispatchRequestToCQRS.Handle<GetAllUserWalletChangeLogQuery, Empty>(context);
}
public override async Task<GetUserWalletResponse> GetUserWallet(Empty request, ServerCallContext context)
{
return await _dispatchRequestToCQRS.Handle<GetUserWalletQuery, GetUserWalletResponse>(context);
}
public override async Task<Empty> TransferUserWalletBallance(Empty request, ServerCallContext context)
{
return await _dispatchRequestToCQRS.Handle<TransferUserWalletBallanceCommand, Empty>(context);
}
public override async Task<GetAllUserWalletChangeLogResponse> WithdrawBalance(Empty request, ServerCallContext context)
{
return await _dispatchRequestToCQRS.Handle<WithdrawBalanceCommand, GetAllUserWalletChangeLogResponse>(context);
}
}