-
Notifications
You must be signed in to change notification settings - Fork 1
/
servis.sql
256 lines (207 loc) · 6.34 KB
/
servis.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
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 20, 2021 at 08:18 AM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.11
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: `servis`
--
-- --------------------------------------------------------
--
-- Table structure for table `jasa`
--
CREATE TABLE `jasa` (
`no` int(10) NOT NULL,
`kd_jasa` varchar(15) NOT NULL,
`kerusakan` varchar(100) NOT NULL,
`harga` int(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `jasa`
--
INSERT INTO `jasa` (`no`, `kd_jasa`, `kerusakan`, `harga`) VALUES
(1, 'KJ-1', 'Ganti Lcd', 350000),
(2, 'KJ-2', 'Stuck Windows', 150000),
(3, 'KJ-3', 'Blue screen', 200000),
(5, 'KJ-4', 'Mati Total', 250000);
-- --------------------------------------------------------
--
-- Table structure for table `konsumen`
--
CREATE TABLE `konsumen` (
`id_konsumen` int(10) NOT NULL,
`kd_konsumen` varchar(10) NOT NULL,
`nm_konsumen` varchar(100) NOT NULL,
`telepon` varchar(16) NOT NULL,
`alamat` varchar(200) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `konsumen`
--
INSERT INTO `konsumen` (`id_konsumen`, `kd_konsumen`, `nm_konsumen`, `telepon`, `alamat`) VALUES
(1, 'KS-1', 'Livio Tri Gieraldo', '0982312312', 'Ujung Aspal'),
(2, 'KS-2', 'Bpk Rafli', '02199999', 'Jatiasih\r\n'),
(11, 'KS-3', 'Aldoe21', '021989898', 'jatimurni');
-- --------------------------------------------------------
--
-- Table structure for table `servis_detail`
--
CREATE TABLE `servis_detail` (
`servisdetail_id` int(11) NOT NULL,
`no_servis` int(11) NOT NULL,
`id_jasa` char(5) NOT NULL,
`jumlah` int(11) NOT NULL,
`tgl_ambil` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `servis_detail`
--
INSERT INTO `servis_detail` (`servisdetail_id`, `no_servis`, `id_jasa`, `jumlah`, `tgl_ambil`) VALUES
(53, 20, 'KJ-5', 550000, '0000-00-00'),
(54, 20, 'KJ-4', 250000, '0000-00-00'),
(61, 0, 'KJ-1', 350000, '0000-00-00'),
(62, 0, 'KJ-3', 200000, '0000-00-00'),
(70, 21, 'KJ-4', 250000, '0000-00-00'),
(71, 21, 'KJ-5', 550000, '0000-00-00'),
(72, 21, 'KJ-5', 550000, '0000-00-00'),
(82, 80, 'KJ-4', 250000, '0000-00-00'),
(83, 80, 'KJ-5', 550000, '0000-00-00'),
(84, 80, 'KJ-5', 550000, '0000-00-00');
-- --------------------------------------------------------
--
-- Table structure for table `servis_header`
--
CREATE TABLE `servis_header` (
`no_servis` int(45) NOT NULL,
`nm_teknisi` varchar(50) NOT NULL,
`nm_konsumen` varchar(50) NOT NULL,
`nm_barang` varchar(50) NOT NULL,
`alamat` text NOT NULL,
`telp` varchar(15) NOT NULL,
`qty` int(11) NOT NULL,
`tgl_terima` date NOT NULL,
`tgl_ambil` date DEFAULT NULL,
`harga` int(11) NOT NULL,
`status` char(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `servis_header`
--
INSERT INTO `servis_header` (`no_servis`, `nm_teknisi`, `nm_konsumen`, `nm_barang`, `alamat`, `telp`, `qty`, `tgl_terima`, `tgl_ambil`, `harga`, `status`) VALUES
(20, 'Bpk Asep', 'Livio Tri Gieraldo', 'Compaq 510', 'Kp pondok ranggon', '08961236767', 1, '2021-05-20', '2021-05-20', 800000, 'Y'),
(21, 'Bpk Bambang', 'Bpk Rafli', 'Lenovo Legion', 'JATIMURNI', '08961236767', 1, '2021-05-20', '2021-05-20', 1350000, 'Y');
-- --------------------------------------------------------
--
-- Table structure for table `teknisi`
--
CREATE TABLE `teknisi` (
`no` int(10) NOT NULL,
`kd_teknisi` varchar(20) NOT NULL,
`nm_teknisi` varchar(100) NOT NULL,
`telepon` varchar(16) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `teknisi`
--
INSERT INTO `teknisi` (`no`, `kd_teknisi`, `nm_teknisi`, `telepon`) VALUES
(1, 'KT-1', 'Bpk Bambang', '089629292'),
(2, 'KT-2', 'Bpk Agus', '02134343'),
(4, 'KT-3', 'Bpk Asep', '0987654321');
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE `user` (
`id` int(11) NOT NULL,
`nama` varchar(255) NOT NULL,
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`level` enum('Admin','Teknisi') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`id`, `nama`, `username`, `password`, `level`) VALUES
(5, 'Livio Tri Gieraldo', 'admin', '21232f297a57a5a743894a0e4a801fc3', 'Admin'),
(6, 'Aldoee', 'teknisi', 'e21394aaeee10f917f581054d24b031f', 'Teknisi');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `jasa`
--
ALTER TABLE `jasa`
ADD PRIMARY KEY (`no`);
--
-- Indexes for table `konsumen`
--
ALTER TABLE `konsumen`
ADD PRIMARY KEY (`id_konsumen`);
--
-- Indexes for table `servis_detail`
--
ALTER TABLE `servis_detail`
ADD PRIMARY KEY (`servisdetail_id`);
--
-- Indexes for table `servis_header`
--
ALTER TABLE `servis_header`
ADD PRIMARY KEY (`no_servis`);
--
-- Indexes for table `teknisi`
--
ALTER TABLE `teknisi`
ADD PRIMARY KEY (`no`);
--
-- Indexes for table `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `jasa`
--
ALTER TABLE `jasa`
MODIFY `no` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `konsumen`
--
ALTER TABLE `konsumen`
MODIFY `id_konsumen` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
--
-- AUTO_INCREMENT for table `servis_detail`
--
ALTER TABLE `servis_detail`
MODIFY `servisdetail_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=85;
--
-- AUTO_INCREMENT for table `servis_header`
--
ALTER TABLE `servis_header`
MODIFY `no_servis` int(45) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
--
-- AUTO_INCREMENT for table `teknisi`
--
ALTER TABLE `teknisi`
MODIFY `no` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
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 */;