-- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 19, 2022 at 03:12 PM
-- Server version: 5.7.36
-- PHP Version: 7.3.33

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

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

--
-- Table structure for table `admin`
--

CREATE TABLE `admin` (
  `id` int(11) NOT NULL,
  `name` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
  `username` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `admin`
--

INSERT INTO `admin` (`id`, `name`, `username`, `password`, `created_at`, `updated_at`) VALUES
(1, 'Admin', 'tutik', '0192023a7bbd73250516f069df18b500', '2021-06-08 12:55:15', NULL),
(123, 'zakia', 'zakiaamaliaa', 'bf557b29f3887678dc4ac7dc9911a235', '2022-01-04 07:13:16', NULL);

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

--
-- Table structure for table `akun`
--

CREATE TABLE `akun` (
  `id` int(11) NOT NULL,
  `user_id` varchar(200) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `pegawai_id` int(11) DEFAULT NULL,
  `pengajuan_id` int(11) DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `cabang_skpd`
--

CREATE TABLE `cabang_skpd` (
  `id` int(11) NOT NULL,
  `skpd_id` int(11) NOT NULL,
  `nama_cabang` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cabang_skpd`
--

INSERT INTO `cabang_skpd` (`id`, `skpd_id`, `nama_cabang`) VALUES
(3, 44, 'KELURAHAN TALANG BAKUNG'),
(4, 44, 'KELURAHAN PAYO SELINCAH'),
(5, 44, 'KELURAHAN EKA JAYA'),
(6, 44, 'KELURAHAN EKA JAYA'),
(7, 44, 'KELURAHAN LINGKAR SELATAN'),
(8, 44, 'KELURAHAN PAAL MERAH');

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

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(10, '2014_10_12_000000_create_users_table', 1),
(11, '2014_10_12_100000_create_password_resets_table', 1),
(12, '2019_08_19_000000_create_failed_jobs_table', 1);

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

--
-- Table structure for table `pangkat_pegawai`
--

CREATE TABLE `pangkat_pegawai` (
  `id` int(11) NOT NULL,
  `pangkat` varchar(255) DEFAULT NULL,
  `golongan` varchar(20) DEFAULT NULL,
  `ruang` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `pangkat_pegawai`
--

INSERT INTO `pangkat_pegawai` (`id`, `pangkat`, `golongan`, `ruang`, `created_at`, `updated_at`) VALUES
(1, 'Juru Muda', 'I', 'a', '2021-06-07 11:41:55', '2021-06-11 22:19:41'),
(2, 'Juru Muda Tingkat I', 'I', 'b', '2021-06-07 11:42:06', '2021-06-07 11:42:06'),
(3, 'Juru', 'I', 'c', '2021-06-07 11:42:14', '2021-06-07 11:42:14'),
(4, 'Juru Tingkat I', 'I', 'd', '2021-06-07 11:42:23', '2021-06-07 11:42:23'),
(5, 'Pengatur Muda', 'II', 'a', '2021-06-07 11:42:37', '2021-06-07 11:42:37'),
(6, 'Pengatur Muda Tingkat I', 'II', 'b', '2021-06-07 11:42:47', '2021-06-07 11:42:47'),
(7, 'Pengatur', 'II', 'c', '2021-06-07 11:43:12', '2021-06-07 11:43:12'),
(8, 'Pengatur Tingkat I', 'II', 'd', '2021-06-07 11:43:29', '2021-06-07 11:43:29'),
(9, 'Penata Muda', 'III', 'a', '2021-06-07 11:44:20', '2021-06-11 21:16:13'),
(10, 'Penata Muda Tingkat I', 'III', 'b', '2021-06-07 11:44:31', '2021-06-07 11:44:31'),
(11, 'Penata', 'III', 'c', '2021-06-07 11:44:42', '2021-06-07 11:44:42'),
(12, 'Penata Tingkat I', 'III', 'd', '2021-06-07 11:45:01', '2021-06-07 11:45:01'),
(13, 'Pembina', 'IV', 'a', '2021-06-07 11:45:32', '2021-06-07 11:45:32'),
(14, 'Pembina Tingkat I', 'IV', 'b', '2021-06-07 11:45:42', '2021-06-07 11:45:42'),
(15, 'Pembina Utama Muda', 'IV', 'c', '2021-06-07 11:45:53', '2021-06-07 11:45:53'),
(16, 'Pembina Utama Madya', 'IV', 'd', '2021-06-08 19:40:25', '2021-06-08 19:40:25'),
(17, 'Pembina Utama', 'IV', 'e', '2021-06-11 21:23:54', '2021-06-11 21:23:54');

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

--
-- Table structure for table `password_resets`
--

CREATE TABLE `password_resets` (
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `pegawai`
--

CREATE TABLE `pegawai` (
  `id` bigint(20) NOT NULL,
  `nama` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
  `nip` varchar(18) DEFAULT NULL,
  `nik` varchar(18) DEFAULT NULL,
  `pangkat_pegawai_id` int(11) NOT NULL,
  `alamat` text,
  `telepon` varchar(20) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `pengajuan`
--

CREATE TABLE `pengajuan` (
  `id` int(11) NOT NULL,
  `pegawai_id` bigint(20) NOT NULL,
  `type_pengajuan` varchar(500) DEFAULT NULL,
  `skpd` varchar(500) DEFAULT NULL,
  `nomor_sk` varchar(255) DEFAULT NULL,
  `lampiran_file` text,
  `masa_berlaku` date DEFAULT NULL,
  `keterangan` text,
  `sertifikat` varchar(50) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  `status` int(11) DEFAULT '0',
  `status_hapus` int(11) NOT NULL DEFAULT '0',
  `opd` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `skpd`
--

CREATE TABLE `skpd` (
  `id` int(11) NOT NULL,
  `nama_skpd` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `skpd`
--

INSERT INTO `skpd` (`id`, `nama_skpd`) VALUES
(44, 'KECAMATAN PAAL MERAH');

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

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

CREATE TABLE `users` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Indexes for dumped tables
--

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

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

--
-- Indexes for table `cabang_skpd`
--
ALTER TABLE `cabang_skpd`
  ADD PRIMARY KEY (`id`),
  ADD KEY `skpd_id` (`skpd_id`);

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

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

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

--
-- Indexes for table `password_resets`
--
ALTER TABLE `password_resets`
  ADD KEY `password_resets_email_index` (`email`);

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

--
-- Indexes for table `pengajuan`
--
ALTER TABLE `pengajuan`
  ADD PRIMARY KEY (`id`),
  ADD KEY `opd` (`opd`);

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

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `admin`
--
ALTER TABLE `admin`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=124;

--
-- AUTO_INCREMENT for table `akun`
--
ALTER TABLE `akun`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=76;

--
-- AUTO_INCREMENT for table `cabang_skpd`
--
ALTER TABLE `cabang_skpd`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `pangkat_pegawai`
--
ALTER TABLE `pangkat_pegawai`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `pegawai`
--
ALTER TABLE `pegawai`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=56;

--
-- AUTO_INCREMENT for table `pengajuan`
--
ALTER TABLE `pengajuan`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=87;

--
-- AUTO_INCREMENT for table `skpd`
--
ALTER TABLE `skpd`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `cabang_skpd`
--
ALTER TABLE `cabang_skpd`
  ADD CONSTRAINT `cabang_skpd_ibfk_1` FOREIGN KEY (`skpd_id`) REFERENCES `skpd` (`id`);

--
-- Constraints for table `pengajuan`
--
ALTER TABLE `pengajuan`
  ADD CONSTRAINT `pengajuan_ibfk_1` FOREIGN KEY (`opd`) REFERENCES `cabang_skpd` (`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 */;
