text: -- phpMyAdmin SQL Dump
  -- version 5.1.1
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Aug 03, 2021 at 03:33 AM
  -- Server version: 10.4.19-MariaDB
  -- PHP Version: 8.0.7
  
  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: `persuratan`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `disposisi`
  --
  
  CREATE TABLE `disposisi` (
    `id_disposisi` int(11) NOT NULL,
    `id_suratMasuk` int(11) NOT NULL,
    `diterima_tgl` date NOT NULL,
    `diteruskan_kepada` varchar(50) NOT NULL,
    `isi_disposisi` varchar(50) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `surat_keluar`
  --
  
  CREATE TABLE `surat_keluar` (
    `id_suratKeluar` int(11) NOT NULL,
    `tgl` date NOT NULL,
    `no_agenda` varchar(125) NOT NULL,
    `no_surat` varchar(50) NOT NULL,
    `tgl_suratKeluar` date NOT NULL,
    `pengirim` varchar(50) NOT NULL,
    `penerima` varchar(50) NOT NULL,
    `perihal` varchar(50) NOT NULL,
    `lampiran` varchar(180) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `surat_masuk`
  --
  
  CREATE TABLE `surat_masuk` (
    `id` int(11) NOT NULL,
    `tgl` date NOT NULL,
    `no_agenda` varchar(125) NOT NULL,
    `no_surat` varchar(128) NOT NULL,
    `tgl_suratMasuk` date NOT NULL,
    `pengirim` varchar(50) NOT NULL,
    `penerima` varchar(50) NOT NULL,
    `perihal` varchar(50) NOT NULL,
    `lampiran` varchar(125) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user`
  --
  
  CREATE TABLE `user` (
    `id` int(11) NOT NULL,
    `name` varchar(128) NOT NULL,
    `username` varchar(128) NOT NULL,
    `image` varchar(128) NOT NULL,
    `password` varchar(256) NOT NULL,
    `role_id` int(11) NOT NULL,
    `is_active` int(1) NOT NULL,
    `date_created` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `user`
  --
  
  INSERT INTO `user` (`id`, `name`, `username`, `image`, `password`, `role_id`, `is_active`, `date_created`) VALUES
  (15, 'admin', 'admin', 'default.jpg', '$2y$10$8dlDG3BZVg2Etoa5j2n/aeYQDm126hFjvKrlC8sZqhicUqVmXnb2e', 1, 1, 1627952736);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user_access_menu`
  --
  
  CREATE TABLE `user_access_menu` (
    `id` int(11) NOT NULL,
    `role_id` int(11) NOT NULL,
    `menu_id` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `user_access_menu`
  --
  
  INSERT INTO `user_access_menu` (`id`, `role_id`, `menu_id`) VALUES
  (1, 1, 1),
  (2, 1, 5),
  (3, 2, 5),
  (8, 2, 2);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user_menu`
  --
  
  CREATE TABLE `user_menu` (
    `id` int(11) NOT NULL,
    `menu` varchar(128) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `user_menu`
  --
  
  INSERT INTO `user_menu` (`id`, `menu`) VALUES
  (1, 'Admin'),
  (2, 'Beranda User'),
  (3, 'Pesuratan'),
  (4, 'Beranda'),
  (5, 'User');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user_role`
  --
  
  CREATE TABLE `user_role` (
    `id` int(11) NOT NULL,
    `role` varchar(128) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `user_role`
  --
  
  INSERT INTO `user_role` (`id`, `role`) VALUES
  (1, 'Administrator'),
  (2, 'User');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user_sub_menu`
  --
  
  CREATE TABLE `user_sub_menu` (
    `id` int(11) NOT NULL,
    `menu_id` int(11) NOT NULL,
    `title` varchar(128) NOT NULL,
    `url` varchar(128) NOT NULL,
    `icon` varchar(128) NOT NULL,
    `is_active` int(1) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `user_sub_menu`
  --
  
  INSERT INTO `user_sub_menu` (`id`, `menu_id`, `title`, `url`, `icon`, `is_active`) VALUES
  (1, 1, 'Beranda', 'admin', 'fas fa-fw fa-home', 1),
  (2, 2, 'Beranda User', 'user/berandaUser', 'fas fa-fw fa-home', 1),
  (5, 5, 'My Profile', 'user', 'fas fa-fw fa-user-edit', 1),
  (11, 5, 'Edit Profile', 'user/edit', 'fas fa-fw fa-key', 1),
  (12, 5, 'Change Password', 'user/changePassword', 'fas fa-fw fa-wrench', 1);
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `disposisi`
  --
  ALTER TABLE `disposisi`
    ADD PRIMARY KEY (`id_disposisi`),
    ADD KEY `id_suratMasuk` (`id_suratMasuk`);
  
  --
  -- Indexes for table `surat_keluar`
  --
  ALTER TABLE `surat_keluar`
    ADD PRIMARY KEY (`id_suratKeluar`);
  
  --
  -- Indexes for table `surat_masuk`
  --
  ALTER TABLE `surat_masuk`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `user`
  --
  ALTER TABLE `user`
    ADD PRIMARY KEY (`id`),
    ADD KEY `role_id` (`role_id`);
  
  --
  -- Indexes for table `user_access_menu`
  --
  ALTER TABLE `user_access_menu`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `user_menu`
  --
  ALTER TABLE `user_menu`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `user_role`
  --
  ALTER TABLE `user_role`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `user_sub_menu`
  --
  ALTER TABLE `user_sub_menu`
    ADD PRIMARY KEY (`id`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `disposisi`
  --
  ALTER TABLE `disposisi`
    MODIFY `id_disposisi` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;
  
  --
  -- AUTO_INCREMENT for table `surat_keluar`
  --
  ALTER TABLE `surat_keluar`
    MODIFY `id_suratKeluar` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=55;
  
  --
  -- AUTO_INCREMENT for table `surat_masuk`
  --
  ALTER TABLE `surat_masuk`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=39;
  
  --
  -- AUTO_INCREMENT for table `user`
  --
  ALTER TABLE `user`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
  
  --
  -- AUTO_INCREMENT for table `user_access_menu`
  --
  ALTER TABLE `user_access_menu`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
  
  --
  -- AUTO_INCREMENT for table `user_menu`
  --
  ALTER TABLE `user_menu`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
  
  --
  -- AUTO_INCREMENT for table `user_role`
  --
  ALTER TABLE `user_role`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- AUTO_INCREMENT for table `user_sub_menu`
  --
  ALTER TABLE `user_sub_menu`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `user`
  --
  ALTER TABLE `user`
    ADD CONSTRAINT `user_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `user_role` (`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 */;
  