· 6 years ago · Jun 08, 2019, 11:58 AM
1-- MySQL dump 10.11
2--
3-- Host: localhost Database: scheduler
4-- ------------------------------------------------------
5-- Server version 5.0.77
6
7/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10/*!40101 SET NAMES utf8 */;
11/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12/*!40103 SET TIME_ZONE='+00:00' */;
13/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17
18-- GRANT all ON scheduler.* TO scheduler@'%' IDENTIFIED BY 'scheduler';
19-- DROP database IF EXISTS `scheduler`;
20-- create database scheduler CHARACTER SET utf8 COLLATE utf8_general_ci;
21-- use scheduler;
22
23--
24-- Table structure for table `call_record`
25--
26
27DROP TABLE IF EXISTS `call_record`;
28SET @saved_cs_client = @@character_set_client;
29SET character_set_client = utf8;
30CREATE TABLE `call_record` (
31 `id` int(11) NOT NULL auto_increment,
32 `line_name` int(11) NOT NULL,
33 `sim_name` int(11) NOT NULL,
34 `dir` tinyint(1) NOT NULL default '0',
35 `number` varchar(64) NOT NULL,
36 `time` timestamp NOT NULL default CURRENT_TIMESTAMP,
37 `duration` int(11) NOT NULL default '-1',
38 `iccid` varchar(32),
39 `imsi` varchar(32),
40 `imei` varchar(15),
41 `disconnect_cause` varchar(64),
42 `type` int(1) NOT NULL,
43 PRIMARY KEY (`id`),
44 KEY `sim_name` (`sim_name`),
45 KEY `time` (`time`),
46 KEY `duration` (`duration`),
47 KEY `line_name` (`line_name`),
48 KEY `type` (`type`)
49) ENGINE=InnoDB DEFAULT CHARSET=utf8;
50SET character_set_client = @saved_cs_client;
51
52--
53-- Dumping data for table `call_record`
54--
55
56LOCK TABLES `call_record` WRITE;
57/*!40000 ALTER TABLE `call_record` DISABLE KEYS */;
58/*!40000 ALTER TABLE `call_record` ENABLE KEYS */;
59UNLOCK TABLES;
60
61--
62-- Table structure for table `device_line`
63--
64
65DROP TABLE IF EXISTS `device_line`;
66SET @saved_cs_client = @@character_set_client;
67SET character_set_client = utf8;
68CREATE TABLE `device_line` (
69 `id` int(11) NOT NULL auto_increment,
70 `line_name` int(11) NOT NULL,
71 `goip_name` int(11) NOT NULL,
72 `goip_team_id` int(11) NOT NULL,
73 `line_status` int(11) NOT NULL,
74 `gsm_status` int(11) NOT NULL,
75 `imei` varchar(15) default NULL,
76 `dev_disable` int(11) NOT NULL default '0',
77 `sms_client_id` varchar(64) NOT NULL,
78 `csq` int(2) NOT NULL default '0',
79 `oper` varchar(32) NOT NULL,
80 `call_state` varchar(32) NOT NULL,
81 `sleep` tinyint(1) NOT NULL default '0',
82 `last_call_record_id` int(11) NOT NULL,
83 `auto_simulation_id` int(11) NOT NULL,
84 `next_auto_dial_time` int(10) unsigned NOT NULL,
85 `last_auto_dial_time` datetime NOT NULL,
86 PRIMARY KEY (`id`),
87 KEY `last_call_record_id` (`last_call_record_id`),
88 KEY `line_name` (`line_name`),
89 KEY `auto_simulation_id` (`auto_simulation_id`)
90) ENGINE=InnoDB DEFAULT CHARSET=utf8;
91SET character_set_client = @saved_cs_client;
92
93--
94-- Dumping data for table `device_line`
95--
96
97LOCK TABLES `device_line` WRITE;
98/*!40000 ALTER TABLE `device_line` DISABLE KEYS */;
99/*!40000 ALTER TABLE `device_line` ENABLE KEYS */;
100UNLOCK TABLES;
101
102--
103-- Table structure for table `logs`
104--
105
106DROP TABLE IF EXISTS `logs`;
107SET @saved_cs_client = @@character_set_client;
108SET character_set_client = utf8;
109CREATE TABLE `logs` (
110 `id` int(11) NOT NULL auto_increment,
111 `date` timestamp NOT NULL default CURRENT_TIMESTAMP,
112 `team_id` int(11) NOT NULL,
113 `sim_name` int(11) NOT NULL,
114 `line_name` int(11) NOT NULL,
115 `type` varchar(64) NOT NULL,
116 `log` varchar(64) NOT NULL,
117 `value` int(11) NOT NULL,
118 PRIMARY KEY (`id`),
119 KEY `sim_name` (`sim_name`),
120 KEY `line_name` (`line_name`),
121 KEY `date` (`date`),
122 KEY `team_id` (`team_id`),
123 KEY `value` (`value`)
124) ENGINE=InnoDB DEFAULT CHARSET=utf8;
125SET character_set_client = @saved_cs_client;
126
127--
128-- Dumping data for table `logs`
129--
130
131LOCK TABLES `logs` WRITE;
132/*!40000 ALTER TABLE `logs` DISABLE KEYS */;
133/*!40000 ALTER TABLE `logs` ENABLE KEYS */;
134UNLOCK TABLES;
135
136--
137-- Table structure for table `rm_device`
138--
139
140DROP TABLE IF EXISTS `rm_device`;
141SET @saved_cs_client = @@character_set_client;
142SET character_set_client = utf8;
143CREATE TABLE `rm_device` (
144 `id` int(11) NOT NULL auto_increment,
145 `type` varchar(32) NOT NULL,
146 `name` int(10) unsigned NOT NULL,
147 `tag` varchar(32) NOT NULL,
148 `password` varchar(32) NOT NULL,
149 `zone` int(10) unsigned NOT NULL,
150 `zone_tag` varchar(32) NOT NULL,
151 PRIMARY KEY (`id`),
152 KEY `name` (`name`)
153) ENGINE=InnoDB DEFAULT CHARSET=utf8;
154SET character_set_client = @saved_cs_client;
155
156--
157-- Dumping data for table `rm_device`
158--
159
160LOCK TABLES `rm_device` WRITE;
161/*!40000 ALTER TABLE `rm_device` DISABLE KEYS */;
162/*!40000 ALTER TABLE `rm_device` ENABLE KEYS */;
163UNLOCK TABLES;
164
165--
166-- Table structure for table `scheduler`
167--
168
169DROP TABLE IF EXISTS `scheduler`;
170SET @saved_cs_client = @@character_set_client;
171SET character_set_client = utf8;
172CREATE TABLE `scheduler` (
173 `id` int(11) NOT NULL auto_increment,
174 `group_id` int(11) NOT NULL,
175 `name` varchar(32) character set utf8 NOT NULL,
176 `type` varchar(16) NOT NULL,
177 `period_chaos` varchar(1000) NOT NULL,
178 `period_fixed` mediumtext,
179 `r_interval` int(11) default '0',
180 `s_interval` int(11) default '0',
181 `period_daily` varchar(1000) NOT NULL,
182 PRIMARY KEY (`id`),
183 KEY `name` (`name`)
184) ENGINE=InnoDB DEFAULT CHARSET=utf8;
185SET character_set_client = @saved_cs_client;
186
187--
188-- Dumping data for table `scheduler`
189--
190
191LOCK TABLES `scheduler` WRITE;
192/*!40000 ALTER TABLE `scheduler` DISABLE KEYS */;
193/*!40000 ALTER TABLE `scheduler` ENABLE KEYS */;
194UNLOCK TABLES;
195
196--
197-- Table structure for table `scheduler_tem`
198--
199
200DROP TABLE IF EXISTS `scheduler_tem`;
201SET @saved_cs_client = @@character_set_client;
202SET character_set_client = utf8;
203CREATE TABLE `scheduler_tem` (
204 `id` int(11) NOT NULL auto_increment,
205 `name` varchar(32) character set utf8 NOT NULL,
206 `type` varchar(16) character set utf8 NOT NULL,
207 `r_interval` int(11) default NULL,
208 `s_interval` int(11) default NULL,
209 `period` varchar(1000) character set utf8 default NULL,
210 PRIMARY KEY (`id`)
211) ENGINE=InnoDB DEFAULT CHARSET=utf8;
212SET character_set_client = @saved_cs_client;
213
214--
215-- Dumping data for table `scheduler_tem`
216--
217
218LOCK TABLES `scheduler_tem` WRITE;
219/*!40000 ALTER TABLE `scheduler_tem` DISABLE KEYS */;
220/*!40000 ALTER TABLE `scheduler_tem` ENABLE KEYS */;
221UNLOCK TABLES;
222
223--
224-- Table structure for table `sim`
225--
226
227DROP TABLE IF EXISTS `sim`;
228SET @saved_cs_client = @@character_set_client;
229SET character_set_client = utf8;
230CREATE TABLE `sim` (
231 `id` int(11) NOT NULL auto_increment,
232 `sim_name` int(11) NOT NULL default '0',
233 `bank_name` int(11) NOT NULL,
234 `sim_login` int(11) NOT NULL default '0',
235 `sim_team_id` int(11) NOT NULL default '0',
236 `goipid` int(11) NOT NULL default '0',
237 `line_name` int(11) NOT NULL default '0',
238 `dev_disable` int(11) NOT NULL default '0',
239 `plan_line_name` int(11) NOT NULL default '0',
240 `imei_mode` int(11) NOT NULL default '0',
241 `imei` varchar(15) default NULL,
242 `remain_time` int(11) NOT NULL default '-1',
243 `time_unit` int(11) NOT NULL default '60',
244 `period_limit` varchar(2000) default NULL,
245 `time_limit` int(11) default '-1',
246 `no_ring_limit` int(11) default '-1',
247 `no_answer_limit` int(11) default '-1',
248 `short_call_limit` int(11) default '-1',
249 `no_ring_remain` int(11) default '-1',
250 `no_answer_remain` int(11) default '-1',
251 `short_call_remain` int(11) default '-1',
252 `short_time` int(11) default '-1',
253 `period_time_remain` int(11) default '-1',
254 `period_count_remain` int(11) default '-1',
255 `sleep` tinyint(1) NOT NULL default '0',
256 `no_ring_disable` tinyint(1) NOT NULL default '0',
257 `no_answer_disable` tinyint(1) NOT NULL default '0',
258 `short_call_disable` tinyint(1) NOT NULL default '0',
259 `call_state` int(1) NOT NULL default '0',
260 `imsi` varchar(32) NOT NULL,
261 `last_imei` varchar(15) default NULL,
262 `count_limit` int(11) default '-1',
263 `count_remain` int(11) default '-1',
264 `no_connected_limit` int(11) default '-1',
265 `no_connected_remain` int(11) default '-1',
266 `iccid` varchar(32),
267 `logout_time` int(11) NOT NULL,
268 `s_no_connect_call_c` int(11) NOT NULL,
269 `auto_reset_remain` int(1) NOT NULL default '0',
270 `auto_reset_remain_s` int(11) NOT NULL default '60',
271 `last_call_msg` varchar(256) NOT NULL,
272 `count_limit_no_connect` BOOL NOT NULL,
273 `remark` varchar(32) NOT NULL,
274 `limit_sms` int(11) NOT NULL default '-1',
275 `remain_sms` int(11) NOT NULL default '-1',
276 `period_remain_sms` int(11) NOT NULL default '-1',
277 `month_remain_time` int(11) NOT NULL default '-1',
278 `month_limit_time` int(11) NOT NULL default '-1',
279 `month_reset_day` int(11) NOT NULL default '1',
280 `month_last_reset_time` timestamp NOT NULL default CURRENT_TIMESTAMP,
281 `simnum` VARCHAR( 32 ) NOT NULL,
282 PRIMARY KEY (`id`),
283 KEY `sim_name` (`sim_name`),
284 KEY `line_name` (`line_name`)
285) ENGINE=InnoDB DEFAULT CHARSET=utf8;
286SET character_set_client = @saved_cs_client;
287
288--
289-- Dumping data for table `sim`
290--
291
292LOCK TABLES `sim` WRITE;
293/*!40000 ALTER TABLE `sim` DISABLE KEYS */;
294/*!40000 ALTER TABLE `sim` ENABLE KEYS */;
295UNLOCK TABLES;
296
297--
298-- Table structure for table `sim_bank`
299--
300
301DROP TABLE IF EXISTS `sim_bank`;
302SET @saved_cs_client = @@character_set_client;
303SET character_set_client = utf8;
304CREATE TABLE `sim_bank` (
305 `id` int(10) unsigned NOT NULL auto_increment,
306 `name` int(10) unsigned NOT NULL,
307 `tag` varchar(32) NOT NULL,
308 `password` varchar(32) NOT NULL,
309 `type` varchar(32) NOT NULL default 'SMB32',
310 PRIMARY KEY (`id`),
311 KEY `name` (`name`)
312) ENGINE=InnoDB DEFAULT CHARSET=utf8;
313SET character_set_client = @saved_cs_client;
314
315--
316-- Dumping data for table `sim_bank`
317--
318
319LOCK TABLES `sim_bank` WRITE;
320/*!40000 ALTER TABLE `sim_bank` DISABLE KEYS */;
321/*!40000 ALTER TABLE `sim_bank` ENABLE KEYS */;
322UNLOCK TABLES;
323
324--
325-- Table structure for table `sim_team`
326--
327
328DROP TABLE IF EXISTS `sim_team`;
329SET @saved_cs_client = @@character_set_client;
330SET character_set_client = utf8;
331CREATE TABLE `sim_team` (
332 `sim_team_id` int(11) NOT NULL auto_increment,
333 `sim_team_name` varchar(64) NOT NULL default '',
334 `work_time` int(10) unsigned NOT NULL default '0',
335 `sleep_time` int(10) unsigned NOT NULL default '0',
336 `imei_random` tinyint(1) NOT NULL default '0',
337 `imei_type` int(1) NOT NULL default '0',
338 `scheduler_id` int(11) NOT NULL,
339 `status` varchar(16) NOT NULL,
340 `next_time` varchar(64) NOT NULL,
341 PRIMARY KEY (`sim_team_id`),
342 KEY `scheduler_id` (`scheduler_id`)
343) ENGINE=InnoDB DEFAULT CHARSET=utf8;
344SET character_set_client = @saved_cs_client;
345
346--
347-- Dumping data for table `sim_team`
348--
349
350LOCK TABLES `sim_team` WRITE;
351/*!40000 ALTER TABLE `sim_team` DISABLE KEYS */;
352/*!40000 ALTER TABLE `sim_team` ENABLE KEYS */;
353UNLOCK TABLES;
354
355--
356-- Table structure for table `system`
357--
358
359DROP TABLE IF EXISTS `system`;
360SET @saved_cs_client = @@character_set_client;
361SET character_set_client = utf8;
362CREATE TABLE `system` (
363 `sysname` varchar(64) NOT NULL default '',
364 `lan` int(1) NOT NULL default '0',
365 `bottom_alive` tinyint(1) NOT NULL default '0',
366 `warning_remain_time` int(11) NOT NULL default '20',
367 `warning_remain_count` int(11) NOT NULL default '10',
368 `version` int(11) NOT NULL default '0',
369 `auto_disable` tinyint(1) NOT NULL,
370 `auto_disable_logout_min` int(11) NOT NULL default '5',
371 `auto_disable_s_call` tinyint(1) NOT NULL,
372 `auto_disable_s_call_c` int(11) unsigned NOT NULL default '1',
373 `auto_disable_s_call_msg` varchar(256) NOT NULL default 'Unassigned (unallocated) number',
374 `auto_disable_low_asr` tinyint(1) NOT NULL default '0',
375 `auto_disable_asr_number` int(11) unsigned NOT NULL default '10',
376 `auto_disable_asr_threshold` int(11) unsigned NOT NULL default '15',
377 `auto_disable_low_acd` tinyint(1) NOT NULL default '0',
378 `auto_disable_acd_number` int(11) unsigned NOT NULL default '10',
379 `auto_disable_acd_threshold` int(11) unsigned NOT NULL default '30',
380 `auto_reboot_s_call` tinyint(1) NOT NULL,
381 `auto_reboot_s_call_msg` varchar(256) NOT NULL default 'Unassigned (unallocated) number'
382) ENGINE=InnoDB DEFAULT CHARSET=utf8;
383SET character_set_client = @saved_cs_client;
384
385--
386-- Dumping data for table `system`
387--
388
389LOCK TABLES `system` WRITE;
390/*!40000 ALTER TABLE `system` DISABLE KEYS */;
391INSERT INTO `system` VALUES ('Simbank Server',3,1,20,10,113,0,5,0,1,'Unassigned (unallocated) number',0, 10, 15, 0, 10, 30, 0, 'Unassigned (unallocated) number');
392/*!40000 ALTER TABLE `system` ENABLE KEYS */;
393UNLOCK TABLES;
394
395CREATE TABLE IF NOT EXISTS `auto_simulation` (
396 `id` int(11) NOT NULL auto_increment,
397 `name` varchar(64) character set utf8 NOT NULL,
398 `disable` tinyint(1) NOT NULL default '0',
399 `dial_num` varchar(4000) NOT NULL,
400 `period_min` int(11) NOT NULL,
401 `period_max` int(11) NOT NULL,
402 `talk_time_min` int(11) NOT NULL,
403 `talk_time_max` int(11) NOT NULL,
404 `next_time` datetime NOT NULL,
405 `last_time` datetime NOT NULL,
406 `period_type` int(11) NOT NULL default '0',
407 `period_setting` varchar(2000) NOT NULL,
408 PRIMARY KEY (`id`)
409) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
410
411
412CREATE TABLE IF NOT EXISTS `imei_db` (
413 `id` int(11) NOT NULL auto_increment,
414 `imei` varchar(15) NOT NULL,
415 `sim_name` int(11) NOT NULL default '0',
416 `used` int(11) NOT NULL default '0',
417 `used_time` datetime NOT NULL,
418 `imsi` varchar(32) NOT NULL,
419 PRIMARY KEY (`id`),
420 UNIQUE KEY `imei` (`imei`),
421 KEY `sim_name` (`sim_name`),
422 KEY `used` (`used`),
423 KEY `imsi` (`imsi`)
424) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
425
426--
427-- Table structure for table `user`
428--
429
430DROP TABLE IF EXISTS `user`;
431SET @saved_cs_client = @@character_set_client;
432SET character_set_client = utf8;
433CREATE TABLE `user` (
434 `id` int(11) NOT NULL auto_increment,
435 `name` varchar(64) NOT NULL default '',
436 `permissions` int(1) NOT NULL default '2',
437 `password` varchar(64) NOT NULL default '',
438 `info` text NOT NULL,
439 PRIMARY KEY (`id`)
440) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
441SET character_set_client = @saved_cs_client;
442
443--
444-- Dumping data for table `user`
445--
446
447CREATE TABLE IF NOT EXISTS `human_ref` (
448 `id` int(11) NOT NULL auto_increment,
449 `line_id` int(11) NOT NULL,
450 `auto_simulation_id` int(11) NOT NULL,
451 PRIMARY KEY (`id`),
452 KEY `sim_name` (`line_id`,`auto_simulation_id`)
453) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
454
455
456LOCK TABLES `user` WRITE;
457/*!40000 ALTER TABLE `user` DISABLE KEYS */;
458INSERT INTO `user` VALUES (1,'admin',1,'8801cc331d4af0d20c1cf138672c7115','1111');
459/*!40000 ALTER TABLE `user` ENABLE KEYS */;
460UNLOCK TABLES;
461/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
462
463/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
464/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
465/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
466/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
467/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
468/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
469/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
470
471-- Dump completed on 2012-07-08 13:13:35