<?php

namespace App\Database\Seeds;

use CodeIgniter\Database\Seeder;

class SuffixSeeder extends Seeder
{
    public function run()
    {
        $data = [
            [
                'suffix'      => '.pro.bd',
                'description' => 'Ideal for portfolios, CVs, and professional profiles. Show your expertise.',
                'type'        => 'Professionals',
                'is_active'   => 1,
            ],
            [
                'suffix'      => '.ami.bd',
                'description' => 'Means "I" in Bengali. Perfect for personal websites and blogs.',
                'type'        => 'Individuals',
                'is_active'   => 1,
            ],
            [
                'suffix'      => '.iam.bd',
                'description' => 'Make a statement "I am [Name]". Great for thought leaders.',
                'type'        => 'Personal Brand',
                'is_active'   => 1,
            ],
            [
                'suffix'      => '.bro.bd',
                'description' => 'Connect with friends and communities. Casual and friendly.',
                'type'        => 'Brotherhood',
                'is_active'   => 1,
            ],
            [
                'suffix'      => '.apu.bd',
                'description' => 'Warm, welcoming spaces for personal connections.',
                'type'        => 'Sisterhood',
                'is_active'   => 1,
            ]
        ];

        // Simple Queries
        foreach ($data as $suffix) {
            $this->db->table('suffixes')->insert($suffix);
        }
        
        // Also add an admin user
        $userData = [
            'username'   => 'admin',
            'email'      => 'admin@ready.bd',
            'password'   => password_hash('password', PASSWORD_DEFAULT),
            'role'       => 'admin',
            'status'     => 'active',
            'created_at' => date('Y-m-d H:i:s'),
            'updated_at' => date('Y-m-d H:i:s'),
        ];
        $this->db->table('users')->insert($userData);
    }
}
