feat: update protobuf versions and enhance club membership and commission queries
Build and Deploy / build (push) Successful in 1m41s

This commit is contained in:
masoodafar-web
2025-12-20 03:16:36 +03:30
parent 6b72e88780
commit f234af49e0
55 changed files with 352 additions and 150 deletions
@@ -4,7 +4,7 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.0.4</Version>
<Version>0.0.5</Version>
<DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
@@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
<PackageId>Foursat.BackOffice.BFF.ClubMembership.Protobuf</PackageId>
<Version>0.0.6</Version>
<Version>0.0.7</Version>
<Authors>FourSat</Authors>
<Company>FourSat</Company>
<Product>Foursat.BackOffice.BFF.ClubMembership.Protobuf</Product>
@@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
<PackageId>Foursat.BackOffice.BFF.Commission.Protobuf</PackageId>
<Version>0.0.12</Version>
<Version>0.0.13</Version>
<Authors>FourSat</Authors>
<Company>FourSat</Company>
<Product>BackOffice.BFF.Commission.Protobuf</Product>
@@ -122,20 +122,20 @@ service CommissionContract
// CalculateWeeklyBalances Command
message CalculateWeeklyBalancesRequest
{
string week_number = 1; // Format: "YYYY-Www" (e.g., "2025-W01")
int64 week_definition_id = 1;
bool force_recalculate = 2;
}
// CalculateWeeklyCommissionPool Command
message CalculateWeeklyCommissionPoolRequest
{
string week_number = 1;
int64 week_definition_id = 1;
}
// ProcessUserPayouts Command
message ProcessUserPayoutsRequest
{
string week_number = 1;
int64 week_definition_id = 1;
bool force_reprocess = 2;
}
@@ -174,13 +174,13 @@ message RejectWithdrawalRequest
// GetWeeklyCommissionPool Query
message GetWeeklyCommissionPoolRequest
{
string week_number = 1;
int64 week_definition_id = 1;
}
message GetWeeklyCommissionPoolResponse
{
int64 id = 1;
string week_number = 2;
int64 week_definition_id = 2;
int64 total_pool_amount = 3; // Rials
int32 total_balances = 4;
int64 value_per_balance = 5; // Rials per balance
@@ -201,7 +201,7 @@ message GetUserPayoutsFilter
{
google.protobuf.Int64Value user_id = 1;
google.protobuf.Int32Value status = 2; // CommissionPayoutStatus enum
google.protobuf.StringValue week_number = 3;
google.protobuf.Int64Value week_definition_id = 3;
}
@@ -216,15 +216,16 @@ message UserCommissionPayoutModel
int64 id = 1;
int64 user_id = 2;
string user_name = 3;
string week_number = 4;
int32 balances_earned = 5;
int64 value_per_balance = 6;
int64 total_amount = 7;
int32 status = 8; // CommissionPayoutStatus enum (0=Pending, 1=Paid, 2=Failed)
google.protobuf.Int32Value withdrawal_method = 9;
string iban_number = 10;
google.protobuf.Timestamp created = 11;
google.protobuf.Timestamp last_modified = 12;
int64 week_definition_id = 4;
string week_display_name = 5;
int32 balances_earned = 6;
int64 value_per_balance = 7;
int64 total_amount = 8;
int32 status = 9; // CommissionPayoutStatus enum (0=Pending, 1=Paid, 2=Failed)
google.protobuf.Int32Value withdrawal_method = 10;
string iban_number = 11;
google.protobuf.Timestamp created = 12;
google.protobuf.Timestamp last_modified = 13;
}
// GetCommissionPayoutHistory Query
@@ -232,7 +233,7 @@ message GetCommissionPayoutHistoryRequest
{
google.protobuf.Int64Value payout_id = 1;
google.protobuf.Int64Value user_id = 2;
google.protobuf.StringValue week_number = 3;
google.protobuf.Int64Value week_definition_id = 3;
messages.PaginationState pagination_state = 4;
}
@@ -247,7 +248,7 @@ message CommissionPayoutHistoryModel
int64 id = 1;
int64 payout_id = 2;
int64 user_id = 3;
string week_number = 4;
int64 week_definition_id = 4;
int64 amount_before = 5;
int64 amount_after = 6;
int32 old_status = 7; // CommissionPayoutStatus enum
@@ -262,7 +263,7 @@ message CommissionPayoutHistoryModel
message GetUserWeeklyBalancesRequest
{
google.protobuf.Int64Value user_id = 1;
google.protobuf.StringValue week_number = 2;
google.protobuf.Int64Value week_definition_id = 2;
bool only_active = 3; // Only non-expired balances
int32 page_index = 4;
int32 page_size = 5;
@@ -278,14 +279,15 @@ message UserWeeklyBalanceModel
{
int64 id = 1;
int64 user_id = 2;
string week_number = 3;
int32 left_leg_balances = 4;
int32 right_leg_balances = 5;
int32 total_balances = 6;
int64 weekly_pool_contribution = 7;
google.protobuf.Timestamp calculated_at = 8;
bool is_expired = 9;
google.protobuf.Timestamp created = 10;
int64 week_definition_id = 3;
string week_display_name = 4;
int32 left_leg_balances = 5;
int32 right_leg_balances = 6;
int32 total_balances = 7;
int64 weekly_pool_contribution = 8;
google.protobuf.Timestamp calculated_at = 9;
bool is_expired = 10;
google.protobuf.Timestamp created = 11;
}
// GetAllWeeklyPools Query
@@ -307,13 +309,14 @@ message GetAllWeeklyPoolsResponse
message WeeklyCommissionPoolModel
{
int64 id = 1;
string week_number = 2;
int64 total_pool_amount = 3;
int32 total_balances = 4;
int64 value_per_balance = 5;
bool is_calculated = 6;
google.protobuf.Timestamp calculated_at = 7;
google.protobuf.Timestamp created = 8;
int64 week_definition_id = 2;
string week_display_name = 3;
int64 total_pool_amount = 4;
int32 total_balances = 5;
int64 value_per_balance = 6;
bool is_calculated = 7;
google.protobuf.Timestamp calculated_at = 8;
google.protobuf.Timestamp created = 9;
}
// GetWithdrawalRequests Query
@@ -321,7 +324,7 @@ message GetWithdrawalRequestsRequest
{
google.protobuf.Int32Value status = 1; // CommissionPayoutStatus enum: Pending=1, Approved=2, Rejected=3
google.protobuf.Int64Value user_id = 2;
google.protobuf.StringValue week_number = 3;
google.protobuf.Int64Value week_definition_id = 3;
int32 page_index = 4;
int32 page_size = 5;
string iban_number = 6;
@@ -338,7 +341,7 @@ message WithdrawalRequestModel
int64 id = 1;
int64 user_id = 2;
string user_name = 3;
string week_number = 4;
int64 week_definition_id = 4;
int64 amount = 5;
int32 status = 6; // CommissionPayoutStatus enum
int32 withdrawal_method = 7; // WithdrawalMethod enum
@@ -358,7 +361,7 @@ message WithdrawalRequestModel
// TriggerWeeklyCalculation Command
message TriggerWeeklyCalculationRequest
{
string week_number = 1; // Format: "YYYY-Www" (e.g., "2025-W48")
int64 week_definition_id = 1;
bool force_recalculate = 2; // اگر true باشد، محاسبات قبلی را حذف و دوباره محاسبه می‌کند
bool skip_balances = 3; // Skip balance calculation (only pool and payouts)
bool skip_pool = 4; // Skip pool calculation (only balances and payouts)
@@ -396,7 +399,7 @@ message GetWorkerStatusResponse
// GetWorkerExecutionLogs Query
message GetWorkerExecutionLogsRequest
{
google.protobuf.StringValue week_number = 1; // Filter by week
google.protobuf.Int64Value week_definition_id = 1; // Filter by week
google.protobuf.StringValue execution_id = 2; // Filter by specific execution
google.protobuf.BoolValue success_only = 3; // Show only successful runs
google.protobuf.BoolValue failed_only = 4; // Show only failed runs
@@ -413,15 +416,16 @@ message GetWorkerExecutionLogsResponse
message WorkerExecutionLogModel
{
string execution_id = 1;
string week_number = 2;
string step = 3; // "Balances" | "Pool" | "Payouts" | "Full"
bool success = 4;
google.protobuf.StringValue error_message = 5;
google.protobuf.Timestamp started_at = 6;
google.protobuf.Timestamp completed_at = 7;
int64 duration_ms = 8; // Duration in milliseconds
int32 records_processed = 9;
google.protobuf.StringValue details = 10; // JSON or text details
int64 week_definition_id = 2;
string week_display_name = 3;
string step = 4; // "Balances" | "Pool" | "Payouts" | "Full"
bool success = 5;
google.protobuf.StringValue error_message = 6;
google.protobuf.Timestamp started_at = 7;
google.protobuf.Timestamp completed_at = 8;
int64 duration_ms = 9; // Duration in milliseconds
int32 records_processed = 10;
google.protobuf.StringValue details = 11; // JSON or text details
}
// GetWithdrawalReports Query
@@ -486,13 +490,14 @@ message GetAvailableWeeksResponse
message WeekInfo
{
string week_number = 1; // YYYY-Www format
google.protobuf.Timestamp start_date = 2;
google.protobuf.Timestamp end_date = 3;
bool is_calculated = 4;
google.protobuf.Timestamp calculated_at = 5;
string last_execution_status = 6;
int64 total_pool_amount = 7;
int32 eligible_users_count = 8;
string display_text = 9; // نمایش فارسی برای UI
int64 week_definition_id = 1; // FK to WeekDefinition
string display_name = 2; // Display name for UI
google.protobuf.Timestamp start_date = 3;
google.protobuf.Timestamp end_date = 4;
bool is_calculated = 5;
google.protobuf.Timestamp calculated_at = 6;
string last_execution_status = 7;
int64 total_pool_amount = 8;
int32 eligible_users_count = 9;
string display_text = 10; // نمایش فارسی برای UI
}
@@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
<PackageId>Foursat.BackOffice.BFF.Common.Protobuf</PackageId>
<Version>0.0.2</Version>
<Version>0.0.3</Version>
<Authors>FourSat</Authors>
<Company>FourSat</Company>
<Product>BackOffice.BFF.Common.Protobuf</Product>
@@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
<PackageId>Foursat.BackOffice.BFF.Configuration.Protobuf</PackageId>
<Version>1.0.6</Version>
<Version>1.0.7</Version>
<Authors>FourSat</Authors>
<Company>FourSat</Company>
<Product>Foursat.BackOffice.BFF.Configuration.Protobuf</Product>
@@ -4,7 +4,7 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.0.2</Version>
<Version>0.0.3</Version>
<DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
@@ -4,7 +4,7 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.0.2</Version>
<Version>0.0.3</Version>
<DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
@@ -4,7 +4,7 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.0.2</Version>
<Version>0.0.3</Version>
<DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
@@ -4,7 +4,7 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.0.2</Version>
<Version>0.0.3</Version>
<DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
@@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
<PackageId>Foursat.BackOffice.BFF.Health.Protobuf</PackageId>
<Version>1.0.4</Version>
<Version>1.0.5</Version>
<Authors>FourSat</Authors>
<Company>FourSat</Company>
<Product>Foursat.BackOffice.BFF.Health.Protobuf</Product>
@@ -4,7 +4,7 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.0.4</Version>
<Version>0.0.5</Version>
<DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
@@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
<PackageId>Foursat.BackOffice.BFF.NetworkMembership.Protobuf</PackageId>
<Version>0.0.9</Version>
<Version>0.0.11</Version>
<Authors>FourSat</Authors>
<Company>FourSat</Company>
<Product>Foursat.BackOffice.BFF.NetworkMembership.Protobuf</Product>
@@ -156,7 +156,7 @@ message GetNetworkTreeRequest
google.protobuf.Int32Value max_depth = 2;
google.protobuf.BoolValue only_active = 3;
google.protobuf.BoolValue is_club_active = 4;
google.protobuf.StringValue activation_week_number = 5;
google.protobuf.Int64Value activation_week_definition_id = 5;
}
message GetNetworkTreeResponse
@@ -175,7 +175,7 @@ message NetworkTreeNodeModel
google.protobuf.Timestamp joined_at = 7;
google.protobuf.Timestamp club_activated_at = 8; // تاریخ فعال‌سازی در باشگاه
bool is_club_active = 9; // فعال بودن در باشگاه
string activation_week_number = 10; // شماره هفته فعال‌سازی
google.protobuf.Int64Value activation_week_definition_id = 10; // شماره هفته فعال‌سازی
bool is_activated_in_target_week = 11; // آیا در هفته هدف فعال شده
google.protobuf.Timestamp user_created = 12; // تاریخ ایجاد کاربر
}
@@ -4,7 +4,7 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.0.112</Version>
<Version>0.0.113</Version>
<DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
@@ -4,7 +4,7 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.0.112</Version>
<Version>0.0.113</Version>
<DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
@@ -4,7 +4,7 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.0.2</Version>
<Version>0.0.3</Version>
<DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
@@ -4,7 +4,7 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.0.9</Version>
<Version>0.0.11</Version>
<DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
@@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.0.4</Version>
<Version>0.0.5</Version>
<DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
@@ -4,7 +4,7 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.0.112</Version>
<Version>0.0.113</Version>
<DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
@@ -4,7 +4,7 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.0.2</Version>
<Version>0.0.4</Version>
<DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
@@ -4,7 +4,7 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.0.113</Version>
<Version>0.0.114</Version>
<DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
@@ -4,7 +4,7 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.0.112</Version>
<Version>0.0.113</Version>
<DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
@@ -4,7 +4,7 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.0.115</Version>
<Version>0.0.116</Version>
<DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
@@ -4,7 +4,7 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.0.112</Version>
<Version>0.0.113</Version>
<DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>