All checks were successful
Deploy api / deploy (push) Successful in 22s
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
28 lines
756 B
PHP
28 lines
756 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use App\Models\PaymentTransaction;
|
|
use Illuminate\Console\Command;
|
|
|
|
/**
|
|
* 支払期限切れトランザクションのステータス更新バッチ
|
|
*/
|
|
class ExpirePaymentTransactions extends Command
|
|
{
|
|
protected $signature = 'payment:expire';
|
|
protected $description = '支払期限切れトランザクションのステータスを更新する';
|
|
|
|
public function handle(): int
|
|
{
|
|
$count = PaymentTransaction::where('status', '入金待ち')
|
|
->whereNotNull('pay_limit')
|
|
->where('pay_limit', '<', now())
|
|
->update(['status' => '支払期限切れ']);
|
|
|
|
$this->info("支払期限切れ更新: {$count}件");
|
|
|
|
return Command::SUCCESS;
|
|
}
|
|
}
|