<?php

namespace App\Database\Seeds;

use CodeIgniter\Database\Seeder;

class GeoSeeder extends Seeder
{
    public function run()
    {
        $now = date('Y-m-d H:i:s');

        // Insert SMA1-SCHOOL zone
        // Using dummy coordinates (example: Bandung area)
        // Latitude: -6.917464, Longitude: 107.619123
        $zoneData = [
            [
                'zone_code'     => 'SMA1-SCHOOL',
                'zone_name'     => 'SMAN 1 School Zone',
                'latitude'      => -6.917464,
                'longitude'     => 107.619123,
                'radius_meters' => 150,
                'is_active'     => 1,
                'created_at'    => $now,
                'updated_at'    => $now,
            ],
        ];

        $this->db->table('zones')->insertBatch($zoneData);
    }
}
