-- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: 11-Abr-2018 às 19:08
-- Versão do servidor: 5.6.35-log
-- PHP Version: 5.6.30

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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 */;

--
-- Database: `softsats_gestao`
--

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

--
-- Estrutura da tabela `hwapx_audit`
--

CREATE TABLE `hwapx_audit` (
  `id` int(11) NOT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `done_by` int(11) DEFAULT NULL,
  `done_by_data` text COLLATE utf8_unicode_ci,
  `done_at` datetime DEFAULT NULL,
  `action` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `table` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `record_id` int(11) NOT NULL,
  `old_data` text COLLATE utf8_unicode_ci,
  `new_data` text COLLATE utf8_unicode_ci,
  `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `verb` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Extraindo dados da tabela `hwapx_audit`
--

INSERT INTO `hwapx_audit` (`id`, `created_on`, `done_by`, `done_by_data`, `done_at`, `action`, `table`, `record_id`, `old_data`, `new_data`, `url`, `verb`) VALUES
(1, '2016-09-19 15:00:08', 1, '{\"id\":1,\"created_on\":\"2014-11-09 02:13:01\",\"updated_on\":\"2016-09-19 13:00:32\",\"created_by\":null,\"updated_by\":1,\"username\":\"Admin\",\"password\":\"a0c18bbde7dace71a15f80dd474e96bd068831402b528ed2cc51474f28e28fcd242afdd84d80cf5b9c1d2ab9b7ddb98801f134e5b1d29bdfeba801a9abeeb75f\",\"email\":\"luis@softsatsistemas.com.br\",\"photo\":\"8afe316e3f990fbdafc30ac2d8797069.jpg\",\"active\":1,\"group_id\":1,\"correspondente_id\":null,\"group\":{\"id\":1,\"created_on\":\"2015-03-08 02:01:39\",\"updated_on\":null,\"created_by\":null,\"updated_by\":null,\"active\":1,\"description\":\"Administrador\",\"roles\":[\"filemanager\",\"filemanager_remove\",\"filemanager_rename\",\"filemanager_upload\",\"group_create\",\"group_edit\",\"group_remove\",\"group_list\",\"settings\",\"module_management\",\"module_install\",\"module_upgrade\",\"module_uninstall\",\"logs\",\"log_remove\",\"slideshow_create\",\"slideshow_edit\",\"slideshow_remove\",\"slideshow_list\",\"user_create\",\"user_edit\",\"user_remove\",\"user_list\"],\"correspondente_id\":null}}', '2016-09-19 15:00:08', 'delete', 'softsat_process_correspondente', 3, '{\"id\":3,\"created_on\":\"2016-09-19 14:58:41\",\"updated_on\":\"2016-09-19 14:58:41\",\"created_by\":1,\"updated_by\":1,\"nome\":\"Teste\",\"cnpj\":\"65.313.959\\/0001-22\",\"fundacao\":\"2016-09-19\",\"endereco\":\"Indefinido\",\"numero\":\"S\\/N\",\"complemento\":\"\",\"bairro\":\"N\\u00e3o se sabe\",\"cidade\":\"Jos\\u00e9 Bonif\\u00e1cio\",\"uf\":\"SP\",\"cep\":\"15200-000\",\"telefone\":\"(17)0000-00000\",\"celular\":\"(17)0000-00000\",\"email\":\"contato@softsatsistemas.com.br\",\"codigo_correspondente\":\"9999\",\"ativo\":1}', 'null', NULL, NULL);

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

--
-- Estrutura da tabela `hwapx_email_account`
--

CREATE TABLE `hwapx_email_account` (
  `id` int(11) NOT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_on` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `host` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `port` int(11) NOT NULL,
  `scheme` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Extraindo dados da tabela `hwapx_email_account`
--

INSERT INTO `hwapx_email_account` (`id`, `created_on`, `updated_on`, `created_by`, `updated_by`, `description`, `slug`, `email`, `password`, `host`, `port`, `scheme`) VALUES
(1, '2016-09-06 13:41:35', '2016-09-06 16:00:11', NULL, NULL, 'Webmaster', 'webmaster', 'webmaster@localhost.com', '5f4dcc3b5aa765d61d8327deb882cf99', 'localhost', 587, 'tls');

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

--
-- Estrutura da tabela `hwapx_email_queue`
--

CREATE TABLE `hwapx_email_queue` (
  `id` int(11) NOT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_on` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `created_by` int(11) DEFAULT NULL,
  `updated_By` int(11) DEFAULT NULL,
  `account_id` int(11) DEFAULT NULL,
  `template_id` int(11) DEFAULT NULL,
  `data` text COLLATE utf8_unicode_ci,
  `callback` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `callback_data` text COLLATE utf8_unicode_ci,
  `to` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `from` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `to_parsed` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `reply_to` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `bcc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `subject_parsed` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `body` text COLLATE utf8_unicode_ci NOT NULL,
  `body_parsed` text COLLATE utf8_unicode_ci,
  `attachments` text COLLATE utf8_unicode_ci,
  `sent_at` datetime DEFAULT NULL,
  `log` text COLLATE utf8_unicode_ci,
  `cancelled` tinyint(1) NOT NULL DEFAULT '0',
  `cancelled_on` datetime DEFAULT NULL,
  `executed_on` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Estrutura da tabela `hwapx_email_template`
--

CREATE TABLE `hwapx_email_template` (
  `id` int(11) NOT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_on` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `account_id` int(11) DEFAULT NULL,
  `from` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `to` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `bcc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `reply_to` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `body` text COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Extraindo dados da tabela `hwapx_email_template`
--

INSERT INTO `hwapx_email_template` (`id`, `created_on`, `updated_on`, `created_by`, `updated_by`, `description`, `slug`, `account_id`, `from`, `to`, `cc`, `bcc`, `reply_to`, `subject`, `body`) VALUES
(3, '2016-09-19 21:30:11', '2017-09-06 14:23:18', 1, 1, 'Redefinição de senha', 'reset_password', NULL, 'webmaster@softsatsistemas.com.br', NULL, NULL, NULL, NULL, 'SoftSAT Gestão - Redefinição de senha', 'Olá {{ @usuario.name }}.<div><br></div><div>Para redefinir sua senha acesse: <a href=\"http://gestao.softsatsistemas.com.br{{ \'admin_set_password\', \'token=\'.@usuario.reset_token | alias }}\">http://gestao.softsatsistemas.com.br{{ \'admin_set_password\', \'token=\'.@usuario.reset_token | alias }}</a>.</div>'),
(4, '2016-09-19 21:34:25', '2017-09-06 14:23:33', 1, 1, 'Definir senha', 'set_password', NULL, 'webmaster@softsatsistemas.com.br', NULL, NULL, NULL, NULL, 'SoftSAT Gestão - Definir senha', 'Bem-vindo ao SoftSAT Gestão{{ @usuario.name }}.<div><br></div><div>Seu próximo passo é definir uma senha, para isso acesse&nbsp;<a href=\"http://gestao.softsatsistemas.com.br{{ \'admin_set_password\', \'token=\'.@usuario.reset_token | alias }}\">http://gestao.softsatsistemas.com.br{{ \'admin_set_password\', \'token=\'.@usuario.reset_token | alias }}</a>.</div>'),
(5, '2016-10-07 09:22:38', '2017-09-06 13:47:56', 1, 1, 'Notificação de erro', 'error', NULL, 'webmaster@softsatsistemas.com.br', 'luis@softsatsistemas.com.br', NULL, NULL, NULL, 'Ocorreu um erro em {{ @server }}', '<div>Seguem dados coletados.<br><br></div>\r\n<div>\r\n<h4>Requisição</h4>\r\n<div>\r\nURL: {{ @url }}<br>\r\nMétodo: {{ @method }}<br>\r\nAjax: {{ @ajax}}<br>\r\nQuery: {{ @query}}<br>\r\nData: {{ @time }}<br>\r\n</div>\r\n\r\n<h4>Usuário</h4>\r\n<div>\r\nID: {{ @admin.id }}<br>\r\nNome: {{ @admin.name }} <br>\r\nEmail: {{ @admin.email }}<br>\r\n<br>\r\nIP: {{ @ip }}<br>\r\nUseragent: {{ @agent }}\r\n</div>\r\n\r\n<h4>Erro</h4>\r\n<div>Código: {{ @error.code }}<br>\r\nStatus: {{ @error.status }}<br>\r\nTexto: {{ @error.text }}<br>\r\nTrace:<br>\r\n{{ nl2br(@error.trace) }}\r\n</div>\r\n\r\n<h4>POST</h4>\r\n<pre>{{ json_encode(@post, JSON_PRETTY_PRINT) | raw }}</pre>\r\n\r\n<h4>GET</h4>\r\n<pre>{{ json_encode(@get, JSON_PRETTY_PRINT) | raw }}</pre>\r\n\r\n<h4>COOKIE</h4>\r\n<pre>{{ json_encode(@cookie, JSON_PRETTY_PRINT) | raw }}</pre>\r\n\r\n<h4>PARAMS</h4>\r\n<pre>{{ json_encode(@params, JSON_PRETTY_PRINT) | raw }}</pre>\r\n\r\n<h4>HEADERS</h4>\r\n<pre>{{ json_encode(@headers, JSON_PRETTY_PRINT) | raw }}</pre>\r\n</div>');

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

--
-- Estrutura da tabela `hwapx_group`
--

CREATE TABLE `hwapx_group` (
  `id` int(11) NOT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_on` datetime DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `active` tinyint(1) NOT NULL,
  `description` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `roles` text COLLATE utf8_unicode_ci,
  `correspondente_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Extraindo dados da tabela `hwapx_group`
--

INSERT INTO `hwapx_group` (`id`, `created_on`, `updated_on`, `created_by`, `updated_by`, `active`, `description`, `roles`, `correspondente_id`) VALUES
(1, '2015-03-08 02:01:39', '2016-09-24 12:36:31', NULL, 1, 1, 'Desenvolvedor', NULL, NULL),
(2, '2015-03-08 02:01:39', '2017-01-04 13:08:44', NULL, 1, 1, 'Administrador', 'hwapx.admin.settings;hwapx.admin.user_create;hwapx.admin.user_edit;hwapx.admin.user_remove;hwapx.admin.user_list;hwapx.admin.group_create;hwapx.admin.group_edit;hwapx.admin.group_remove;hwapx.admin.group_list;hwapx.admin.group_roles;hwapx.logs.logs;hwapx.logs.log_remove;softsat.licenca.create;softsat.licenca.edit;softsat.licenca.edit_obs;softsat.licenca.remove;softsat.licenca.list;softsat.licenca.load;softsat.licenca.plano_create;softsat.licenca.plano_edit;softsat.licenca.plano_remove;softsat.licenca.plano_list;softsat.licenca.plano_load;softsat.licenca.demonstracao_list', NULL),
(3, '2016-10-20 14:44:14', '2016-10-20 15:03:05', 1, 1, 1, 'Comercial', 'softsat.licenca.demonstracao_list', NULL),
(4, '2017-01-03 11:08:14', '2017-03-23 12:06:23', 4, 1, 1, 'Suporte', 'softsat.licenca.edit;softsat.licenca.edit_obs;softsat.licenca.list;softsat.licenca.load;softsat.licenca.plano_list;softsat.licenca.plano_load;softsat.licenca.demonstracao_list', NULL);

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

--
-- Estrutura da tabela `hwapx_redirect`
--

CREATE TABLE `hwapx_redirect` (
  `id` int(11) NOT NULL,
  `created_on` datetime NOT NULL,
  `updated_on` datetime DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `description` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `url_from` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `url_to` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `active` tinyint(1) NOT NULL,
  `permanent` tinyint(1) NOT NULL,
  `method` varchar(255) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Extraindo dados da tabela `hwapx_redirect`
--

INSERT INTO `hwapx_redirect` (`id`, `created_on`, `updated_on`, `created_by`, `updated_by`, `description`, `url_from`, `url_to`, `active`, `permanent`, `method`) VALUES
(1, '2015-10-08 23:18:02', '2015-11-13 00:11:40', NULL, NULL, 'Ammyy', '/ammyy', 'http://www.ammyy.com/AA_v3.exe', 1, 0, 'HEAD|GET');

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

--
-- Estrutura da tabela `hwapx_sessions`
--

CREATE TABLE `hwapx_sessions` (
  `session_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `data` text COLLATE utf8_unicode_ci,
  `ip` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
  `agent` varchar(300) COLLATE utf8_unicode_ci DEFAULT NULL,
  `stamp` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Extraindo dados da tabela `hwapx_sessions`
--

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

--
-- Estrutura da tabela `hwapx_setting`
--

CREATE TABLE `hwapx_setting` (
  `id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `value` text COLLATE utf8_unicode_ci,
  `field_order` int(11) NOT NULL,
  `label` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `group` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `rules` text COLLATE utf8_unicode_ci,
  `created_on` datetime DEFAULT CURRENT_TIMESTAMP,
  `updated_on` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Extraindo dados da tabela `hwapx_setting`
--

INSERT INTO `hwapx_setting` (`id`, `value`, `field_order`, `label`, `group`, `type`, `rules`, `created_on`, `updated_on`) VALUES
('admin.color', 'green', 2, 'Cor', 'Admin', 'dropdown', 'in=|aqua|black|blue|fuchsia|green|light-blue|lime|maroon|navy|olive|orange|purple|red|teal|yellow|aqua-gradient|black-gradient|blue-gradient|fuchsia-gradient|green-gradient|light-blue-gradient|lime-gradient|maroon-gradient|navy-gradient|olive-gradient|orange-gradient|purple-gradient|red-gradient|teal-gradient|yellow-gradient', '2016-10-12 21:35:42', '2016-12-01 18:19:00'),
('admin.layout', 'fixed', 3, 'Layout', 'Admin', 'dropdown', 'required;in=normal|fixed', '2015-02-16 21:13:53', '2016-10-12 21:34:19'),
('admin.sidebar_color', '', 5, 'Cor (Menu lateral)', 'Admin', 'dropdown', 'in=|aqua|black|blue|fuchsia|green|light-blue|lime|maroon|navy|olive|orange|purple|red|teal|yellow|aqua-gradient|black-gradient|blue-gradient|fuchsia-gradient|green-gradient|light-blue-gradient|lime-gradient|maroon-gradient|navy-gradient|olive-gradient|orange-gradient|purple-gradient|red-gradient|teal-gradient|yellow-gradient', '2016-10-12 21:54:01', '2016-10-12 22:05:53'),
('admin.skin', 'blue', 1, 'Skin', 'Admin', 'dropdown', 'in=|blue|black', '2015-02-16 21:13:53', '2016-10-12 22:05:53'),
('api.password', 'apikey', 23, 'Senha', 'Api', 'password', 'required;lengthMin=6', '2014-11-09 23:13:30', '2016-10-12 20:48:26'),
('api.username', 'api', 22, 'Usuário', 'Api', 'text', 'required;lengthMin=3', '2014-11-09 23:13:30', '2016-10-12 20:48:26'),
('email.host', 'smtp.yandex.com', 13, 'Servidor SMTP', 'Email', 'text', 'required', '2014-11-09 23:13:30', '2017-03-30 17:03:09'),
('email.password', 'niwwkprjlhdtpldb', 17, 'Senha', 'Email', 'password', 'required', '2014-11-09 23:13:30', '2017-09-06 12:36:09'),
('email.port', '587', 14, 'Porta SMTP', 'Email', 'number', 'required;integer;min=1;max=65535', '2014-11-09 23:13:30', '2017-09-06 14:29:34'),
('email.scheme', 'tls', 15, 'Modo de Autenticação', 'Email', 'dropdown', 'in=|ssl|tls', '2014-11-09 23:13:30', '2017-09-06 14:11:44'),
('email.user', 'webmaster@softsatsistemas.com.br', 16, 'Email', 'Email', 'text', 'required;email', '2014-11-09 23:13:30', '2017-09-06 10:59:21'),
('site_name', 'SoftProcess', 1, 'Nome', 'Site', 'text', 'required', '2015-02-16 20:47:18', '2016-10-12 20:48:26'),
('softsat.licenca.carencia', '3', 4, 'Carência (Dias)', 'Licença', 'number', 'required', '2016-10-18 11:42:22', '2016-10-24 13:20:16'),
('softsat.licenca.iugu_plan_keyword', 'Licenca', 2, 'Palavra chave dos planos', 'Licença', 'text', NULL, '2016-10-17 08:49:20', '2016-10-24 13:19:55'),
('softsat.licenca.iugu_token', '01cb1ccdde1d3bf71c6b5d4ddb9e20d1', 1, 'Token do Iugu', 'Licença', 'text', NULL, '2016-10-14 10:05:37', '2016-10-24 13:19:52'),
('softsat.licenca.modulos', 'PDV;NFE;SAT;ECF;OS;FINANCEIRO;FOOD', 5, 'Modulos (separados por ;)', 'Licença', 'text', NULL, '2016-10-18 11:28:21', '2017-12-29 14:48:56'),
('softsat.licenca.plano_demonstracao', '2', 3, 'ID do plano de demonstração', 'Licença', 'number', NULL, '2016-10-24 13:19:38', '2016-10-24 16:15:11'),
('softsat.licenca.sync_iugu', 'NAO', 6, 'Sincronizar dados com IUGU', 'Licença', 'dropdown', 'in=SIM|NAO', '2017-03-22 18:09:00', '2017-03-22 18:10:30');

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

--
-- Estrutura da tabela `hwapx_user`
--

CREATE TABLE `hwapx_user` (
  `id` int(11) NOT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `last_activity` datetime DEFAULT NULL,
  `last_login` datetime DEFAULT NULL,
  `last_ip` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `password` char(128) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `photo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `active` tinyint(1) NOT NULL,
  `group_id` int(11) NOT NULL,
  `correspondente_id` int(11) DEFAULT NULL,
  `reset_requested_on` datetime DEFAULT NULL,
  `reset_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `reset_expire` datetime DEFAULT NULL,
  `last_reset` datetime DEFAULT NULL,
  `session_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Extraindo dados da tabela `hwapx_user`
--

INSERT INTO `hwapx_user` (`id`, `created_on`, `updated_on`, `created_by`, `updated_by`, `last_activity`, `last_login`, `last_ip`, `name`, `password`, `email`, `photo`, `active`, `group_id`, `correspondente_id`, `reset_requested_on`, `reset_token`, `reset_expire`, `last_reset`, `session_id`) VALUES
(1, '2016-08-20 14:33:42', '2018-01-03 16:05:57', NULL, 1, '2018-01-03 16:05:57', '2017-12-29 14:20:02', '170.245.104.183', 'Desenv', '$2y$10$2.NSsgF5whjBVmWqEhtlEun1ZMK55g4hzRgzPYqBsw9SKMI6.aqOO', 'desenv@softsatsistemas.com.br', '8afe316e3f990fbdafc30ac2d8797069.jpg', 1, 1, NULL, '2017-09-06 13:53:06', '65247820d26499d01df93b74fb77047e', '2017-09-07 13:53:06', NULL, '14b1fa7871d827f8eb73d3c67de36424'),
(2, '2016-09-01 17:56:05', '2018-04-05 16:15:28', NULL, 1, '2018-04-05 16:15:28', '2018-04-05 09:13:36', '200.95.219.22', 'Admin', '$2y$10$PluOJrAIv8.LCoq3V4jVp.PyhcXiHo9kmZgwUll8W3SN5S4/xT0x.', 'contato@softsatsistemas.com.br', '84c0ed62ccb479c9a57e6aebbb712db6.jpg', 1, 2, NULL, NULL, '5a8c9d3f9c4c63f99a47a82cff52bda1', '2016-10-08 13:44:46', NULL, 'e10f15c04f25356f45d0a22975866933'),
(3, '2016-10-20 14:47:35', '2017-03-09 16:08:20', 1, 1, '2017-01-20 08:26:15', '2017-01-20 08:26:07', '200.95.209.186', 'Carina', '$2y$10$YkpMNr9gpVgi3bCt61lQx.hVTMqbdFYpl0A1N0Q5.QL.8EQSKKnm.', 'carina@softsatsistemas.com.br', NULL, 0, 3, NULL, NULL, 'e0e0c3b77d492c2195f3e4598b90e3bf', '2016-11-11 09:44:55', NULL, '1e0ea96f4c43f86888a358aecfe9c918'),
(4, '2016-11-28 09:43:43', '2018-04-11 12:40:18', 1, 4, '2018-04-11 12:40:18', '2018-04-11 11:57:27', '200.95.216.251', 'Luis Henrique', '$2y$10$tApYRZpUvUKG3se6bmVBnuBGAxlvStKDkHUxFw.5IMUzWSH8Rxs4i', 'luis@softsatsistemas.com.br', NULL, 1, 4, NULL, '2017-09-06 14:31:45', '0ba0295dc6007b501ddc784f30b7f410', '2017-09-07 14:31:45', NULL, '071824ba1ffca3442c73da8864f236e8'),
(5, '2017-01-03 11:08:38', '2018-04-11 12:06:25', 4, 4, '2018-04-11 12:06:25', '2018-04-11 08:24:58', '200.95.216.251', 'Manuel', '$2y$10$BcI.1T1qeB6ce4s92p/LGu6Y2MTsrxTvXbzIyABvILe9ouYzlHqRi', 'manuel@softsatsistemas.com.br', NULL, 1, 4, NULL, '2017-01-03 11:24:25', NULL, NULL, '2017-01-03 11:26:01', '52e8a5c9c96c01121f95d83c95b4bef0');

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

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

--
-- Structure for view `softsat_licenca_detalhe`
--

--
-- Indexes for dumped tables
--

--
-- Indexes for table `hwapx_audit`
--
ALTER TABLE `hwapx_audit`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `hwapx_email_account`
--
ALTER TABLE `hwapx_email_account`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_hwapx_email_account_hwapx_user_created_by` (`created_by`),
  ADD KEY `fk_hwapx_email_account_hwapx_user_updated_by` (`updated_by`);

--
-- Indexes for table `hwapx_email_queue`
--
ALTER TABLE `hwapx_email_queue`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_hwapx_email_queue_hwapx_user_created_by` (`created_by`),
  ADD KEY `fk_hwapx_email_queue_hwapx_user_updated_by` (`updated_By`),
  ADD KEY `fk_hwapx_email_queue_hwapx_email_account` (`account_id`),
  ADD KEY `fk_hwapx_email_queue_hwapx_email_template` (`template_id`);

--
-- Indexes for table `hwapx_email_template`
--
ALTER TABLE `hwapx_email_template`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `slug` (`slug`),
  ADD KEY `fk_hwapx_email_template_hwapx_email_account` (`account_id`),
  ADD KEY `fk_hwapx_email_template_hwapx_user_created_by` (`created_by`),
  ADD KEY `fk_hwapx_email_template_hwapx_user_updated_by` (`updated_by`);

--
-- Indexes for table `hwapx_group`
--
ALTER TABLE `hwapx_group`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_hwapx_group_hwapx_user_created_by` (`created_by`),
  ADD KEY `fk_hwapx_group_hwapx_user_updated_by` (`updated_by`);

--
-- Indexes for table `hwapx_redirect`
--
ALTER TABLE `hwapx_redirect`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_hwapx_redirect_hwapx_user_created_by` (`created_by`),
  ADD KEY `fk_hwapx_redirect_hwapx_user_updated_by` (`updated_by`);

--
-- Indexes for table `hwapx_sessions`
--
ALTER TABLE `hwapx_sessions`
  ADD PRIMARY KEY (`session_id`);

--
-- Indexes for table `hwapx_setting`
--
ALTER TABLE `hwapx_setting`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `hwapx_user`
--
ALTER TABLE `hwapx_user`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `un_hwapx_user_email` (`email`),
  ADD UNIQUE KEY `un_hwapx_user_reset_token` (`reset_token`),
  ADD KEY `fk_hwapx_user_hwapx_group` (`group_id`),
  ADD KEY `fk_hwapx_user_softsat_process_correspondente` (`correspondente_id`),
  ADD KEY `fk_hwapx_user_hwapx_user_created_by` (`created_by`),
  ADD KEY `fk_hwapx_user_hwapx_user_updated_by` (`updated_by`);

-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `hwapx_audit`
--
ALTER TABLE `hwapx_audit`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `hwapx_email_account`
--
ALTER TABLE `hwapx_email_account`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `hwapx_email_queue`
--
ALTER TABLE `hwapx_email_queue`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `hwapx_email_template`
--
ALTER TABLE `hwapx_email_template`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `hwapx_group`
--
ALTER TABLE `hwapx_group`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `hwapx_redirect`
--
ALTER TABLE `hwapx_redirect`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `hwapx_user`
--
ALTER TABLE `hwapx_user`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
--
-- Limitadores para a tabela `hwapx_email_account`
--
ALTER TABLE `hwapx_email_account`
  ADD CONSTRAINT `fk_hwapx_email_account_hwapx_user_created_by` FOREIGN KEY (`created_by`) REFERENCES `hwapx_user` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fk_hwapx_email_account_hwapx_user_updated_by` FOREIGN KEY (`updated_by`) REFERENCES `hwapx_user` (`id`) ON DELETE SET NULL;

--
-- Limitadores para a tabela `hwapx_email_queue`
--
ALTER TABLE `hwapx_email_queue`
  ADD CONSTRAINT `fk_hwapx_email_queue_hwapx_email_account` FOREIGN KEY (`account_id`) REFERENCES `hwapx_email_account` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_hwapx_email_queue_hwapx_email_template` FOREIGN KEY (`template_id`) REFERENCES `hwapx_email_template` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_hwapx_email_queue_hwapx_user_created_by` FOREIGN KEY (`created_by`) REFERENCES `hwapx_user` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fk_hwapx_email_queue_hwapx_user_updated_by` FOREIGN KEY (`updated_By`) REFERENCES `hwapx_user` (`id`) ON DELETE SET NULL;

--
-- Limitadores para a tabela `hwapx_email_template`
--
ALTER TABLE `hwapx_email_template`
  ADD CONSTRAINT `fk_hwapx_email_template_hwapx_email_account` FOREIGN KEY (`account_id`) REFERENCES `hwapx_email_account` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fk_hwapx_email_template_hwapx_user_created_by` FOREIGN KEY (`created_by`) REFERENCES `hwapx_user` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fk_hwapx_email_template_hwapx_user_updated_by` FOREIGN KEY (`updated_by`) REFERENCES `hwapx_user` (`id`) ON DELETE SET NULL;

--
-- Limitadores para a tabela `hwapx_group`
--
ALTER TABLE `hwapx_group`
  ADD CONSTRAINT `fk_hwapx_group_hwapx_user_created_by` FOREIGN KEY (`created_by`) REFERENCES `hwapx_user` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fk_hwapx_group_hwapx_user_updated_by` FOREIGN KEY (`updated_by`) REFERENCES `hwapx_user` (`id`) ON DELETE SET NULL;

--
-- Limitadores para a tabela `hwapx_redirect`
--
ALTER TABLE `hwapx_redirect`
  ADD CONSTRAINT `fk_hwapx_redirect_hwapx_user_created_by` FOREIGN KEY (`created_by`) REFERENCES `hwapx_user` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fk_hwapx_redirect_hwapx_user_updated_by` FOREIGN KEY (`updated_by`) REFERENCES `hwapx_user` (`id`) ON DELETE SET NULL;

--
-- Limitadores para a tabela `hwapx_user`
--
ALTER TABLE `hwapx_user`
  ADD CONSTRAINT `fk_hwapx_user_hwapx_group` FOREIGN KEY (`group_id`) REFERENCES `hwapx_group` (`id`),
  ADD CONSTRAINT `fk_hwapx_user_hwapx_user_created_by` FOREIGN KEY (`created_by`) REFERENCES `hwapx_user` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fk_hwapx_user_hwapx_user_updated_by` FOREIGN KEY (`updated_by`) REFERENCES `hwapx_user` (`id`) ON DELETE SET NULL;

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