-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathsms.sql
333 lines (268 loc) · 10.7 KB
/
sms.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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
--
-- Table structure for table `daemons`
--
CREATE TABLE IF NOT EXISTS `daemons` (
`Start` text NOT NULL,
`Info` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `daemons`
--
-- --------------------------------------------------------
--
-- Table structure for table `dosen`
--
CREATE TABLE IF NOT EXISTS `dosen` (
`id_dosen` int(6) NOT NULL AUTO_INCREMENT,
`nama_dosen` varchar(250) NOT NULL,
`hp` varchar(20) NOT NULL,
`password` varchar(25) NOT NULL,
`jurusan` int(3) NOT NULL,
PRIMARY KEY (`id_dosen`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=15 ;
--
-- Dumping data for table `dosen`
--
-- --------------------------------------------------------
--
-- Table structure for table `gammu`
--
CREATE TABLE IF NOT EXISTS `gammu` (
`Version` int(11) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `gammu`
--
INSERT INTO `gammu` (`Version`) VALUES
(10);
-- --------------------------------------------------------
--
-- Table structure for table `inbox`
--
CREATE TABLE IF NOT EXISTS `inbox` (
`UpdatedInDB` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`ReceivingDateTime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`Text` text NOT NULL,
`SenderNumber` varchar(20) NOT NULL DEFAULT '',
`Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NOT NULL DEFAULT 'Default_No_Compression',
`UDH` text NOT NULL,
`SMSCNumber` varchar(20) NOT NULL DEFAULT '',
`Class` int(11) NOT NULL DEFAULT '-1',
`TextDecoded` varchar(160) NOT NULL DEFAULT '',
`ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`RecipientID` text NOT NULL,
`Processed` enum('false','true') NOT NULL DEFAULT 'false',
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=32 ;
--
-- Dumping data for table `inbox`
--
-- --------------------------------------------------------
--
-- Table structure for table `jurusan`
--
CREATE TABLE IF NOT EXISTS `jurusan` (
`id_jurusan` int(3) NOT NULL,
`jurusan` varchar(50) NOT NULL,
PRIMARY KEY (`id_jurusan`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `jurusan`
--
INSERT INTO `jurusan` (`id_jurusan`, `jurusan`) VALUES
(521, 'Teknik Kimia'),
(522, 'Teknik Industri'),
(523, 'Teknik Informatika'),
(524, 'Teknik Elektro'),
(525, 'Teknik Mesin');
-- --------------------------------------------------------
--
-- Table structure for table `mahasiswa`
--
CREATE TABLE IF NOT EXISTS `mahasiswa` (
`id_mahasiswa` int(8) NOT NULL AUTO_INCREMENT,
`nim` varchar(8) NOT NULL,
`nama` varchar(250) NOT NULL,
`hp` varchar(14) NOT NULL,
`kode_matakuliah` varchar(8) NOT NULL,
PRIMARY KEY (`id_mahasiswa`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=14 ;
--
-- Dumping data for table `mahasiswa`
--
-- --------------------------------------------------------
--
-- Table structure for table `matakuliah`
--
CREATE TABLE IF NOT EXISTS `matakuliah` (
`kode_matakuliah` varchar(8) NOT NULL,
`matakuliah` varchar(250) NOT NULL,
`kelas` varchar(1) NOT NULL,
`ruang` varchar(8) NOT NULL,
`waktu` varchar(11) NOT NULL,
`hari` varchar(25) NOT NULL,
`semester` varchar(6) NOT NULL,
`id_dosen` int(6) NOT NULL,
`id_jurusan` int(3) NOT NULL,
PRIMARY KEY (`kode_matakuliah`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `matakuliah`
--
-- --------------------------------------------------------
--
-- Table structure for table `outbox`
--
CREATE TABLE IF NOT EXISTS `outbox` (
`UpdatedInDB` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`InsertIntoDB` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`SendingDateTime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`Text` text,
`DestinationNumber` varchar(20) NOT NULL DEFAULT '',
`Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NOT NULL DEFAULT 'Default_No_Compression',
`UDH` text,
`Class` int(11) DEFAULT '-1',
`TextDecoded` varchar(160) NOT NULL DEFAULT '',
`ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`MultiPart` enum('false','true') DEFAULT 'false',
`RelativeValidity` int(11) DEFAULT '-1',
`SenderID` varchar(255) DEFAULT NULL,
`SendingTimeOut` timestamp NULL DEFAULT '0000-00-00 00:00:00',
`DeliveryReport` enum('default','yes','no') DEFAULT 'default',
`CreatorID` text NOT NULL,
PRIMARY KEY (`ID`),
KEY `outbox_date` (`SendingDateTime`,`SendingTimeOut`),
KEY `outbox_sender` (`SenderID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=437 ;
--
-- Dumping data for table `outbox`
--
-- --------------------------------------------------------
--
-- Table structure for table `outbox_multipart`
--
CREATE TABLE IF NOT EXISTS `outbox_multipart` (
`Text` text,
`Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NOT NULL DEFAULT 'Default_No_Compression',
`UDH` text,
`Class` int(11) DEFAULT '-1',
`TextDecoded` varchar(160) DEFAULT NULL,
`ID` int(10) unsigned NOT NULL DEFAULT '0',
`SequencePosition` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`ID`,`SequencePosition`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `outbox_multipart`
--
-- --------------------------------------------------------
--
-- Table structure for table `phones`
--
CREATE TABLE IF NOT EXISTS `phones` (
`ID` text NOT NULL,
`UpdatedInDB` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`InsertIntoDB` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`TimeOut` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`Send` enum('yes','no') NOT NULL DEFAULT 'no',
`Receive` enum('yes','no') NOT NULL DEFAULT 'no',
`IMEI` varchar(35) NOT NULL,
`Client` text NOT NULL,
`Battery` int(11) NOT NULL DEFAULT '0',
`Signal` int(11) NOT NULL DEFAULT '0',
`Sent` int(11) NOT NULL DEFAULT '0',
`Received` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`IMEI`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `phones`
--
-- --------------------------------------------------------
--
-- Table structure for table `reply`
--
CREATE TABLE IF NOT EXISTS `reply` (
`id` int(2) NOT NULL AUTO_INCREMENT,
`keyword` varchar(250) NOT NULL,
`pesan` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ;
--
-- Dumping data for table `reply`
--
INSERT INTO `reply` (`id`, `keyword`, `pesan`) VALUES
(1, 'KOSONG', 'Diberitahukan kepada mahasiswa yang mengambil matakuliah [matakuliah], kelas [kelas], hari [hari], pukul [jam], bahwa kuliah pada minggu ini dinyatakan KOSONG.'),
(4, 'SUKSES', 'Pengumuman berhasil diproses'),
(2, 'GANTI', 'Diberitahukan kepada mahasiswa yang mengambil matakuliah [matakuliah], kelas [kelas], hari [hari], pukul [jam], bahwa kuliah untuk minggu ini diganti pada hari [ganti_hari] pukul [ganti_jam].'),
(5, 'GAGAL', 'Pengumuman gagal diproses'),
(3, 'ONLINE', 'Diberitahukan kepada mahasiswa yang mengambil matakuliah [matakuliah], kelas [kelas], hari [hari], pukul [jam], bahwa kuliah untuk hari ini diganti ONLINE pukul [ganti_jam].'),
(6, 'SALAH (KODE MATAKULIAH)', 'Maaf, matakuliah tidak tesedia'),
(7, 'SALAH (PASSWORD)', 'Maaf, akun Anda tidak tersedia atau password Anda salah'),
(8, 'GANTI SALAH (FORMAT HARI ATAU JAM)', 'Terdapat kesalahan pada penulisan format hari atau jam. Contoh format yang benar untuk kuliah pengganti adalah: GANTI ADIL 5230001A SENIN 08:00'),
(9, 'ONLINE SALAH (FORMAT JAM)', 'Terdapat kesalahan pada penulisan format jam. Contoh format yang benar untuk kuliah online adalah: ONLINE ADIL 5230001A 08:00'),
(10, 'SALAH KEYWORD', 'Keyword salah. Cek jadwal, ketik: JADWAL[spasi]PASS. Pengumuman kuliah kosong, ketik: KOSONG[spasi]PASS[spasi]KODEMATAKULIAH. Pengumuman kuliah pengganti, ketik: GANTI[spasi]PASS[spasi]KODEMATAKULIAH[spasi]HARI[spasi]JAM. Pengumuman kuliah online, ketik: ONLINE[spasi]PASS[spasi]KODEMATAKULIAH[spasi]JAM.'),
(11, 'JADWAL', '[nomor].[matakuliah] ([kelas]), hari [hari] pukul [jam], pass: "[pass]" '),
(12, 'AKTIFKAN', 'Selamat [nama], akun Anda untuk menggunakan layanan SMS Kuliah telah diaktifkan dengan password: "[pass]"');
(13, 'PENGUMUMAN', 'SMS Kuliah: [isi_pengumuman]');
-- --------------------------------------------------------
--
-- Table structure for table `request_dosen`
--
CREATE TABLE IF NOT EXISTS `request_dosen` (
`id_dosen` int(6) NOT NULL AUTO_INCREMENT,
`nama_dosen` varchar(250) NOT NULL,
`hp` varchar(20) NOT NULL,
`password` varchar(25) NOT NULL,
`jurusan` int(3) NOT NULL,
PRIMARY KEY (`id_dosen`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table `request_dosen`
--
-- --------------------------------------------------------
--
-- Table structure for table `sentitems`
--
CREATE TABLE IF NOT EXISTS `sentitems` (
`UpdatedInDB` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`InsertIntoDB` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`SendingDateTime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`DeliveryDateTime` timestamp NULL DEFAULT NULL,
`Text` text NOT NULL,
`DestinationNumber` varchar(20) NOT NULL DEFAULT '',
`Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NOT NULL DEFAULT 'Default_No_Compression',
`UDH` text NOT NULL,
`SMSCNumber` varchar(20) NOT NULL DEFAULT '',
`Class` int(11) NOT NULL DEFAULT '-1',
`TextDecoded` varchar(160) NOT NULL DEFAULT '',
`ID` int(10) unsigned NOT NULL DEFAULT '0',
`SenderID` varchar(255) NOT NULL,
`SequencePosition` int(11) NOT NULL DEFAULT '1',
`Status` enum('SendingOK','SendingOKNoReport','SendingError','DeliveryOK','DeliveryFailed','DeliveryPending','DeliveryUnknown','Error') NOT NULL DEFAULT 'SendingOK',
`StatusError` int(11) NOT NULL DEFAULT '-1',
`TPMR` int(11) NOT NULL DEFAULT '-1',
`RelativeValidity` int(11) NOT NULL DEFAULT '-1',
`CreatorID` text NOT NULL,
PRIMARY KEY (`ID`,`SequencePosition`),
KEY `sentitems_date` (`DeliveryDateTime`),
KEY `sentitems_tpmr` (`TPMR`),
KEY `sentitems_dest` (`DestinationNumber`),
KEY `sentitems_sender` (`SenderID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `sentitems`
--
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE IF NOT EXISTS `user` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL,
`password` varchar(250) NOT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`user_id`, `username`, `password`) VALUES
(1, 'admin', '21232f297a57a5a743894a0e4a801fc3');