<?php

namespace Database\Seeders;

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

class EInvoiceApisTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $data = [
            [
                'base_url'      => 'https://api.mastergst.com',
                'email'         => 'metamintindia@gmail.com',
                'user_name'     => 'mastergst',
                'password'      => 'Malli#123',
                'client_id'     => 'a38e24ac-a493-4ef3-ba9d-ecf8909dfef9',
                'client_secret' => '586d9624-83e4-47b4-88e6-8ce997ef2d7d',
                'gstin'         => '29AABCT1332L000',
                'company_id'    => 1,
                'status'        => 1,
                'created_at'   => date('Y-m-d H:i:s'),
                'updated_at'   => date('Y-m-d H:i:s')
            ],
        ];

        foreach ($data as $data) {
            EInvoiceApi::firstOrCreate(
                ['user_name' => $data['user_name']],
                $data
            );
        }
    }
}
