<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Models\ApiProvider;

class ApiProviderSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $data = [
			[
				'id' => 1,
				'name' => 'Runware.ai',
				'api_url' => 'https://api.runware.ai/v1',
				'username' => null,
				'password' => null,
				'token' => '',
				'created_at' => '2025-07-28T17:48:11',
				'updated_at' => '2025-07-30T11:34:28',
				'plugin' => 'RunwareAi',
				'enabled' => 1,
			],
			[
				'id' => 2,
				'name' => 'ComfyUI lokal',
				'api_url' => 'http://127.0.0.1:8001',
				'username' => null,
				'password' => null,
				'token' => null,
				'created_at' => '2025-07-31T14:26:13',
				'updated_at' => '2025-07-31T19:10:29',
				'plugin' => 'ComfyUi',
				'enabled' => 1,
			],
			[
				'id' => 3,
				'name' => 'ComfyUI',
				'api_url' => 'http://192.168.78.76:8188',
				'username' => null,
				'password' => null,
				'token' => null,
				'created_at' => '2025-08-01T21:17:44',
				'updated_at' => '2025-08-02T18:09:02',
				'plugin' => 'ComfyUi',
				'enabled' => 1,
			],
		];

        foreach ($data as $row) {
            ApiProvider::updateOrCreate(['id' => $row['id']], $row);
        }
    }
}