<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;

class AiModelApiProviderSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $data = [
            ['ai_model_id' => 2, 'api_provider_id' => 1],
            ['ai_model_id' => 5, 'api_provider_id' => 1],
            ['ai_model_id' => 6, 'api_provider_id' => 1],
            ['ai_model_id' => 7, 'api_provider_id' => 3],
            ['ai_model_id' => 8, 'api_provider_id' => 1],
        ];

        // Update existing AI models with their API provider IDs
        foreach ($data as $row) {
            \App\Models\AiModel::where('id', $row['ai_model_id'])->update(['api_provider_id' => $row['api_provider_id']]);
        }
    }
}
