Generator Changes at 11/25/2025 2:22:16 AM +03:30
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
namespace FrontOffice.BFF.Application.UserWalletCQ.Commands.TransferUserWalletBallance;
|
||||
public record TransferUserWalletBallanceCommand : IRequest<Unit>
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace FrontOffice.BFF.Application.UserWalletCQ.Commands.TransferUserWalletBallance;
|
||||
public class TransferUserWalletBallanceCommandHandler : IRequestHandler<TransferUserWalletBallanceCommand, Unit>
|
||||
{
|
||||
private readonly IApplicationContractContext _context;
|
||||
|
||||
public TransferUserWalletBallanceCommandHandler(IApplicationContractContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public async Task<Unit> Handle(TransferUserWalletBallanceCommand request, CancellationToken cancellationToken)
|
||||
{
|
||||
//TODO: Implement your business logic
|
||||
return new Unit();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace FrontOffice.BFF.Application.UserWalletCQ.Commands.TransferUserWalletBallance;
|
||||
public class TransferUserWalletBallanceCommandValidator : AbstractValidator<Unit>
|
||||
{
|
||||
public TransferUserWalletBallanceCommandValidator()
|
||||
{
|
||||
}
|
||||
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
||||
{
|
||||
var result = await ValidateAsync(ValidationContext<Unit>.CreateWithOptions((Unit)model, x => x.IncludeProperties(propertyName)));
|
||||
if (result.IsValid)
|
||||
return Array.Empty<string>();
|
||||
return result.Errors.Select(e => e.ErrorMessage);
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
namespace FrontOffice.BFF.Application.UserWalletCQ.Commands.WithdrawBalance;
|
||||
public record WithdrawBalanceCommand : IRequest<WithdrawBalanceResponseDto>
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace FrontOffice.BFF.Application.UserWalletCQ.Commands.WithdrawBalance;
|
||||
public class WithdrawBalanceCommandHandler : IRequestHandler<WithdrawBalanceCommand, WithdrawBalanceResponseDto>
|
||||
{
|
||||
private readonly IApplicationContractContext _context;
|
||||
|
||||
public WithdrawBalanceCommandHandler(IApplicationContractContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public async Task<WithdrawBalanceResponseDto> Handle(WithdrawBalanceCommand request, CancellationToken cancellationToken)
|
||||
{
|
||||
//TODO: Implement your business logic
|
||||
return new WithdrawBalanceResponseDto();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace FrontOffice.BFF.Application.UserWalletCQ.Commands.WithdrawBalance;
|
||||
public class WithdrawBalanceCommandValidator : AbstractValidator<Unit>
|
||||
{
|
||||
public WithdrawBalanceCommandValidator()
|
||||
{
|
||||
}
|
||||
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
||||
{
|
||||
var result = await ValidateAsync(ValidationContext<Unit>.CreateWithOptions((Unit)model, x => x.IncludeProperties(propertyName)));
|
||||
if (result.IsValid)
|
||||
return Array.Empty<string>();
|
||||
return result.Errors.Select(e => e.ErrorMessage);
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
namespace FrontOffice.BFF.Application.UserWalletCQ.Commands.WithdrawBalance;
|
||||
public class WithdrawBalanceResponseDto
|
||||
{
|
||||
//متادیتا
|
||||
public MetaData MetaData { get; set; }
|
||||
//مدل خروجی
|
||||
public List<GetAllUserWalletChangeLogResponseModel>? Models { get; set; }
|
||||
|
||||
}public class GetAllUserWalletChangeLogResponseModel
|
||||
{
|
||||
//موجودی
|
||||
public long CurrentBalance { get; set; }
|
||||
//تغییر موجودی
|
||||
public long ChangeValue { get; set; }
|
||||
//موجودی جاری شبکه
|
||||
public long CurrentNetworkBalance { get; set; }
|
||||
//تغییر موجودی شبکه
|
||||
public long ChangeNerworkValue { get; set; }
|
||||
//افزایشی؟
|
||||
public bool IsIncrease { get; set; }
|
||||
//شناسه ارجاع
|
||||
public long? RefrenceId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
namespace FrontOffice.BFF.Application.UserWalletCQ.Queries.GetAllUserWalletChangeLog;
|
||||
public record GetAllUserWalletChangeLogQuery : IRequest<Unit>
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace FrontOffice.BFF.Application.UserWalletCQ.Queries.GetAllUserWalletChangeLog;
|
||||
public class GetAllUserWalletChangeLogQueryHandler : IRequestHandler<GetAllUserWalletChangeLogQuery, Unit>
|
||||
{
|
||||
private readonly IApplicationContractContext _context;
|
||||
|
||||
public GetAllUserWalletChangeLogQueryHandler(IApplicationContractContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public async Task<Unit> Handle(GetAllUserWalletChangeLogQuery request, CancellationToken cancellationToken)
|
||||
{
|
||||
//TODO: Implement your business logic
|
||||
return new Unit();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace FrontOffice.BFF.Application.UserWalletCQ.Queries.GetAllUserWalletChangeLog;
|
||||
public class GetAllUserWalletChangeLogQueryValidator : AbstractValidator<Unit>
|
||||
{
|
||||
public GetAllUserWalletChangeLogQueryValidator()
|
||||
{
|
||||
}
|
||||
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
||||
{
|
||||
var result = await ValidateAsync(ValidationContext<Unit>.CreateWithOptions((Unit)model, x => x.IncludeProperties(propertyName)));
|
||||
if (result.IsValid)
|
||||
return Array.Empty<string>();
|
||||
return result.Errors.Select(e => e.ErrorMessage);
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
namespace FrontOffice.BFF.Application.UserWalletCQ.Queries.GetUserWallet;
|
||||
public record GetUserWalletQuery : IRequest<GetUserWalletResponseDto>
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace FrontOffice.BFF.Application.UserWalletCQ.Queries.GetUserWallet;
|
||||
public class GetUserWalletQueryHandler : IRequestHandler<GetUserWalletQuery, GetUserWalletResponseDto>
|
||||
{
|
||||
private readonly IApplicationContractContext _context;
|
||||
|
||||
public GetUserWalletQueryHandler(IApplicationContractContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public async Task<GetUserWalletResponseDto> Handle(GetUserWalletQuery request, CancellationToken cancellationToken)
|
||||
{
|
||||
//TODO: Implement your business logic
|
||||
return new GetUserWalletResponseDto();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace FrontOffice.BFF.Application.UserWalletCQ.Queries.GetUserWallet;
|
||||
public class GetUserWalletQueryValidator : AbstractValidator<Unit>
|
||||
{
|
||||
public GetUserWalletQueryValidator()
|
||||
{
|
||||
}
|
||||
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
||||
{
|
||||
var result = await ValidateAsync(ValidationContext<Unit>.CreateWithOptions((Unit)model, x => x.IncludeProperties(propertyName)));
|
||||
if (result.IsValid)
|
||||
return Array.Empty<string>();
|
||||
return result.Errors.Select(e => e.ErrorMessage);
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace FrontOffice.BFF.Application.UserWalletCQ.Queries.GetUserWallet;
|
||||
public class GetUserWalletResponseDto
|
||||
{
|
||||
//موجودی
|
||||
public long Balance { get; set; }
|
||||
//موجودی شبکه
|
||||
public long NetworkBalance { get; set; }
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user