-- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 28, 2025 at 05:31 AM
-- Server version: 5.6.26
-- PHP Version: 5.6.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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: `sarmoedcamp`
--

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

--
-- Table structure for table `pembayaran`
--

CREATE TABLE IF NOT EXISTS `pembayaran` (
  `id_bayar` int(11) NOT NULL,
  `id` int(11) DEFAULT NULL,
  `file_bukti` varchar(255) DEFAULT NULL,
  `tanggal` datetime DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `pembayaran`
--

INSERT INTO `pembayaran` (`id_bayar`, `id`, `file_bukti`, `tanggal`) VALUES
(1, 28, 'uploads/1753534190_6b0288e0ac.jpg', '2025-07-26 19:49:50'),
(2, 30, 'uploads/1753534495_ed95f35a78.png', '2025-07-26 19:54:55');

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

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

CREATE TABLE IF NOT EXISTS `users` (
  `id` int(11) NOT NULL,
  `username` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `role` enum('admin','user') DEFAULT 'user',
  `status_member` enum('ya','tidak','pending') DEFAULT 'tidak',
  `pembayaran_status` enum('pending','lunas') DEFAULT 'pending'
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=latin1;

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

INSERT INTO `users` (`id`, `username`, `password`, `role`, `status_member`, `pembayaran_status`) VALUES
(13, 'admin', '$2y$10$n6uAlQmg0CzluVO8lORyEeqikVHDK7EGxQIPeaEAXIFlLpw6.YyHS', 'admin', 'tidak', 'pending'),
(27, 'asd', '$2y$10$vi0ZCB/SFv2aJhV8p4hEdO.GEPXdIqydXX5oA5q4RNsD883yrO7m.', 'user', 'tidak', 'pending'),
(28, 'aru', '$2y$10$/xGmqMOoN1Nqo0ZkwQjV4.LeV/MvFlvjqzrQp2hndlWEd9tPzuU.y', 'user', 'pending', 'pending'),
(29, 'qwe', '$2y$10$gaz1fmZE.tT4OvhfSs8mceTMg1F6giTBMGLcqOySrlIwrDwdZx4vC', 'user', 'tidak', 'pending'),
(30, 'zxc', '$2y$10$iLhqFjE5v1zZw9pD3qxT3eAFwFtO/TK0btQxdOcysYM2A.NIzqM7i', 'user', 'ya', 'lunas'),
(31, 'qwe', '$2y$10$PnuIZMtXQcRC8OQRa3xbBOVL3yZpuWHvMAis14GD2FAIIjiRJZDLS', 'user', 'tidak', 'pending');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `pembayaran`
--
ALTER TABLE `pembayaran`
  ADD PRIMARY KEY (`id_bayar`),
  ADD KEY `fk_pembayaran_user` (`id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `pembayaran`
--
ALTER TABLE `pembayaran`
  MODIFY `id_bayar` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=32;
--
-- Constraints for dumped tables
--

--
-- Constraints for table `pembayaran`
--
ALTER TABLE `pembayaran`
  ADD CONSTRAINT `fk_pembayaran_user` FOREIGN KEY (`id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

/*!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 */;
