<?php

namespace Database\Seeders;

use App\Models\SystemVersion;
use Illuminate\Database\Seeder;

class SystemVersionSeeder extends Seeder
{
    public function run(): void
    {
        SystemVersion::query()->update(['is_current' => false]);
        SystemVersion::query()->updateOrCreate(
            ['version' => app_version()],
            [
                'released_at' => now(),
                'notes' => 'Initial production release',
                'is_current' => true,
            ]
        );
    }
}
