· 7 years ago · Nov 19, 2018, 03:52 AM
1-- phpMyAdmin SQL Dump
2-- version 4.4.15.9
3-- https://www.phpmyadmin.net
4--
5-- Host: localhost
6-- Generation Time: Nov 19, 2018 at 03:47 AM
7-- Server version: 5.6.37
8-- PHP Version: 7.1.8
9
10SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
11SET time_zone = "+00:00";
12
13--
14-- Database: `prj_travel`
15--
16
17-- --------------------------------------------------------
18
19--
20-- Table structure for table `districts`
21--
22
23CREATE TABLE IF NOT EXISTS `districts` (
24 `id` char(7) COLLATE utf8_unicode_ci NOT NULL,
25 `regency_id` char(4) COLLATE utf8_unicode_ci NOT NULL,
26 `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL
27) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
28
29--
30-- Dumping data for table `districts`
31--
32
33-- --------------------------------------------------------
34
35--
36-- Table structure for table `perusahaans`
37--
38
39CREATE TABLE IF NOT EXISTS `perusahaans` (
40 `id` int(10) unsigned NOT NULL,
41 `agen_type` enum('1','2','3') COLLATE utf8mb4_unicode_ci NOT NULL,
42 `parent_id` int(10) unsigned DEFAULT NULL,
43 `nama_perusahaan` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
44 `jenis_izin usaha` int(10) unsigned DEFAULT NULL,
45 `nomor_izin_usaha` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT '',
46 `npwp` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT '',
47 `negara_id` int(10) unsigned DEFAULT NULL,
48 `province_id` int(10) unsigned DEFAULT NULL,
49 `regency_id` int(10) unsigned DEFAULT NULL,
50 `district_id` int(10) unsigned DEFAULT NULL,
51 `village_id` int(10) unsigned DEFAULT NULL,
52 `alamat` text COLLATE utf8mb4_unicode_ci,
53 `latitude` double DEFAULT NULL,
54 `longitude` double DEFAULT NULL,
55 `nama_pimpinan` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT '',
56 `no_ktp_pimpinan` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT '',
57 `file_surat_izin` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT '',
58 `file_npwp` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT '',
59 `file_ktp_pimpinan` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT '',
60 `status_perusahaan` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT '',
61 `jenis_izin` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
62 `token` char(8) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
63 `created_at` timestamp NULL DEFAULT NULL,
64 `updated_at` timestamp NULL DEFAULT NULL
65) ENGINE=InnoDB AUTO_INCREMENT=106 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
66
67--
68-- Dumping data for table `perusahaans`
69--
70
71INSERT INTO `perusahaans` (`id`, `agen_type`, `parent_id`, `nama_perusahaan`, `jenis_izin usaha`, `nomor_izin_usaha`, `npwp`, `negara_id`, `province_id`, `regency_id`, `district_id`, `village_id`, `alamat`, `latitude`, `longitude`, `nama_pimpinan`, `no_ktp_pimpinan`, `file_surat_izin`, `file_npwp`, `file_ktp_pimpinan`, `status_perusahaan`, `jenis_izin`, `token`, `created_at`, `updated_at`) VALUES
72(6, '2', NULL, 'Agent Ltd', NULL, '', '23432', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', '', '', '1', 'asdfa', 'GNDM1383', '2018-11-17 04:02:02', '2018-11-17 04:03:52'),
73(100, '1', NULL, 'Agent2 Ltd', NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', '', '', '0', 'SK-11111', 'LSWF3413', '2018-11-17 03:20:32', '2018-11-17 03:20:32'),
74(102, '2', NULL, 'PT 1 2 3', NULL, '', 'PT 1 2 3', NULL, 14, NULL, NULL, NULL, 'PT 1 2 3', 123, 321, 'PT 1 2 3', 'PT 1 2 3', 'file-surat-izin/2018/11/ff55835f8bf9a311da55b2866ce4689a.png', 'file-npwp/2018/11/ff55835f8bf9a311da55b2866ce4689a.png', 'file-ktp-pimpinan/2018/11/ff55835f8bf9a311da55b2866ce4689a.png', '1', 'PT 1 2 3', NULL, '2018-11-18 04:20:28', '2018-11-18 04:20:28'),
75(103, '2', NULL, 'Gundam', NULL, '', 'Gundam', NULL, 13, NULL, NULL, NULL, 'Gundam', 1212, 1212, 'Gundam', 'Gundam', 'file-surat-izin/2018/11/3f228c378a77d6409da5617a066b75e9.png', 'file-npwp/2018/11/3f228c378a77d6409da5617a066b75e9.png', 'file-ktp-pimpinan/2018/11/3f228c378a77d6409da5617a066b75e9.png', '0', 'Gundam', NULL, '2018-11-18 04:35:06', '2018-11-18 04:35:06'),
76(104, '2', NULL, 'fasdfadsf', NULL, '', 'asdfasdf', NULL, 14, NULL, NULL, NULL, 'adsfasdf', 23423423, 42342, '34234', '34234234', 'file-surat-izin/2018/11/3e8c1653e2dba242f5ea2f67065417db.png', 'file-npwp/2018/11/3e8c1653e2dba242f5ea2f67065417db.png', 'file-ktp-pimpinan/2018/11/3e8c1653e2dba242f5ea2f67065417db.png', '1', 'asdfasdf', NULL, '2018-11-18 04:37:39', '2018-11-18 07:58:49'),
77(105, '2', 100, 'PT 123', NULL, '', 'PT 123', NULL, 13, NULL, NULL, NULL, 'PT 123', 4323, 1212, 'PT 123', 'PT 123', 'file-surat-izin/2018/11/7489acc0647da8057b9d7b4ac9fd8320.png', 'file-npwp/2018/11/7489acc0647da8057b9d7b4ac9fd8320.png', 'file-ktp-pimpinan/2018/11/7489acc0647da8057b9d7b4ac9fd8320.png', '0', 'PT 123', '5BF15A', '2018-11-18 05:28:58', '2018-11-18 05:28:58'),
78(140, '2', NULL, 'PT 1 2 3', NULL, '', 'PT 1 2 3', NULL, 14, NULL, NULL, NULL, 'PT 1 2 3', 123, 321, 'PT 1 2 3', 'PT 1 2 3', 'file-surat-izin/2018/11/761635ff527e624010ae023f7768434a.png', 'file-npwp/2018/11/761635ff527e624010ae023f7768434a.png', 'file-ktp-pimpinan/2018/11/761635ff527e624010ae023f7768434a.png', '1', 'PT 1 2 3', NULL, '2018-11-18 04:19:45', '2018-11-18 04:19:45');
79
80-- --------------------------------------------------------
81
82--
83-- Table structure for table `provinces`
84--
85
86CREATE TABLE IF NOT EXISTS `provinces` (
87 `id` char(2) COLLATE utf8_unicode_ci NOT NULL,
88 `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL
89) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
90
91--
92-- Dumping data for table `provinces`
93--
94
95INSERT INTO `provinces` (`id`, `name`) VALUES
96('11', 'Aceh'),
97('12', 'Sumatera Utara'),
98('13', 'Sumatera Barat'),
99('14', 'Riau'),
100('15', 'Jambi'),
101('16', 'Sumatera Selatan'),
102('17', 'Bengkulu'),
103('18', 'Lampung'),
104('19', 'Kepulauan Bangka Belitung'),
105('21', 'Kepulauan Riau'),
106('31', 'DKI Jakarta'),
107('32', 'Jawa Barat'),
108('33', 'Jawa Tengah'),
109('34', 'DI Yogyakarta'),
110('35', 'Jawa Timur'),
111('36', 'Banten'),
112('51', 'Bali'),
113('52', 'Nusa Tenggara Barat'),
114('53', 'Nusa Tenggara Timur'),
115('61', 'Kalimantan Barat'),
116('62', 'Kalimantan Tengah'),
117('63', 'Kalimantan Selatan'),
118('64', 'Kalimantan Timur'),
119('65', 'Kalimantan Utara'),
120('71', 'Sulawesi Utara'),
121('72', 'Sulawesi Tengah'),
122('73', 'Sulawesi Selatan'),
123('74', 'Sulawesi Tenggara'),
124('75', 'Gorontalo'),
125('76', 'Sulawesi Barat'),
126('81', 'Maluku'),
127('82', 'Maluku Utara'),
128('91', 'Papua Barat'),
129('94', 'Papua');
130
131-- --------------------------------------------------------
132
133--
134-- Table structure for table `regencies`
135--
136
137CREATE TABLE IF NOT EXISTS `regencies` (
138 `id` char(4) COLLATE utf8_unicode_ci NOT NULL,
139 `province_id` char(2) COLLATE utf8_unicode_ci NOT NULL,
140 `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL
141) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
142
143--
144-- Dumping data for table `regencies`
145--
146
147--
148-- Indexes for dumped tables
149--
150
151--
152-- Indexes for table `districts`
153--
154ALTER TABLE `districts`
155 ADD PRIMARY KEY (`id`),
156 ADD KEY `districts_id_index` (`regency_id`);
157
158--
159-- Indexes for table `perusahaans`
160--
161ALTER TABLE `perusahaans`
162 ADD PRIMARY KEY (`id`);
163
164--
165-- Indexes for table `provinces`
166--
167ALTER TABLE `provinces`
168 ADD PRIMARY KEY (`id`);
169
170--
171-- Indexes for table `regencies`
172--
173ALTER TABLE `regencies`
174 ADD PRIMARY KEY (`id`),
175 ADD KEY `regencies_province_id_index` (`province_id`);
176
177--
178-- AUTO_INCREMENT for dumped tables
179--
180
181--
182-- AUTO_INCREMENT for table `perusahaans`
183--
184ALTER TABLE `perusahaans`
185 MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=106;
186--
187-- Constraints for dumped tables
188--
189
190--
191-- Constraints for table `districts`
192--
193ALTER TABLE `districts`
194 ADD CONSTRAINT `districts_regency_id_foreign` FOREIGN KEY (`regency_id`) REFERENCES `regencies` (`id`);
195
196--
197-- Constraints for table `regencies`
198--
199ALTER TABLE `regencies`
200 ADD CONSTRAINT `regencies_province_id_foreign` FOREIGN KEY (`province_id`) REFERENCES `provinces` (`id`);