feat: update protobuf versions and enhance club membership and commission queries
Build and Deploy / build (push) Successful in 1m41s
Build and Deploy / build (push) Successful in 1m41s
This commit is contained in:
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user