<?php

namespace App\Database\Seeds;

use CodeIgniter\Database\Seeder;

class ActivitySeeder extends Seeder
{
    public function run()
    {
        $data = [
            [
                'date' => date('Y-m-d', strtotime('-1 days')),
                'time' => '06:00:00',
                'activity' => 'Jogging Pagi di Taman Kota',
                'media' => null, // Placeholder or assume user adds images later
                'created_at' => date('Y-m-d H:i:s'),
                'updated_at' => date('Y-m-d H:i:s'),
            ],
            [
                'date' => date('Y-m-d', strtotime('-1 days')),
                'time' => '09:00:00',
                'activity' => 'Belajar Framework CodeIgniter 4',
                'media' => null,
                'created_at' => date('Y-m-d H:i:s'),
                'updated_at' => date('Y-m-d H:i:s'),
            ],
            [
                'date' => date('Y-m-d', strtotime('-2 days')),
                'time' => '14:00:00',
                'activity' => 'Meeting dengan Klien Web Design',
                'media' => null,
                'created_at' => date('Y-m-d H:i:s'),
                'updated_at' => date('Y-m-d H:i:s'),
            ],
            [
                'date' => date('Y-m-d', strtotime('-3 days')),
                'time' => '20:00:00',
                'activity' => 'Mengerjakan Tugas Kuliah',
                'media' => null,
                'created_at' => date('Y-m-d H:i:s'),
                'updated_at' => date('Y-m-d H:i:s'),
            ],
            [
                'date' => date('Y-m-d', strtotime('-5 days')),
                'time' => '16:00:00',
                'activity' => 'Bermain Badminton dengan Teman',
                'media' => null,
                'created_at' => date('Y-m-d H:i:s'),
                'updated_at' => date('Y-m-d H:i:s'),
            ],
            [
                'date' => date('Y-m-d', strtotime('-7 days')),
                'time' => '10:00:00',
                'activity' => 'Workshop UI/UX Design',
                'media' => null,
                'created_at' => date('Y-m-d H:i:s'),
                'updated_at' => date('Y-m-d H:i:s'),
            ],
        ];

        $this->db->table('activities')->insertBatch($data);
    }
}
