Generator Changes at 11/25/2025 2:47:13 AM +03:30
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -492,3 +492,5 @@ fabric.properties
|
|||||||
.idea/caches/build_file_checksums.ser
|
.idea/caches/build_file_checksums.ser
|
||||||
|
|
||||||
/src/.idea
|
/src/.idea
|
||||||
|
/.gitea
|
||||||
|
src/.dockerignore
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
namespace FrontOffice.BFF.Application.UserWalletCQ.Commands.WithdrawBalance;
|
namespace FrontOffice.BFF.Application.UserWalletCQ.Commands.WithdrawBalance;
|
||||||
public record WithdrawBalanceCommand : IRequest<WithdrawBalanceResponseDto>
|
public record WithdrawBalanceCommand : IRequest<Unit>
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
namespace FrontOffice.BFF.Application.UserWalletCQ.Queries.GetAllUserWalletChangeLog;
|
namespace FrontOffice.BFF.Application.UserWalletCQ.Queries.GetAllUserWalletChangeLog;
|
||||||
public record GetAllUserWalletChangeLogQuery : IRequest<Unit>
|
public record GetAllUserWalletChangeLogQuery : IRequest<GetAllUserWalletChangeLogResponseDto>
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
namespace FrontOffice.BFF.Application.UserWalletCQ.Queries.GetAllUserWalletChangeLog;
|
||||||
|
public class GetAllUserWalletChangeLogResponseDto
|
||||||
|
{
|
||||||
|
//متادیتا
|
||||||
|
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; }
|
||||||
|
}
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
|
using FrontOffice.BFF.Protobuf.Protos.UserWallet;
|
||||||
using FrontOffice.BFF.WebApi.Common.Services;
|
using FrontOffice.BFF.WebApi.Common.Services;
|
||||||
using FrontOffice.BFF.Application.UserWalletCQ.Queries.GetAllUserWalletChangeLog;
|
using FrontOffice.BFF.Application.UserWalletCQ.Queries.GetAllUserWalletChangeLog;
|
||||||
using FrontOffice.BFF.Application.UserWalletCQ.Queries.GetUserWallet;
|
using FrontOffice.BFF.Application.UserWalletCQ.Queries.GetUserWallet;
|
||||||
using FrontOffice.BFF.Application.UserWalletCQ.Commands.TransferUserWalletBallance;
|
using FrontOffice.BFF.Application.UserWalletCQ.Commands.TransferUserWalletBallance;
|
||||||
using FrontOffice.BFF.Application.UserWalletCQ.Commands.WithdrawBalance;
|
using FrontOffice.BFF.Application.UserWalletCQ.Commands.WithdrawBalance;
|
||||||
using FrontOffice.BFF.UserWallet.Protobuf.Protos.UserWallet;
|
|
||||||
|
|
||||||
namespace FrontOffice.BFF.WebApi.Services;
|
namespace FrontOffice.BFF.WebApi.Services;
|
||||||
public class UserWalletService : UserWalletContract.UserWalletContractBase
|
public class UserWalletService : UserWalletContract.UserWalletContractBase
|
||||||
{
|
{
|
||||||
@@ -14,9 +13,9 @@ public class UserWalletService : UserWalletContract.UserWalletContractBase
|
|||||||
{
|
{
|
||||||
_dispatchRequestToCQRS = dispatchRequestToCQRS;
|
_dispatchRequestToCQRS = dispatchRequestToCQRS;
|
||||||
}
|
}
|
||||||
public override async Task<Empty> GetAllUserWalletChangeLog(Empty request, ServerCallContext context)
|
public override async Task<GetAllUserWalletChangeLogResponse> GetAllUserWalletChangeLog(Empty request, ServerCallContext context)
|
||||||
{
|
{
|
||||||
return await _dispatchRequestToCQRS.Handle<GetAllUserWalletChangeLogQuery, Empty>(context);
|
return await _dispatchRequestToCQRS.Handle<GetAllUserWalletChangeLogQuery, GetAllUserWalletChangeLogResponse>(context);
|
||||||
}
|
}
|
||||||
public override async Task<GetUserWalletResponse> GetUserWallet(Empty request, ServerCallContext context)
|
public override async Task<GetUserWalletResponse> GetUserWallet(Empty request, ServerCallContext context)
|
||||||
{
|
{
|
||||||
@@ -26,8 +25,8 @@ public class UserWalletService : UserWalletContract.UserWalletContractBase
|
|||||||
{
|
{
|
||||||
return await _dispatchRequestToCQRS.Handle<TransferUserWalletBallanceCommand, Empty>(context);
|
return await _dispatchRequestToCQRS.Handle<TransferUserWalletBallanceCommand, Empty>(context);
|
||||||
}
|
}
|
||||||
public override async Task<GetAllUserWalletChangeLogResponse> WithdrawBalance(Empty request, ServerCallContext context)
|
public override async Task<Empty> WithdrawBalance(Empty request, ServerCallContext context)
|
||||||
{
|
{
|
||||||
return await _dispatchRequestToCQRS.Handle<WithdrawBalanceCommand, GetAllUserWalletChangeLogResponse>(context);
|
return await _dispatchRequestToCQRS.Handle<WithdrawBalanceCommand, Empty>(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ option csharp_namespace = "FrontOffice.BFF.UserWallet.Protobuf.Protos.UserWallet
|
|||||||
|
|
||||||
service UserWalletContract
|
service UserWalletContract
|
||||||
{
|
{
|
||||||
rpc GetAllUserWalletChangeLog(google.protobuf.Empty) returns (google.protobuf.Empty){
|
rpc GetAllUserWalletChangeLog(google.protobuf.Empty) returns (GetAllUserWalletChangeLogResponse){
|
||||||
option (google.api.http) = {
|
option (google.api.http) = {
|
||||||
get: "/GetAllUserWalletChangeLog"
|
get: "/GetAllUserWalletChangeLog"
|
||||||
|
|
||||||
@@ -30,18 +30,13 @@ service UserWalletContract
|
|||||||
body: "*"
|
body: "*"
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
rpc WithdrawBalance(google.protobuf.Empty) returns (GetAllUserWalletChangeLogResponse){
|
rpc WithdrawBalance(google.protobuf.Empty) returns (google.protobuf.Empty){
|
||||||
option (google.api.http) = {
|
option (google.api.http) = {
|
||||||
post: "/WithdrawBalance"
|
post: "/WithdrawBalance"
|
||||||
body: "*"
|
body: "*"
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
message GetUserWalletResponse
|
|
||||||
{
|
|
||||||
int64 balance = 1;
|
|
||||||
int64 network_balance = 2;
|
|
||||||
}
|
|
||||||
message GetAllUserWalletChangeLogResponse
|
message GetAllUserWalletChangeLogResponse
|
||||||
{
|
{
|
||||||
MetaData meta_data = 1;
|
MetaData meta_data = 1;
|
||||||
@@ -56,6 +51,11 @@ message GetAllUserWalletChangeLogResponseModel
|
|||||||
bool is_increase = 5;
|
bool is_increase = 5;
|
||||||
google.protobuf.Int64Value refrence_id = 6;
|
google.protobuf.Int64Value refrence_id = 6;
|
||||||
}
|
}
|
||||||
|
message GetUserWalletResponse
|
||||||
|
{
|
||||||
|
int64 balance = 1;
|
||||||
|
int64 network_balance = 2;
|
||||||
|
}
|
||||||
|
|
||||||
message PaginationState
|
message PaginationState
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user