feat(wallet): add manual credit wallet charge functionality and update Protobuf definitions
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:
masoodafar-web
2026-07-25 23:55:08 +03:30
parent 246d893b62
commit d232399f43
10 changed files with 440 additions and 1 deletions
@@ -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;
}