Prune the upstream Mini/QR mobile subsystem from POS
Deploy Ladill POS / deploy (push) Successful in 33s
Deploy Ladill POS / deploy (push) Successful in 33s
POS was forked from Ladill Mini and carried Mini's entire mobile/QR subsystem (API, QR codes, wallet, payments, push, Afia) which polluted the ladill_pos schema with 8 unused tables and left ~half the test suite red. Remove the dead subsystem: Api/Mini/Qr/Public/Search/WellKnown controllers, Mini/Qr/Afia/Notifications services, the 8 unused models, QrCodePolicy, Support/Qr + Support/Events, the two mini: scheduled commands, the Mini/QR view trees, and their (failing) tests. Empty routes/api.php (POS is web-only) and strip dead schedules from routes/console.php. Keep QrTeamMember — it is the platform team-membership model that POS's SetActingAccount middleware and SSO login depend on for multi-account access. Also keep notifications + personal_access_tokens (used by POS). Drops 7 migrations (qr product/settings, mini_payments, push tokens); the 8 orphan tables are dropped from the live ladill_pos DB separately. Test suite is green (8 passed) and all routes resolve. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
57862acb47
commit
46b5091b1e
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\MiniPayment;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
/**
|
||||
* Cancels Mini payments left pending longer than MiniPayment::STALE_PENDING_HOURS.
|
||||
* Scheduled hourly (routes/console.php).
|
||||
*/
|
||||
class CancelStalePayments extends Command
|
||||
{
|
||||
protected $signature = 'mini:cancel-stale-payments';
|
||||
|
||||
protected $description = 'Cancel Ladill Mini payments stuck pending beyond the stale window.';
|
||||
|
||||
public function handle(): int
|
||||
{
|
||||
$cutoff = now()->subHours(MiniPayment::STALE_PENDING_HOURS);
|
||||
|
||||
$count = MiniPayment::query()
|
||||
->where('status', MiniPayment::STATUS_PENDING)
|
||||
->where('created_at', '<', $cutoff)
|
||||
->update([
|
||||
'status' => MiniPayment::STATUS_CANCELED,
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
$this->info("Canceled {$count} stale pending payment(s).");
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Services\Mini\AutoWithdrawService;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class ProcessAutoWithdrawals extends Command
|
||||
{
|
||||
protected $signature = 'mini:process-auto-withdrawals';
|
||||
|
||||
protected $description = 'Withdraw wallet balances that have reached each user\'s auto-withdraw threshold.';
|
||||
|
||||
public function handle(AutoWithdrawService $autoWithdraw): int
|
||||
{
|
||||
$count = $autoWithdraw->processAll();
|
||||
$this->info("Processed {$count} auto-withdrawal(s).");
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user