CREATE TABLE IF NOT EXISTS daily_activities (
    id INT AUTO_INCREMENT PRIMARY KEY,
    activity_date DATE NULL,
    job_title VARCHAR(180) NULL,
    unit_id INT NULL,
    unit_name VARCHAR(180) NULL,
    activity_type VARCHAR(120) NULL,
    activity_text TEXT NULL,
    start_time TIME NULL,
    end_time TIME NULL,
    result_note TEXT NULL,
    created_by INT NULL,
    created_by_name VARCHAR(180) NULL,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
    updated_at DATETIME NULL,
    INDEX idx_date (activity_date),
    INDEX idx_unit (unit_id),
    INDEX idx_job (job_title)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
