feat(wallet): add manual credit wallet charge functionality and update Protobuf definitions
Build and Deploy to Kubernetes / build-and-deploy (push) Has been cancelled
Build and Deploy to Kubernetes / build-and-deploy (push) Has been cancelled
- Introduced ManualCreditWalletCharge enum value to TransactionType for clarity. - Added AdminManualCreditCharge and GetManualCreditCharges RPC methods in UserWalletService for handling manual credit charges by admin. - Created corresponding request and response messages for manual credit charge operations in Protobuf. - Updated Protobuf project version to reflect the addition of new features.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>0.0.204</Version>
|
||||
<Version>0.0.205</Version>
|
||||
<DebugType>None</DebugType>
|
||||
<DebugSymbols>False</DebugSymbols>
|
||||
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
|
||||
|
||||
@@ -116,6 +116,7 @@ enum TransactionType
|
||||
MagicWalletDeposit = 14;
|
||||
MagicWalletBonus = 15;
|
||||
CreditWalletCharge = 16;
|
||||
ManualCreditWalletCharge = 17;
|
||||
}
|
||||
enum ContractType
|
||||
{
|
||||
|
||||
@@ -125,6 +125,20 @@ service UserWalletContract
|
||||
body: "*"
|
||||
};
|
||||
};
|
||||
|
||||
// ============= Admin Manual Credit Charge =============
|
||||
|
||||
rpc AdminManualCreditCharge(AdminManualCreditChargeRequest) returns (AdminManualCreditChargeResponse){
|
||||
option (google.api.http) = {
|
||||
post: "/Admin/ManualCreditCharge"
|
||||
body: "*"
|
||||
};
|
||||
};
|
||||
rpc GetManualCreditCharges(GetManualCreditChargesRequest) returns (GetManualCreditChargesResponse){
|
||||
option (google.api.http) = {
|
||||
get: "/Admin/GetManualCreditCharges"
|
||||
};
|
||||
};
|
||||
}
|
||||
message CreateNewUserWalletRequest
|
||||
{
|
||||
@@ -324,4 +338,56 @@ message VerifyWalletChargeResponse
|
||||
{
|
||||
bool success = 1;
|
||||
string message = 2;
|
||||
}
|
||||
|
||||
// ============= Admin Manual Credit Charge Messages =============
|
||||
|
||||
message AdminManualCreditChargeRequest
|
||||
{
|
||||
int64 user_id = 1;
|
||||
int64 amount = 2; // تومان
|
||||
google.protobuf.StringValue note = 3;
|
||||
}
|
||||
|
||||
message AdminManualCreditChargeResponse
|
||||
{
|
||||
bool success = 1;
|
||||
string message = 2;
|
||||
int64 transaction_id = 3;
|
||||
int64 new_balance = 4;
|
||||
}
|
||||
|
||||
message GetManualCreditChargesRequest
|
||||
{
|
||||
messages.PaginationState pagination_state = 1;
|
||||
google.protobuf.StringValue sort_by = 2;
|
||||
GetManualCreditChargesFilter filter = 3;
|
||||
}
|
||||
|
||||
message GetManualCreditChargesFilter
|
||||
{
|
||||
google.protobuf.Int64Value user_id = 1;
|
||||
google.protobuf.Int64Value transaction_id = 2;
|
||||
google.protobuf.StringValue ref_id = 3;
|
||||
google.protobuf.Timestamp created_from = 4;
|
||||
google.protobuf.Timestamp created_to = 5;
|
||||
}
|
||||
|
||||
message GetManualCreditChargesResponse
|
||||
{
|
||||
messages.MetaData meta_data = 1;
|
||||
repeated ManualCreditChargeModel models = 2;
|
||||
}
|
||||
|
||||
message ManualCreditChargeModel
|
||||
{
|
||||
int64 transaction_id = 1;
|
||||
int64 user_id = 2;
|
||||
string user_name = 3;
|
||||
int64 amount = 4;
|
||||
string description = 5;
|
||||
string ref_id = 6;
|
||||
int64 new_balance = 7;
|
||||
google.protobuf.Timestamp created = 8;
|
||||
google.protobuf.Timestamp payment_date = 9;
|
||||
}
|
||||
Reference in New Issue
Block a user