-
Notifications
You must be signed in to change notification settings - Fork 21
/
dnms.sql
110 lines (103 loc) · 3.38 KB
/
dnms.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
-- ----------------------------
-- Table structure for devices
-- ----------------------------
DROP TABLE IF EXISTS `devices`;
CREATE TABLE `devices` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`serverId` int DEFAULT NULL,
`name` varchar(32) DEFAULT NULL,
`comment` varchar(128) DEFAULT NULL,
`connectTo` varchar(64) DEFAULT '',
`snmpCommunity` varchar(16) DEFAULT 'public',
`connectedTo` int DEFAULT '0',
`os` enum('routeros','airos','other') DEFAULT NULL,
`wireless` tinyint(1) DEFAULT NULL,
`latitude` double DEFAULT NULL,
`longitude` double DEFAULT NULL,
`enabled` tinyint(1) DEFAULT '1',
`visible` tinyint(1) DEFAULT '1',
`createdAt` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`updatedAt` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
);
DROP TABLE IF EXISTS `extras`;
CREATE TABLE `extras` (
`id` int NOT NULL AUTO_INCREMENT,
`key` varchar(255) DEFAULT NULL,
`value` varchar(255) DEFAULT NULL,
`createdAt` timestamp NULL DEFAULT NULL,
`updatedAt` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
);
-- ----------------------------
-- Records of extras
-- ----------------------------
BEGIN;
INSERT INTO `extras` VALUES (1, 'radarTelegramReport', '1', NULL, '2021-05-08 15:31:21');
COMMIT;
-- ----------------------------
-- Table structure for servers
-- ----------------------------
DROP TABLE IF EXISTS `servers`;
CREATE TABLE `servers` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) DEFAULT NULL,
`comment` varchar(128) DEFAULT NULL,
`connectTo` varchar(64) DEFAULT NULL,
`apiPort` int DEFAULT '8728',
`username` varchar(16) DEFAULT NULL,
`password` varchar(64) DEFAULT NULL,
`winboxPort` int DEFAULT '8291',
`singleCredential` tinyint(1) DEFAULT '1',
`snmpCommunity` varchar(16) DEFAULT NULL,
`mainInterface` varchar(16) DEFAULT NULL,
`latitude` double DEFAULT NULL,
`longitude` double DEFAULT NULL,
`enabled` tinyint(1) DEFAULT '1',
`createdAt` timestamp NULL DEFAULT NULL,
`updatedAt` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
);
-- ----------------------------
-- Table structure for sessions
-- ----------------------------
DROP TABLE IF EXISTS `sessions`;
CREATE TABLE `sessions` (
`sid` varchar(255) NOT NULL,
`session` text NOT NULL,
`expires` int DEFAULT NULL,
PRIMARY KEY (`sid`)
);
-- ----------------------------
-- Table structure for subnetworks
-- ----------------------------
DROP TABLE IF EXISTS `subnetworks`;
CREATE TABLE `subnetworks` (
`id` int NOT NULL AUTO_INCREMENT,
`serverId` int DEFAULT NULL,
`name` varchar(32) DEFAULT NULL,
`deviceId` text,
`enabled` tinyint(1) DEFAULT '1',
`createdAt` timestamp NULL DEFAULT NULL,
`updatedAt` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
);
-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) DEFAULT NULL,
`username` varchar(64) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`createdAt` timestamp NULL DEFAULT NULL,
`updatedAt` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
);
-- ----------------------------
-- Records of users
-- ----------------------------
BEGIN;
INSERT INTO `users` VALUES (1, 'Daimus Suudi', 'admin', '$2b$10$mtrIX7U61PS1.VaiTbLcbeBt1HwLAJafHom/DViHR3y7nmHymyp3e', NULL, '2021-05-09 00:58:24');
COMMIT;