<?php

namespace Database\Seeders;

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

class DivisionSeeder extends Seeder
{
    public function run(): void
    {
        $divisions = [
            ['name_bn' => 'ঢাকা',        'name_en' => 'Dhaka'],
            ['name_bn' => 'চট্টগ্রাম',    'name_en' => 'Chattogram'],
            ['name_bn' => 'রাজশাহী',      'name_en' => 'Rajshahi'],
            ['name_bn' => 'খুলনা',        'name_en' => 'Khulna'],
            ['name_bn' => 'বরিশাল',       'name_en' => 'Barishal'],
            ['name_bn' => 'সিলেট',        'name_en' => 'Sylhet'],
            ['name_bn' => 'রংপুর',        'name_en' => 'Rangpur'],
            ['name_bn' => 'ময়মনসিংহ',    'name_en' => 'Mymensingh'],
        ];

        foreach ($divisions as $division) {
            Division::updateOrCreate(
                ['name_en' => $division['name_en']], // unique key
                $division
            );
        }
    }
}
