<?php

namespace App\Jobs;

use App\Models\ActivityLog;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Queue\Queueable;

class CleanupActivityLogsJob implements ShouldQueue
{
    use Queueable;

    private const RETENTION_DAYS = 90;

    public function handle(): void
    {
        ActivityLog::where('logged_at', '<', now()->subDays(self::RETENTION_DAYS))->delete();
    }
}
