-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 02-Mar-2020 às 14:52
-- Versão do servidor: 10.4.6-MariaDB
-- versão do PHP: 7.2.26

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 */;

--
-- Banco de dados: `cakeadmlte`
--

-- --------------------------------------------------------

--
-- Estrutura da tabela `customers`
--

CREATE TABLE `customers` (
  `id` int(11) NOT NULL,
  `name` varchar(55) COLLATE utf8_unicode_ci NOT NULL,
  `birthday` date DEFAULT NULL,
  `phone` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  `observation` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `created` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Extraindo dados da tabela `customers`
--

INSERT INTO `customers` (`id`, `name`, `birthday`, `phone`, `user_id`, `observation`, `created`, `modified`) VALUES
(1, 'Brennan G. Wilcox', '2016-04-15', '(851) 190-1314', 3, 'ante. Maecenas mi felis, adipiscing', NULL, NULL),
(2, 'Chase Summers', '2016-08-27', '(846) 297-4733', 3, 'Sed molestie. Sed id risus', NULL, NULL),
(3, 'Sonia L. Mckay', '2015-12-02', '(131) 453-1690', 2, 'fermentum vel, mauris. Integer sem', NULL, NULL),
(4, 'Isadora L. Bowers', '2015-10-24', '(939) 798-4625', 2, 'consequat, lectus sit amet luctus', NULL, NULL),
(5, 'Sophia Cochran', '2017-06-15', '(811) 687-0491', 2, 'Aliquam tincidunt, nunc ac mattis', NULL, NULL),
(6, 'Maxwell T. Burton', '2016-01-12', '(147) 962-3265', 2, 'at arcu. Vestibulum ante ipsum', NULL, NULL),
(7, 'Desiree Y. Henry', '2017-07-21', '(148) 711-3747', 2, 'vitae dolor. Donec fringilla. Donec', NULL, NULL),
(8, 'Asher Key', '2015-11-07', '(355) 668-5871', 3, 'a, aliquet vel, vulputate eu,', NULL, NULL),
(9, 'Tyler Castro', '2016-08-31', '(567) 793-5061', 4, 'nec tempus mauris erat eget', NULL, NULL),
(10, 'Rudyard Weber', '2015-10-26', '(445) 457-4552', 1, 'Morbi vehicula. Pellentesque tincidunt tempus', NULL, NULL),
(11, 'Allen Austin', '2016-04-15', '(758) 867-2179', 4, 'ipsum. Phasellus vitae mauris sit', NULL, NULL),
(12, 'Octavius Cooper', '2015-10-13', '(101) 625-3985', 4, 'ipsum non arcu. Vivamus sit', NULL, NULL),
(13, 'Dustin M. Oneill', '2016-04-24', '(276) 722-0976', 1, 'magnis dis parturient montes, nascetur', NULL, NULL),
(14, 'Giacomo K. Horton', '2016-07-03', '(773) 532-7468', 3, 'neque. Sed eget lacus. Mauris', NULL, NULL),
(15, 'Signe T. Weaver', '2016-06-17', '(210) 895-3664', 3, 'dui nec urna suscipit nonummy.', NULL, NULL),
(16, 'Avram O. Delaney', '2016-08-05', '(609) 552-7572', 2, 'Donec luctus aliquet odio. Etiam', NULL, NULL),
(17, 'Cara Parker', '2016-07-24', '(854) 169-4797', 3, 'ornare lectus justo eu arcu.', NULL, NULL),
(18, 'Chelsea Mcclain', '2016-08-06', '(363) 636-1560', 3, 'mollis lectus pede et risus.', NULL, NULL),
(19, 'Wesley Garner', '2016-06-11', '(578) 231-2389', 1, 'Fusce feugiat. Lorem ipsum dolor', NULL, NULL),
(20, 'Irene P. Arnold', '2016-02-12', '(253) 631-9830', 1, 'accumsan laoreet ipsum. Curabitur consequat,', NULL, NULL),
(21, 'Austin S. Wall', '2016-01-21', '(225) 694-9511', 2, 'Sed eget lacus. Mauris non', NULL, NULL),
(22, 'Roanna K. Ortiz', '2016-08-28', '(336) 788-2145', 1, 'congue a, aliquet vel, vulputate', NULL, NULL),
(23, 'Jenette X. Sexton', '2017-01-03', '(788) 349-8719', 3, 'vestibulum. Mauris magna. Duis dignissim', NULL, NULL),
(24, 'Raya C. Foster', '2017-05-10', '(456) 872-8316', 2, 'a, facilisis non, bibendum sed,', NULL, NULL),
(25, 'Ori Chapman', '2017-03-16', '(782) 146-0174', 3, 'Curabitur dictum. Phasellus in felis.', NULL, NULL),
(26, 'Samantha Coffey', '2016-06-25', '(810) 586-5638', 4, 'est. Nunc ullamcorper, velit in', NULL, NULL),
(27, 'Hannah Pittman', '2016-02-21', '(391) 945-3210', 4, 'sem magna nec quam. Curabitur', NULL, NULL),
(28, 'April Walton', '2015-10-09', '(328) 217-3934', 3, 'tincidunt, nunc ac mattis ornare,', NULL, NULL),
(29, 'Flynn B. Willis', '2016-10-30', '(898) 157-2500', 1, 'Suspendisse non leo. Vivamus nibh', NULL, NULL),
(30, 'Coby L. Duke', '2015-10-15', '(520) 634-0436', 4, 'tristique senectus et netus et', NULL, NULL),
(31, 'Natalie W. Lewis', '2016-06-05', '(148) 747-9979', 3, 'mauris sagittis placerat. Cras dictum', NULL, NULL),
(32, 'Angelica T. Daniels', '2016-11-18', '(881) 755-2951', 4, 'diam eu dolor egestas rhoncus.', NULL, NULL),
(33, 'Serina Rush', '2016-11-15', '(988) 136-7179', 3, 'at, egestas a, scelerisque sed,', NULL, NULL),
(34, 'Jessamine Bright', '2015-10-10', '(659) 268-8156', 1, 'penatibus et magnis dis parturient', NULL, NULL),
(35, 'Hannah Hobbs', '2016-07-21', '(151) 679-7163', 4, 'id ante dictum cursus. Nunc', NULL, NULL),
(36, 'Charity Allison', '2017-02-09', '(697) 761-4890', 4, 'Sed nec metus facilisis lorem', NULL, NULL),
(37, 'Nathaniel Jefferson', '2017-02-17', '(601) 671-1557', 2, 'lorem, luctus ut, pellentesque eget,', NULL, NULL),
(38, 'Amos Holcomb', '2016-06-13', '(320) 249-8062', 1, 'ullamcorper, nisl arcu iaculis enim,', NULL, NULL),
(39, 'Sierra Dickerson', '2016-04-03', '(772) 676-9252', 4, 'orci lobortis augue scelerisque mollis.', NULL, NULL),
(40, 'Vincent Patrick', '2017-05-21', '(655) 479-0250', 4, 'adipiscing ligula. Aenean gravida nunc', NULL, NULL),
(41, 'Lee B. Lang', '2016-03-26', '(418) 950-4721', 4, 'fermentum convallis ligula. Donec luctus', NULL, NULL),
(42, 'Rashad S. Le', '2016-04-13', '(469) 302-1629', 1, 'placerat, orci lacus vestibulum lorem,', NULL, NULL),
(43, 'Mufutau S. Head', '2016-09-14', '(426) 374-0954', 4, 'felis purus ac tellus. Suspendisse', NULL, NULL),
(44, 'Maite X. Dunlap', '2017-08-25', '(867) 538-7251', 3, 'Ut nec urna et arcu', NULL, NULL),
(45, 'Cassady Newton', '2017-01-23', '(298) 700-8481', 2, 'erat eget ipsum. Suspendisse sagittis.', NULL, NULL),
(46, 'Jorden Galloway', '2016-09-11', '(930) 855-8859', 1, 'blandit at, nisi. Cum sociis', NULL, NULL),
(47, 'Jakeem Stanley', '2017-06-01', '(407) 952-4742', 2, 'blandit at, nisi. Cum sociis', NULL, NULL),
(48, 'Armando O. Thomas', '2017-05-18', '(253) 534-3585', 3, 'magna et ipsum cursus vestibulum.', NULL, NULL),
(49, 'Mary Henson', '2016-04-05', '(530) 651-2228', 3, 'nonummy. Fusce fermentum fermentum arcu.', NULL, NULL),
(50, 'Preston N. May', '2016-01-24', '(233) 386-3409', 2, 'convallis erat, eget tincidunt dui', NULL, NULL),
(51, 'Nell Y. Burke', '2016-05-09', '(641) 510-4487', 2, 'sed consequat auctor, nunc nulla', NULL, NULL),
(52, 'Colorado K. Johnston', '2015-10-07', '(694) 733-6952', 2, 'Nam consequat dolor vitae dolor.', NULL, NULL),
(53, 'Dana Huber', '2016-03-04', '(870) 167-6225', 2, 'Praesent luctus. Curabitur egestas nunc', NULL, NULL),
(54, 'Colorado R. Lane', '2016-02-10', '(146) 264-1474', 2, 'semper cursus. Integer mollis. Integer', NULL, NULL),
(55, 'Dane M. Morrow', '2015-10-13', '(494) 572-0004', 1, 'Duis ac arcu. Nunc mauris.', NULL, NULL),
(56, 'Baker Parker', '2015-10-25', '(880) 195-3158', 4, 'eros. Proin ultrices. Duis volutpat', NULL, NULL),
(57, 'Basil J. Nelson', '2016-03-20', '(797) 389-8349', 1, 'turpis egestas. Aliquam fringilla cursus', NULL, NULL),
(58, 'Aspen Wood', '2017-07-24', '(880) 308-5744', 2, 'purus, accumsan interdum libero dui', NULL, NULL),
(59, 'Suki Morgan', '2017-08-10', '(417) 983-7701', 3, 'Nulla tincidunt, neque vitae semper', NULL, NULL),
(60, 'Josiah I. Barrera', '2016-11-01', '(242) 478-6171', 1, 'cursus, diam at pretium aliquet,', NULL, NULL),
(61, 'Jarrod Y. Reilly', '2016-11-02', '(739) 917-3117', 2, 'facilisis eget, ipsum. Donec sollicitudin', NULL, NULL),
(62, 'Noble D. Johnston', '2017-02-20', '(419) 478-5918', 1, 'Duis sit amet diam eu', NULL, NULL),
(63, 'Grant P. Morton', '2016-08-01', '(983) 130-8454', 3, 'mollis dui, in sodales elit', NULL, NULL),
(64, 'Beau Delacruz', '2016-09-23', '(357) 479-4057', 4, 'ante ipsum primis in faucibus', NULL, NULL),
(65, 'Eaton R. Carlson', '2015-10-23', '(651) 713-5372', 3, 'dolor elit, pellentesque a, facilisis', NULL, NULL),
(66, 'Candice T. Bruce', '2017-04-08', '(597) 716-4390', 3, 'est ac mattis semper, dui', NULL, NULL),
(67, 'Noelani K. Todd', '2016-11-24', '(196) 634-6147', 4, 'fringilla est. Mauris eu turpis.', NULL, NULL),
(68, 'Joel Giles', '2016-11-15', '(308) 918-6363', 1, 'Sed neque. Sed eget lacus.', NULL, NULL),
(69, 'Micah T. Whitaker', '2017-06-18', '(882) 776-3407', 1, 'at, libero. Morbi accumsan laoreet', NULL, NULL),
(70, 'Irene Harmon', '2016-05-13', '(312) 982-8432', 1, 'non sapien molestie orci tincidunt', NULL, NULL),
(71, 'Benjamin Evans', '2016-02-01', '(954) 608-2193', 4, 'sit amet ultricies sem magna', NULL, NULL),
(72, 'Jaden V. Snow', '2017-06-11', '(129) 287-1852', 2, 'enim consequat purus. Maecenas libero', NULL, NULL),
(73, 'Lois I. Monroe', '2017-04-30', '(561) 356-4051', 4, 'parturient montes, nascetur ridiculus mus.', NULL, NULL),
(74, 'Fitzgerald F. Hodge', '2017-07-09', '(635) 741-8709', 3, 'risus. Morbi metus. Vivamus euismod', NULL, NULL),
(75, 'Evangeline Harrington', '2017-01-18', '(379) 320-1729', 1, 'enim. Mauris quis turpis vitae', NULL, NULL),
(76, 'Vincent Wade', '2015-10-05', '(629) 652-1065', 4, 'at fringilla purus mauris a', NULL, NULL),
(77, 'Beverly S. Dalton', '2017-08-02', '(109) 903-6686', 3, 'consequat purus. Maecenas libero est,', NULL, NULL),
(78, 'Aretha Cummings', '2015-11-10', '(725) 814-9857', 4, 'convallis convallis dolor. Quisque tincidunt', NULL, NULL),
(79, 'Zachary I. Sweeney', '2017-03-07', '(548) 146-2685', 1, 'pede ac urna. Ut tincidunt', NULL, NULL),
(80, 'Dominique C. Mason', '2016-06-01', '(263) 893-9386', 3, 'tellus lorem eu metus. In', NULL, NULL),
(81, 'Vaughan Wilcox', '2017-08-20', '(583) 161-2497', 3, 'sem magna nec quam. Curabitur', NULL, NULL),
(82, 'Jarrod B. Oneal', '2016-11-23', '(775) 692-0184', 1, 'Suspendisse ac metus vitae velit', NULL, NULL),
(83, 'Dexter Kennedy', '2017-03-17', '(802) 465-9811', 1, 'Nulla tempor augue ac ipsum.', NULL, NULL),
(84, 'Ross V. Simpson', '2017-04-28', '(615) 773-2137', 2, 'neque pellentesque massa lobortis ultrices.', NULL, NULL),
(85, 'Desiree H. Chaney', '2017-08-27', '(881) 809-1454', 3, 'faucibus leo, in lobortis tellus', NULL, NULL),
(86, 'Trevor Parrish', '2017-07-17', '(651) 788-9732', 1, 'felis. Donec tempor, est ac', NULL, NULL),
(87, 'Jacob Suarez', '2016-05-08', '(413) 657-2282', 2, 'placerat, augue. Sed molestie. Sed', NULL, NULL),
(88, 'Zenia W. Ramos', '2016-12-10', '(504) 651-3900', 2, 'vitae mauris sit amet lorem', NULL, NULL),
(89, 'Macy Jenkins', '2016-12-12', '(216) 786-1537', 2, 'amet orci. Ut sagittis lobortis', NULL, NULL),
(90, 'Sylvia Harmon', '2016-01-27', '(358) 874-1157', 2, 'fringilla ornare placerat, orci lacus', NULL, NULL),
(91, 'Derek O. Leach', '2016-05-06', '(276) 466-7185', 1, 'iaculis quis, pede. Praesent eu', NULL, NULL),
(92, 'Callie Beasley', '2017-04-26', '(736) 940-5926', 1, 'tristique ac, eleifend vitae, erat.', NULL, NULL),
(93, 'Madeline Mccullough', '2016-06-07', '(447) 953-7112', 3, 'a, facilisis non, bibendum sed,', NULL, NULL),
(94, 'Dacey K. Barnes', '2016-12-09', '(808) 944-1291', 1, 'eu elit. Nulla facilisi. Sed', NULL, NULL),
(95, 'Aimee Crawford', '2016-03-25', '(433) 180-8813', 2, 'ultrices sit amet, risus. Donec', NULL, NULL),
(96, 'Brennan Fox', '2015-12-01', '(151) 364-5439', 2, 'semper. Nam tempor diam dictum', NULL, NULL),
(97, 'Chelsea C. Tran', '2015-10-11', '(509) 783-6846', 2, 'justo eu arcu. Morbi sit', NULL, NULL),
(98, 'Galvin P. Farmer', '2017-05-18', '(914) 669-5904', 3, 'at auctor ullamcorper, nisl arcu', NULL, NULL),
(99, 'Samuel J. Camacho', '2017-06-10', '(406) 890-0419', 3, 'lacus. Aliquam rutrum lorem ac', NULL, NULL),
(100, 'Steven Mercer', '2017-05-16', '(651) 284-6016', 2, 'semper, dui lectus rutrum urna,', NULL, NULL);

-- --------------------------------------------------------

--
-- Estrutura da tabela `empresas`
--

CREATE TABLE `empresas` (
  `id` int(5) UNSIGNED NOT NULL,
  `cnpj` varchar(16) NOT NULL,
  `nome_empresa` varchar(60) NOT NULL,
  `responsavel` varchar(40) DEFAULT NULL,
  `endereco` varchar(60) NOT NULL,
  `email` varchar(60) NOT NULL,
  `CEP` varchar(9) DEFAULT NULL,
  `cidade` varchar(50) NOT NULL,
  `uf` varchar(2) NOT NULL,
  `telefone` varchar(12) NOT NULL,
  `celular` varchar(13) NOT NULL,
  `emailenvio` varchar(60) DEFAULT NULL,
  `senhaemailenvio` varchar(16) DEFAULT NULL,
  `recriador` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Estrutura da tabela `groups`
--

CREATE TABLE `groups` (
  `id` int(11) NOT NULL,
  `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `created` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Extraindo dados da tabela `groups`
--

INSERT INTO `groups` (`id`, `name`, `created`, `modified`) VALUES
(1, 'Superusuário', '2016-08-30 21:15:01', '2020-02-25 19:42:05'),
(2, 'Administrador', '2016-08-30 21:15:01', '2020-02-25 19:42:16'),
(3, 'Gerentes', '2016-08-30 21:15:01', '2020-02-25 19:42:25'),
(4, 'Usuários', '2016-08-30 21:15:01', '2020-02-25 18:58:36');

-- --------------------------------------------------------

--
-- Estrutura da tabela `permissions`
--

CREATE TABLE `permissions` (
  `id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  `controller` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `action` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `created` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Extraindo dados da tabela `permissions`
--

INSERT INTO `permissions` (`id`, `group_id`, `controller`, `action`, `created`, `modified`) VALUES
(1, 1, 'Customers', 'index', NULL, NULL),
(2, 1, 'Customers', 'view', NULL, NULL),
(3, 1, 'Customers', 'add', NULL, NULL),
(4, 1, 'Customers', 'edit', NULL, NULL),
(5, 1, 'Customers', 'delete', NULL, NULL),
(6, 1, 'Groups', 'index', NULL, NULL),
(7, 1, 'Groups', 'view', NULL, NULL),
(8, 1, 'Groups', 'add', NULL, NULL),
(9, 1, 'Groups', 'edit', NULL, NULL),
(10, 1, 'Groups', 'delete', NULL, NULL),
(11, 1, 'Permissions', 'index', NULL, NULL),
(12, 1, 'Permissions', 'view', NULL, NULL),
(13, 1, 'Permissions', 'add', NULL, NULL),
(14, 1, 'Permissions', 'edit', NULL, NULL),
(15, 1, 'Permissions', 'delete', NULL, NULL),
(16, 1, 'Users', 'index', NULL, NULL),
(17, 1, 'Users', 'view', NULL, NULL),
(18, 1, 'Users', 'add', NULL, NULL),
(19, 1, 'Users', 'edit', NULL, NULL),
(20, 1, 'Users', 'delete', NULL, NULL),
(21, 2, 'Groups', 'index', NULL, NULL),
(22, 2, 'Groups', 'view', NULL, NULL),
(23, 2, 'Groups', 'add', NULL, NULL),
(24, 2, 'Groups', 'edit', NULL, NULL),
(25, 2, 'Groups', 'delete', NULL, NULL),
(26, 2, 'Permissions', 'index', NULL, NULL),
(27, 2, 'Permissions', 'view', NULL, NULL),
(28, 2, 'Permissions', 'add', NULL, NULL),
(29, 2, 'Permissions', 'edit', NULL, NULL),
(30, 2, 'Permissions', 'delete', NULL, NULL),
(31, 2, 'Users', 'index', NULL, NULL),
(32, 2, 'Users', 'view', NULL, NULL),
(33, 2, 'Users', 'add', NULL, NULL),
(34, 2, 'Users', 'edit', NULL, NULL),
(35, 2, 'Users', 'delete', NULL, NULL),
(36, 3, 'Customers', 'index', NULL, NULL),
(37, 3, 'Customers', 'view', NULL, NULL),
(38, 3, 'Customers', 'add', NULL, NULL),
(39, 3, 'Customers', 'edit', NULL, NULL),
(40, 3, 'Customers', 'delete', NULL, NULL),
(41, 1, 'Empresas', 'index', NULL, '2018-12-26 15:42:33'),
(42, 1, 'Empresas', 'view', NULL, NULL),
(43, 1, 'Empresas', 'add', NULL, NULL),
(44, 1, 'Empresas', 'edit', NULL, NULL),
(45, 1, 'Empresas', 'delete', NULL, NULL),
(52, 1, 'Pedidos', 'view', NULL, NULL),
(53, 1, 'Pedidos', 'add', NULL, NULL),
(54, 1, 'Pedidos', 'edit', NULL, NULL),
(55, 1, 'Pedidos', 'delete', NULL, NULL),
(56, 1, 'Racas', 'index', NULL, NULL),
(57, 1, 'Racas', 'view', NULL, NULL),
(58, 1, 'Racas', 'add', NULL, NULL),
(59, 1, 'Racas', 'edit', NULL, NULL),
(60, 1, 'Racas', 'delete', NULL, NULL),
(61, 3, 'Empresas', 'index', NULL, NULL),
(62, 3, 'Empresas', 'view', NULL, NULL),
(63, 3, 'Empresas', 'add', NULL, NULL),
(64, 3, 'Empresas', 'edit', NULL, NULL),
(65, 3, 'Empresas', 'delete', NULL, NULL),
(71, 3, 'Pedidos', 'index', NULL, NULL),
(72, 3, 'Pedidos', 'view', NULL, NULL),
(73, 3, 'Pedidos', 'add', NULL, NULL),
(74, 3, 'Pedidos', 'edit', NULL, NULL),
(75, 3, 'Pedidos', 'delete', NULL, NULL),
(76, 3, 'Racas', 'index', NULL, NULL),
(77, 3, 'Racas', 'view', NULL, NULL),
(78, 3, 'Racas', 'add', NULL, NULL),
(79, 3, 'Racas', 'edit', NULL, NULL),
(80, 3, 'Racas', 'delete', NULL, NULL),
(81, 4, 'Users', 'index', '2018-12-24 16:38:35', '2018-12-24 16:38:35'),
(83, 2, 'Empresas', 'index', '2018-12-25 11:46:33', '2018-12-25 11:46:33'),
(90, 1, 'Lotes', 'delete', '2018-12-28 09:20:11', '2018-12-28 09:20:11'),
(92, 1, 'Lotes', 'add', '2018-12-28 09:25:20', '2018-12-28 09:25:20'),
(98, 1, 'Lotes', 'index', '2018-12-28 10:17:43', '2018-12-28 10:17:43');

-- --------------------------------------------------------

--
-- Estrutura da tabela `users`
--

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `username` varchar(55) COLLATE utf8_unicode_ci NOT NULL,
  `nome` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  `empresas_id` int(11) NOT NULL,
  `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `group_id` int(11) NOT NULL,
  `created` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Extraindo dados da tabela `users`
--

INSERT INTO `users` (`id`, `username`, `nome`, `empresas_id`, `password`, `group_id`, `created`, `modified`) VALUES
(1, 'super', 'Super Usuário', 0, '$2y$10$DPJQQvPAOpae23WWWVmVQ.5PsRJfUdCa/BUdu4eZWoX6Hu98aTdnq', 1, '2016-09-15 15:57:16', '2020-02-25 19:30:23'),
(2, 'admin', 'Administrador', 0, '$2y$10$2aTDwGEtcayt859lMTuwN.Bys.5Mpmii5pIN2oQkfzYbgGtM7v9q6', 2, '2016-09-15 15:57:28', '2020-02-25 19:30:34'),
(3, 'gerente', 'Gerente', 0, '$2y$10$08jYO5pe/ib9rdJetizQZexgb6czFArx72ZZ8tp4rcGzhvgrloPLy', 3, '2016-09-15 15:57:39', '2020-02-25 19:30:55'),
(4, 'user', 'Usuário', 0, '$2y$10$pxNdOGydRKprWn/levNz/eyoUxa/zXONDj29ReIXdCqu.l.IxjYb6', 4, '2016-09-15 15:58:21', '2020-02-25 19:31:09'),
(5, 'teste', 'Usuário Teste', 0, '654321', 4, '2018-12-25 12:10:02', '2018-12-25 14:00:06');

--
-- Índices para tabelas despejadas
--

--
-- Índices para tabela `customers`
--
ALTER TABLE `customers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `customer_fk` (`user_id`);

--
-- Índices para tabela `empresas`
--
ALTER TABLE `empresas`
  ADD PRIMARY KEY (`id`);

--
-- Índices para tabela `groups`
--
ALTER TABLE `groups`
  ADD PRIMARY KEY (`id`);

--
-- Índices para tabela `permissions`
--
ALTER TABLE `permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_key` (`group_id`,`controller`,`action`);

--
-- Índices para tabela `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `username` (`username`),
  ADD KEY `group_fk` (`group_id`);

--
-- AUTO_INCREMENT de tabelas despejadas
--

--
-- AUTO_INCREMENT de tabela `customers`
--
ALTER TABLE `customers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=101;

--
-- AUTO_INCREMENT de tabela `empresas`
--
ALTER TABLE `empresas`
  MODIFY `id` int(5) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=74;

--
-- AUTO_INCREMENT de tabela `groups`
--
ALTER TABLE `groups`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de tabela `permissions`
--
ALTER TABLE `permissions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=101;

--
-- AUTO_INCREMENT de tabela `users`
--
ALTER TABLE `users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- Restrições para despejos de tabelas
--

--
-- Limitadores para a tabela `customers`
--
ALTER TABLE `customers`
  ADD CONSTRAINT `customer_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Limitadores para a tabela `users`
--
ALTER TABLE `users`
  ADD CONSTRAINT `group_fk` FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
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 */;
