feat(package): update package purchase methods and enhance Protobuf definitions
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 6m45s

- Changed package purchase method from DirectPurchase to Manual in multiple command handlers to reflect new business logic.
- Added Manual purchase method to PackagePurchaseMethod enum for clarity.
- Introduced new RPC method GetCustomerPackagePurchaseRollup in Protobuf for summarizing customer package purchases.
- Updated UserPackagePurchaseProfile and UserPackagePurchaseService to support new rollup functionality.
- Bumped Protobuf project version to accommodate new features.
This commit is contained in:
masoodafar-web
2026-08-08 21:59:14 +03:30
parent fb9e3d0109
commit 427d2cce1d
11 changed files with 299 additions and 8 deletions
@@ -3,7 +3,7 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.0.207</Version>
<Version>0.0.208</Version>
<DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
@@ -21,6 +21,11 @@ service UserPackagePurchaseContract
get: "/UserPackagePurchase/GetSummary"
};
};
rpc GetCustomerPackagePurchaseRollup(GetCustomerPackagePurchaseRollupRequest) returns (GetCustomerPackagePurchaseRollupResponse){
option (google.api.http) = {
get: "/UserPackagePurchase/GetCustomerRollup"
};
};
}
message GetAllUserPackagePurchaseByFilterRequest
@@ -73,3 +78,51 @@ message GetUserPackagePurchaseSummaryResponse
int64 total_count = 1;
int64 total_amount = 2;
}
message GetCustomerPackagePurchaseRollupRequest
{
messages.PaginationState pagination_state = 1;
GetCustomerPackagePurchaseRollupFilter filter = 2;
}
message GetCustomerPackagePurchaseRollupFilter
{
google.protobuf.Int64Value user_id = 1;
google.protobuf.Int32Value purchase_method = 2;
google.protobuf.Timestamp purchased_from = 3;
google.protobuf.Timestamp purchased_to = 4;
}
message GetCustomerPackagePurchaseRollupResponse
{
messages.MetaData meta_data = 1;
repeated CustomerPackagePurchaseRollupModel models = 2;
}
message CustomerPackagePurchaseRollupModel
{
int64 user_id = 1;
string user_name = 2;
string user_mobile = 3;
int64 first_package_id = 4;
string first_package_name = 5;
int64 first_amount = 6;
google.protobuf.Timestamp first_purchased_at = 7;
int64 last_package_id = 8;
string last_package_name = 9;
int64 last_amount = 10;
google.protobuf.Timestamp last_purchased_at = 11;
int32 last_purchase_method = 12;
int32 purchase_count = 13;
int64 total_amount = 14;
int32 daya_count = 15;
int64 daya_amount = 16;
int32 manual_count = 17;
int64 manual_amount = 18;
int32 gateway_count = 19;
int64 gateway_amount = 20;
}