-- Dummy password for all is 'password'
-- Hash: $2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi

-- Clear existing data to make this script idempotent
DELETE FROM `tasks`;
DELETE FROM `users`;
ALTER TABLE `users` AUTO_INCREMENT = 1;
ALTER TABLE `tasks` AUTO_INCREMENT = 1;


INSERT INTO `users` (`username`, `password`, `role`) VALUES
('manager', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'manager'),
('employee1', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'employee'),
('employee2', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'employee');

INSERT INTO `tasks` (`title`, `description`, `status`, `priority`, `assignee_id`, `manager_id`, `due_date`) VALUES
('Design the new dashboard UI', 'Create mockups in Figma based on the new branding guidelines.', 'In progress', 'High', 2, 1, '2025-12-15'),
('Develop the login page', 'Implement the front-end and back-end for the user login functionality.', 'Not started', 'High', 2, 1, '2025-12-10'),
('Fix the reporting bug', 'The monthly report is not generating correctly. Investigate and fix.', 'Blocked', 'Medium', 3, 1, '2025-12-05'),
('Write API documentation', 'Document all the endpoints for the new tasks API.', 'Done', 'Low', 3, 1, '2025-11-30'),
('Onboard new team members', 'Prepare onboarding materials and schedule introduction meetings.', 'Not started', 'Medium', 2, 1, '2025-12-20');
