forked from Handi2290/Payroll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
payrol.sql
269 lines (214 loc) · 6.42 KB
/
payrol.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 14, 2021 at 07:03 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.3.20
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: `payrol`
--
-- --------------------------------------------------------
--
-- Table structure for table `absen`
--
CREATE TABLE `absen` (
`id_absen` int(11) NOT NULL,
`nip` varchar(50) NOT NULL,
`waktu` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`keterangan` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `absen`
--
INSERT INTO `absen` (`id_absen`, `nip`, `waktu`, `keterangan`) VALUES
(1, '123', '2021-01-14 15:44:29', 'masuk'),
(2, '123', '2021-01-14 15:44:33', 'pulang'),
(3, '123', '2021-01-14 17:28:13', 'masuk'),
(4, '123', '2021-01-14 17:28:34', 'pulang');
-- --------------------------------------------------------
--
-- Table structure for table `cuti`
--
CREATE TABLE `cuti` (
`id_cuti` int(11) NOT NULL,
`nip` varchar(50) NOT NULL,
`jenis_cuti` enum('cuti','izin','sakit') NOT NULL,
`bukti` varchar(254) DEFAULT NULL,
`alasan` text NOT NULL,
`status` enum('diajukan','diterima','ditolak') NOT NULL,
`waktu_pengajuan` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `cuti`
--
INSERT INTO `cuti` (`id_cuti`, `nip`, `jenis_cuti`, `bukti`, `alasan`, `status`, `waktu_pengajuan`) VALUES
(1, '123', 'sakit', 'nihiwatu.jpg', 'testing', 'diterima', '2021-01-14 17:14:54');
-- --------------------------------------------------------
--
-- Table structure for table `departemen`
--
CREATE TABLE `departemen` (
`departemen_id` int(11) NOT NULL,
`departemen` varchar(254) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `departemen`
--
INSERT INTO `departemen` (`departemen_id`, `departemen`) VALUES
(1, 'Keuangan'),
(2, 'Administrasi');
-- --------------------------------------------------------
--
-- Table structure for table `detailcuti`
--
CREATE TABLE `detailcuti` (
`id_detail` int(11) NOT NULL,
`id_cuti` int(11) NOT NULL,
`tanggal` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `detailcuti`
--
INSERT INTO `detailcuti` (`id_detail`, `id_cuti`, `tanggal`) VALUES
(1, 1, '2021-01-15'),
(2, 1, '2021-01-16');
-- --------------------------------------------------------
--
-- Table structure for table `pegawai`
--
CREATE TABLE `pegawai` (
`nip` varchar(50) NOT NULL,
`jenis_kelamin` enum('L','P') NOT NULL,
`waktu_masuk` date NOT NULL,
`id_departemen` int(11) NOT NULL,
`gaji` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `pegawai`
--
INSERT INTO `pegawai` (`nip`, `jenis_kelamin`, `waktu_masuk`, `id_departemen`, `gaji`) VALUES
('1141', 'P', '2020-12-01', 2, 100000),
('123', 'L', '2020-12-01', 1, 90000),
('13424', 'L', '2021-01-01', 2, 80000);
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE `user` (
`user_id` int(11) NOT NULL,
`nama` varchar(254) NOT NULL,
`email` varchar(254) NOT NULL,
`password` varchar(254) NOT NULL,
`level` enum('admin','pegawai') NOT NULL,
`nip` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`user_id`, `nama`, `email`, `password`, `level`, `nip`) VALUES
(1, 'Administrator', '[email protected]', '202cb962ac59075b964b07152d234b70', 'admin', NULL),
(2, 'Yudi Setyawan', '[email protected]', '202cb962ac59075b964b07152d234b70', 'pegawai', '123'),
(5, 'Neprisa', '[email protected]', '202cb962ac59075b964b07152d234b70', 'pegawai', '1141'),
(7, 'Luthfii', '[email protected]', 'eb17e1c03643c971ab35c22d86587541', 'pegawai', '13424');
-- --------------------------------------------------------
--
-- Table structure for table `web`
--
CREATE TABLE `web` (
`id_web` int(11) NOT NULL,
`logo` varchar(254) NOT NULL,
`nama` varchar(254) NOT NULL,
`author` varchar(254) NOT NULL,
`alamat` text NOT NULL,
`nohp` varchar(20) NOT NULL,
`email` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `web`
--
INSERT INTO `web` (`id_web`, `logo`, `nama`, `author`, `alamat`, `nohp`, `email`) VALUES
(1, 'fingerprint.png', 'E - Absensi', 'Yudi Setyawan', 'Gg. Damai No. 2, Rajabasa raya, Rajabasa', '082382000703', '[email protected]');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `absen`
--
ALTER TABLE `absen`
ADD PRIMARY KEY (`id_absen`);
--
-- Indexes for table `cuti`
--
ALTER TABLE `cuti`
ADD PRIMARY KEY (`id_cuti`);
--
-- Indexes for table `departemen`
--
ALTER TABLE `departemen`
ADD PRIMARY KEY (`departemen_id`);
--
-- Indexes for table `detailcuti`
--
ALTER TABLE `detailcuti`
ADD PRIMARY KEY (`id_detail`);
--
-- Indexes for table `pegawai`
--
ALTER TABLE `pegawai`
ADD PRIMARY KEY (`nip`);
--
-- Indexes for table `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`user_id`);
--
-- Indexes for table `web`
--
ALTER TABLE `web`
ADD PRIMARY KEY (`id_web`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `absen`
--
ALTER TABLE `absen`
MODIFY `id_absen` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `cuti`
--
ALTER TABLE `cuti`
MODIFY `id_cuti` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `departemen`
--
ALTER TABLE `departemen`
MODIFY `departemen_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `detailcuti`
--
ALTER TABLE `detailcuti`
MODIFY `id_detail` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `web`
--
ALTER TABLE `web`
MODIFY `id_web` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
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 */;