MINI
C:
/
xampp
/
htdocs
/
cek
/
Upload File:
files >> C:/xampp/htdocs/cek/voucher_app.sql
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 11, 2025 at 09:36 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.4.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `voucher_app` -- -- -------------------------------------------------------- -- -- Table structure for table `transactions` -- CREATE TABLE `transactions` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `voucher_code` varchar(50) NOT NULL, `amount` decimal(10,2) NOT NULL, `type` enum('in','out') NOT NULL, `created_at` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `transactions` -- INSERT INTO `transactions` (`id`, `user_id`, `voucher_code`, `amount`, `type`, `created_at`) VALUES (1, 2, 'HN0001', '100000.00', 'out', '2025-08-11 20:23:16'), (2, 3, '0002', '200000.00', 'out', '2025-08-11 20:32:39'); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` int(11) NOT NULL, `username` varchar(50) NOT NULL, `password` varchar(255) NOT NULL, `role` enum('admin','user') DEFAULT 'user', `profile_picture` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `username`, `password`, `role`, `profile_picture`) VALUES (1, 'admin', '$2y$10$KWGu/wsgVvy1Hzo4dcz2QOcx55VSCONFjUxOclV121JTTaeJdgkpa', 'admin', NULL), (2, 'user', '$2y$10$KWGu/wsgVvy1Hzo4dcz2QOcx55VSCONFjUxOclV121JTTaeJdgkpa', 'user', NULL), (3, 'nia', '$2y$10$j8GklP.GXit94f9SvW9COughi80i3aruvPz6cSXR3xIHm0e1ufepu', 'user', NULL), (4, 'udin', '$2y$10$9a9cZk3MGviL0jtQ.pq5se6jSJDpyUePB8i7FVy0BBtiMm/H0mc02', 'admin', NULL); -- -- Indexes for dumped tables -- -- -- Indexes for table `transactions` -- ALTER TABLE `transactions` ADD PRIMARY KEY (`id`), ADD KEY `user_id` (`user_id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `username` (`username`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `transactions` -- ALTER TABLE `transactions` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -- -- Constraints for dumped tables -- -- -- Constraints for table `transactions` -- ALTER TABLE `transactions` ADD CONSTRAINT `transactions_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`); COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Copyright ©2021 || Defacer Indonesia