Align commerce module with the monorepo module structure by updating all namespaces to use the Core\Mod\Commerce convention. This change supports the recent monorepo separation and ensures consistency with other modules. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
29 lines
702 B
PHP
29 lines
702 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Core\Mod\Commerce\Console;
|
|
|
|
use Illuminate\Console\Command;
|
|
use Core\Mod\Commerce\Services\ReferralService;
|
|
|
|
/**
|
|
* Mature referral commissions that are past their maturation date.
|
|
*
|
|
* Should be run daily via scheduler.
|
|
*/
|
|
class MatureReferralCommissions extends Command
|
|
{
|
|
protected $signature = 'commerce:mature-commissions';
|
|
|
|
protected $description = 'Mature referral commissions that are past their maturation date';
|
|
|
|
public function handle(ReferralService $referralService): int
|
|
{
|
|
$count = $referralService->matureReadyCommissions();
|
|
|
|
$this->info("Matured {$count} commissions.");
|
|
|
|
return self::SUCCESS;
|
|
}
|
|
}
|