khanegi setting and prices records

This commit is contained in:
2026-06-13 17:35:40 +03:30
parent c70cda0b6b
commit 91a82c06e4
15 changed files with 509 additions and 73 deletions
@@ -0,0 +1,21 @@
<?php
namespace App\Console\Commands;
use App\Services\PriceSnapshotService;
use Illuminate\Console\Command;
class PrunePriceSnapshotsCommand extends Command
{
protected $signature = 'prices:prune';
protected $description = 'Downsample and prune price history (daily at midnight)';
public function handle(PriceSnapshotService $snapshots): int
{
$stats = $snapshots->pruneHistory();
$this->info(json_encode($stats, JSON_UNESCAPED_UNICODE));
return self::SUCCESS;
}
}