-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `cu_lestari`
--

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `username` varchar(50) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `full_name` varchar(100) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `role` enum('admin','editor','viewer') DEFAULT 'viewer',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `is_active` tinyint(1) DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `username`, `password_hash`, `full_name`, `email`, `role`, `created_at`, `is_active`) VALUES
(1, 'admin123', '$2y$10$nvVQej.E/qrSi6Xmr9OEsu5D/o4wE0fNgdf.xkCrVnHGTChXY8M12', 'Admin', 'admin123@culestari.co.id', 'admin', '2026-08-03 05:16:17', 1),
(2, 'editor123', '$2y$10$s9YjTJqzIu//a0QvBDAyC.qiRcPExHhtMP3K2/aISK8vE6YrRtfMS', 'Editor', 'editor123@culestari.co.id', 'editor', '2026-08-03 05:16:17', 1),
(5, 'yengki', '$2y$10$AkQiMtfmGjpnlNN28tBc4OtJXtBns9aISXKAtBzmkmoYX8azYaIHK', 'yengki', 'tyengki@gmail.com', 'admin', '2026-08-03 05:24:57', 1);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `username` (`username`),
  ADD UNIQUE KEY `email` (`email`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
COMMIT;

