· 10 years ago · Jul 18, 2016, 09:00 PM
1-- --------------------------------------------------------
2
3--
4-- Estrutura para tabela `sup2y_usergroups`
5--
6
7CREATE TABLE IF NOT EXISTS `sup2y_usergroups` (
8 `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
9 `parent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Adjacency List Reference Id',
10 `lft` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set lft.',
11 `rgt` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set rgt.',
12 `title` varchar(100) NOT NULL DEFAULT '',
13 PRIMARY KEY (`id`) USING BTREE,
14 UNIQUE KEY `idx_usergroup_parent_title_lookup_new` (`parent_id`,`title`) USING BTREE,
15 KEY `idx_usergroup_title_lookup_new` (`title`) USING BTREE,
16 KEY `idx_usergroup_adjacency_lookup_new` (`parent_id`) USING BTREE,
17 KEY `idx_usergroup_nested_set_lookup_new` (`lft`,`rgt`) USING BTREE
18) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='InnoDB free: 7168 kB' AUTO_INCREMENT=10 ;
19
20--
21-- Fazendo dump de dados para tabela `sup2y_usergroups`
22--
23
24INSERT INTO `sup2y_usergroups` (`id`, `parent_id`, `lft`, `rgt`, `title`) VALUES
25(8, 0, 0, 0, 'Super Users'),
26(9, 0, 0, 0, 'Suporte');
27
28-- --------------------------------------------------------
29
30--
31-- Estrutura para tabela `sup2y_users`
32--
33
34CREATE TABLE IF NOT EXISTS `sup2y_users` (
35 `id` int(11) NOT NULL AUTO_INCREMENT,
36 `name` varchar(255) NOT NULL DEFAULT '',
37 `username` varchar(150) NOT NULL DEFAULT '',
38 `email` varchar(100) NOT NULL DEFAULT '',
39 `password` varchar(100) NOT NULL DEFAULT '',
40 `cpf` char(11) DEFAULT '',
41 `course` varchar(80) DEFAULT '',
42 `phone` char(13) DEFAULT '',
43 `usertype` varchar(25) NOT NULL DEFAULT '',
44 `block` tinyint(4) NOT NULL DEFAULT '0',
45 `sendEmail` tinyint(4) DEFAULT '0',
46 `registerDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
47 `lastvisitDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
48 `activation` varchar(100) NOT NULL DEFAULT '',
49 `params` text NOT NULL,
50 `lastResetTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Date of last password reset',
51 `resetCount` int(11) NOT NULL DEFAULT '0' COMMENT 'Count of password resets since lastResetTime',
52 PRIMARY KEY (`id`) USING BTREE,
53 KEY `usertype_new` (`usertype`) USING BTREE,
54 KEY `idx_name_new` (`name`) USING BTREE,
55 KEY `idx_block_new` (`block`) USING BTREE,
56 KEY `username_new` (`username`) USING BTREE,
57 KEY `email_new` (`email`) USING BTREE,
58 KEY `id` (`id`)
59) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='InnoDB free: 7168 kB' AUTO_INCREMENT=237 ;
60
61--
62-- Fazendo dump de dados para tabela `sup2y_users`
63--
64
65INSERT INTO `sup2y_users` (`id`, `name`, `username`, `email`, `password`, `cpf`, `course`, `phone`, `usertype`, `block`, `sendEmail`, `registerDate`, `lastvisitDate`, `activation`, `params`, `lastResetTime`, `resetCount`) VALUES
66(1, 'RONALDO FERREIRA DA SILVA', 'ronaldo', 'ronaldofsilva1@gmail.com', '871a38700a3a58fc236b7c3107945968:DrUtxEctgu9cnz20qDC6YhmBRl615jPG', '', '', '', '', 0, 0, '2015-05-11 00:00:00', '2015-05-11 00:00:00', 'Y', '', '2015-05-11 00:00:00', 0),
67(3, 'ADRIANO SILVA PEREIRA', 'adriano', 'adryanohexa123@gmail.com', '6460dc418b401a72a08c4800347be0a9:CJT5uAhVX96Ema65LPPmmhLyDM1nJTSU', '', 'SISTEMAS DE INFORMAÇÃO', '62 96646308', '', 0, 0, '2015-05-11 00:00:00', '2015-05-11 00:00:00', 'Y', '', '2015-05-11 00:00:00', 0),
68(4, 'WALLEF DE SOUSA OLIVEIRA', 'wallef', 'wallefsousa1@gmail.com', '7fcfb7b581a826a4baffb1c751a8ef50:nmQZM9ceQJBoaiCZN2dP2GmgdQuNiXOX', '', 'SISTEMAS DE INFORMAÇÃO', '', '', 0, 0, '2015-05-11 00:00:00', '2015-05-11 00:00:00', 'Y', '', '2015-05-11 00:00:00', 0),
69(9, 'root', 'teste', 'teste', 'teste', '', '', '', '', 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '', '0000-00-00 00:00:00', 0),
70(10, 'adriely', 'root', 'nega@nega.com', '63a9f0ea7bb98050796b649e85481845', '', '', '', '', 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '', '0000-00-00 00:00:00', 0),
71(236, 'Super User', 'admin', 'contato@ronaldofsilva.com.br', '52212dd409480f88e95611a58257506d:SgkronFw2YWXaUSahmnBP1swqhctw21p', '', '', '', '', 0, 0, '2015-05-15 00:00:00', '2015-05-15 00:00:00', 'Y', '', '2015-05-15 00:00:00', 0);
72
73-- --------------------------------------------------------
74
75--
76-- Estrutura para tabela `sup2y_user_usergroup_map`
77--
78
79CREATE TABLE IF NOT EXISTS `sup2y_user_usergroup_map` (
80 `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Foreign Key to #__users.id',
81 `group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Foreign Key to #__usergroups.id',
82 PRIMARY KEY (`user_id`,`group_id`) USING BTREE,
83 KEY `FK_1p0dq3awodjyampj8ymmttnpx` (`group_id`)
84) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='InnoDB free: 7168 kB';
85
86--
87-- Fazendo dump de dados para tabela `sup2y_user_usergroup_map`
88--
89
90INSERT INTO `sup2y_user_usergroup_map` (`user_id`, `group_id`) VALUES
91(1, 8),
92(2, 8),
93(4, 8),
94(9, 8),
95(10, 8),
96(236, 8),
97(3, 9);
98
99-- --------------------------------------------------------
100
101--
102-- Estrutura para tabela `sup2y_usuarios`
103--
104
105CREATE TABLE IF NOT EXISTS `sup2y_usuarios` (
106 `id` int(11) NOT NULL AUTO_INCREMENT,
107 `id_joom` int(11) NOT NULL,
108 `id_curso` int(11) NOT NULL,
109 `matricula` varchar(30) DEFAULT NULL,
110 `cpf` char(11) DEFAULT NULL,
111 `nivel` int(2) DEFAULT '3' COMMENT '{1-admin | 2-suporte | 3-usuario}',
112 `status_wifi` enum('1','2') NOT NULL DEFAULT '2' COMMENT '{1-on | 2-off}',
113 `telefone` varchar(15) DEFAULT NULL,
114 PRIMARY KEY (`id`),
115 UNIQUE KEY `matricula` (`matricula`),
116 UNIQUE KEY `cpf` (`cpf`)
117) ENGINE=InnoDB DEFAULT CHARSET=utf8 PACK_KEYS=0 COMMENT='InnoDB free: 7168 kB' AUTO_INCREMENT=23 ;
118
119--
120-- Fazendo dump de dados para tabela `sup2y_usuarios`
121--
122
123INSERT INTO `sup2y_usuarios` (`id`, `id_joom`, `id_curso`, `matricula`, `cpf`, `nivel`, `status_wifi`, `telefone`) VALUES
124(2, 3, 2, '111111111111', '12345678900', 3, '1', NULL),
125(22, 1, 5, '12013003364', '12345678900', 3, '2', '(62)9668-0226');