CREATE TABLE `administradores` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `niveis_de_acesso` json NOT NULL,
  `nome` varchar(240) NOT NULL,
  `email` varchar(240) NOT NULL,
  `senha` varchar(240) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
INSERT INTO `administradores` VALUES ('1', '{\"books\": {\"editar\": true, \"excluir\": true, \"visualizar\": true}, \"clientes\": {\"editar\": true, \"excluir\": true, \"cadastrar\": true, \"visualizar\": true}, \"servicos\": {\"editar\": true, \"excluir\": true, \"visualizar\": true}, \"contratos\": {\"editar\": true, \"excluir\": true, \"cadastrar\": true, \"visualizar\": true}, \"dashboard\": {\"editar\": true, \"excluir\": true, \"cadastrar\": true, \"visualizar\": true}, \"promotores\": {\"editar\": true, \"excluir\": true, \"cadastrar\": true, \"visualizar\": true}, \"modalidades\": {\"editar\": true, \"excluir\": true, \"cadastrar\": true, \"visualizar\": true}, \"ocorrencias\": {\"editar\": true, \"excluir\": true, \"visualizar\": true}, \"administradores\": {\"editar\": true, \"excluir\": true, \"cadastrar\": true, \"visualizar\": true}, \"estabelecimentos\": {\"editar\": true, \"excluir\": true, \"cadastrar\": true, \"visualizar\": true}}', 'admin', 'admin', 'wsa@@2023');
INSERT INTO `administradores` VALUES ('9', '{\"books\": {\"editar\": true, \"excluir\": true, \"visualizar\": true}, \"clientes\": {\"editar\": true, \"excluir\": true, \"cadastrar\": true, \"visualizar\": true}, \"servicos\": {\"editar\": true, \"excluir\": true, \"visualizar\": true}, \"dashboard\": {\"editar\": true, \"excluir\": true, \"cadastrar\": true, \"visualizar\": true}, \"promotores\": {\"editar\": true, \"excluir\": true, \"cadastrar\": true, \"visualizar\": true}, \"modalidades\": {\"editar\": true, \"excluir\": true, \"cadastrar\": true, \"visualizar\": true}, \"ocorrencias\": {\"editar\": true, \"excluir\": true, \"visualizar\": true}, \"administradores\": {\"editar\": true, \"excluir\": true, \"cadastrar\": true, \"visualizar\": true}, \"estabelecimentos\": {\"editar\": true, \"excluir\": true, \"cadastrar\": true, \"visualizar\": true}}', 'teste', 'teste@gmail.com', '123');
INSERT INTO `administradores` VALUES ('10', '{\"books\": {\"editar\": false, \"excluir\": false, \"visualizar\": false}, \"clientes\": {\"editar\": false, \"excluir\": false, \"cadastrar\": false, \"visualizar\": false}, \"servicos\": {\"editar\": false, \"excluir\": false, \"visualizar\": false}, \"dashboard\": {\"editar\": true, \"excluir\": true, \"cadastrar\": true, \"visualizar\": true}, \"promotores\": {\"editar\": false, \"excluir\": false, \"cadastrar\": false, \"visualizar\": false}, \"modalidades\": {\"editar\": false, \"excluir\": false, \"cadastrar\": false, \"visualizar\": false}, \"ocorrencias\": {\"editar\": false, \"excluir\": false, \"visualizar\": false}, \"administradores\": {\"editar\": false, \"excluir\": false, \"cadastrar\": false, \"visualizar\": false}, \"estabelecimentos\": {\"editar\": false, \"excluir\": false, \"cadastrar\": false, \"visualizar\": false}}', 'teste', 'admin2@admin.com', 'wsa@@2023');
CREATE TABLE `books` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `antes_imagem` varchar(250) NOT NULL,
  `depois_imagem` varchar(250) NOT NULL,
  `servico_id` int(11) NOT NULL,
  `observacoes` longtext NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `clientes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` varchar(240) NOT NULL,
  `logo` varchar(240) NOT NULL,
  `email` varchar(240) NOT NULL,
  `senha` varchar(240) NOT NULL,
  `descricao_contrato` longtext NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=latin1;
INSERT INTO `clientes` VALUES ('4', 'Melitta', '1708527342.png', 'melitta@miro', 'café2002', '');
INSERT INTO `clientes` VALUES ('5', 'APTI Alimentos', '1708527374.png', 'apti@miro', '123456789', '');
INSERT INTO `clientes` VALUES ('6', 'Castelo', '1708527423.png', 'Castelo@miro', 'vinagre2002', '');
INSERT INTO `clientes` VALUES ('7', 'Coala', '1708527460.png', 'Coala@miro', 'coala2002', '');
INSERT INTO `clientes` VALUES ('8', 'Inaceres ', '1708527504.png', 'inaceres@miro', 'palmito2002', '');
INSERT INTO `clientes` VALUES ('9', 'Josapar', '1708527549.png', 'josapar@miro', 'arroz2002', '');
INSERT INTO `clientes` VALUES ('10', 'naturre', '1708527653.png', 'naturre@miro', 'shampoo2002', '');
INSERT INTO `clientes` VALUES ('11', 'pipoca gugui', '1708527694.png', 'gugui@miro', 'pipocaq2002', '');
INSERT INTO `clientes` VALUES ('12', 'Piracanjuba', '1708527766.png', 'piracanjuba@miro', 'leite2002', '');
INSERT INTO `clientes` VALUES ('13', 'Robinson crusoe', '1708527817.png', 'robinson@miro', 'atum2002', '');
INSERT INTO `clientes` VALUES ('14', 'Kodilar', '1708527918.png', 'kodilar@miro', 'kodilar2002', '');
INSERT INTO `clientes` VALUES ('15', 'Soeto', '1708527961.png', 'soeto@miro', 'molho2002', '');
INSERT INTO `clientes` VALUES ('16', 'Sanol', '1708528024.png', 'Sanol@miro', 'sanol2002', '');
INSERT INTO `clientes` VALUES ('17', 'Petry', '1708528101.png', 'petry@miro', 'petry2002', '');
INSERT INTO `clientes` VALUES ('18', 'vale fertil', '1708528186.png', 'vale@miro', 'vale2002', '');
INSERT INTO `clientes` VALUES ('19', 'sagra alimentos', '1708528319.png', 'sagra@miro', 'sagra2002', 'biscoito glub');
INSERT INTO `clientes` VALUES ('20', 'harald', '1708528441.png', 'harald@miro', 'harald2002', '');
INSERT INTO `clientes` VALUES ('21', 'cocamar', '1708528474.png', 'cocamar@miro', 'cocamar2002', '');
INSERT INTO `clientes` VALUES ('22', 'crockmix', '1708528505.png', 'corck@miro', 'crock2002', '');
INSERT INTO `clientes` VALUES ('25', 'Refriko', '1708552937.png', 'refriko@miro', 'refriko2002', '');
INSERT INTO `clientes` VALUES ('26', 'cantu', '1709068905.png', 'cantu@miro', 'cantu2002', '');
INSERT INTO `clientes` VALUES ('27', 'coperalcool', '1709069004.png', 'alcool@miro', 'alcoll2002', '');
INSERT INTO `clientes` VALUES ('28', 'ROOTS TO GO', '1709069378.png', 'roots@miro', 'roots2002', '');
INSERT INTO `clientes` VALUES ('29', 'WALTRICK', '1709069655.png', 'waltrick@miro', 'waltrick2002', '');
INSERT INTO `clientes` VALUES ('30', 'vinicola ladorni', '1709073448.png', 'ladorni@miro', 'vinho2002', '');
INSERT INTO `clientes` VALUES ('31', 'Parmitalia', '1709074420.png', 'parmitalia@miro', 'queijo2002', '');
INSERT INTO `clientes` VALUES ('32', 'Beiju Bom', '1709074478.png', 'beju@miro', 'beju2002', '');
INSERT INTO `clientes` VALUES ('33', 'Neugebauer', '1718118816.png', 'Neugebauer', '123456789', '');
CREATE TABLE `configuracoes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `titulo` varchar(50) NOT NULL,
  `link` varchar(300) NOT NULL,
  `logo` varchar(30) NOT NULL,
  `distancia` float NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
INSERT INTO `configuracoes` VALUES ('1', 'WSA Dashboard', 'https://wsapromotion.app.br/', 'logo.png', '400');
CREATE TABLE `contratos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `estabelecimento` int(11) NOT NULL,
  `promotor_responsavel` int(11) NOT NULL,
  `cliente_id` int(11) NOT NULL,
  `titulo` varchar(240) NOT NULL,
  `descricao` varchar(500) NOT NULL,
  `data_inicial` date NOT NULL,
  `data_final` date NOT NULL,
  `horario` time NOT NULL,
  `dia_semana` int(1) NOT NULL,
  `valor` float(12,2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `estabelecimentos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` varchar(240) NOT NULL,
  `endereco` varchar(240) NOT NULL,
  `logo` varchar(240) NOT NULL,
  `latitude` varchar(140) NOT NULL,
  `longitude` varchar(140) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
INSERT INTO `estabelecimentos` VALUES ('4', 'MUFFATO DUQUE LONDRINA', 'Av. Duque de Caxias, 1200 - Centro, Londrina - PR, 86015-000', '1709070137.png', '-23.33088846963784', ' -51.15040755587163');
INSERT INTO `estabelecimentos` VALUES ('6', 'WSA PROMOTION ', 'R. Colômbia, 342 - Vila Brasil, Londrina - PR, 86010-720', '', '-23.326186079031082', '-51.151717259931715');
INSERT INTO `estabelecimentos` VALUES ('7', 'Vegas On', 'Av. Winston Churchill, 1527 - Capão Raso, Curitiba - PR, 81130-000', '', '-25.50961489505273', '-49.29564747663692');
CREATE TABLE `modalidades` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `titulo` varchar(240) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;
INSERT INTO `modalidades` VALUES ('8', 'PONTA RETIRADA', '1');
INSERT INTO `modalidades` VALUES ('9', 'TROCA DE PRODUTOS', '1');
INSERT INTO `modalidades` VALUES ('10', 'PERDA DE ESPAÇO', '1');
INSERT INTO `modalidades` VALUES ('11', 'PONTA CONQUISTADA', '1');
CREATE TABLE `ocorrencias` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data` date NOT NULL,
  `horario` time NOT NULL,
  `titulo` varchar(240) NOT NULL,
  `imagem` varchar(240) NOT NULL,
  `descricao` varchar(240) NOT NULL,
  `modalidade` int(11) NOT NULL,
  `servico_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
INSERT INTO `ocorrencias` VALUES ('5', '2024-08-06', '19:18:15', 'Perda', '', '', '10', '64');
INSERT INTO `ocorrencias` VALUES ('6', '2024-08-06', '19:18:26', '', '1722984835-1.png', '', '10', '64');
INSERT INTO `ocorrencias` VALUES ('7', '2024-08-06', '19:19:46', '', '', '', '10', '64');
CREATE TABLE `promotores` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `onesignal` varchar(300) NOT NULL,
  `nome` varchar(240) NOT NULL,
  `email` varchar(240) NOT NULL,
  `senha` varchar(240) NOT NULL,
  `foto` varchar(300) NOT NULL,
  `id_status` int(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=latin1;
INSERT INTO `promotores` VALUES ('1', '', 'Joao da Silva', 'teste', 'teste', '1718118594.png', '1');
INSERT INTO `promotores` VALUES ('19', '', 'Alexandre', 'Alexandre', '123456789', '1718118594.png', '1');
INSERT INTO `promotores` VALUES ('20', '', 'joão Gabriel de Assis', 'joao ', '123456789', '1718215605.png', '1');
INSERT INTO `promotores` VALUES ('21', '', 'Kauan', 'Kauan', '987654321', '1718221051.png', '1');
CREATE TABLE `servicos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `baixado` int(1) NOT NULL,
  `titulo` varchar(240) NOT NULL,
  `descricao` varchar(500) NOT NULL,
  `data` date NOT NULL,
  `dia_semana` int(1) NOT NULL,
  `horario` time NOT NULL,
  `promotor_responsavel` int(11) NOT NULL,
  `cliente_id` int(11) NOT NULL,
  `estabelecimento` int(11) NOT NULL,
  `valor` float(12,2) NOT NULL,
  `id_status` int(1) NOT NULL,
  `checkin` datetime NOT NULL,
  `checkout` datetime NOT NULL,
  `observacoes` longtext NOT NULL,
  `checkin_latitude` varchar(30) NOT NULL,
  `checkin_longitude` varchar(30) NOT NULL,
  `checkout_latitude` varchar(30) NOT NULL,
  `checkout_longitude` varchar(30) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=latin1;
INSERT INTO `servicos` VALUES ('64', '0', 'TESTE', '', '2024-08-06', '0', '19:00:00', '20', '5', '6', '0.00', '1', '2024-08-06 21:56:32', '2024-08-06 22:53:36', '', '-23.3263033', '-51.1517315', '-23.3263054', '-51.1517478');
INSERT INTO `servicos` VALUES ('65', '0', 'ROTA DUQUE', '', '2024-08-06', '0', '20:00:00', '20', '4', '6', '0.00', '1', '2024-08-06 23:00:53', '2024-08-06 23:03:17', '', '-23.326371', '-51.1517249', '-23.3263247', '-51.1516953');
INSERT INTO `servicos` VALUES ('66', '0', 'ROTA DUQUE', '', '2024-08-06', '0', '20:15:00', '20', '6', '6', '0.00', '1', '2024-08-06 23:18:29', '2024-08-06 23:21:33', '', '-23.3262992', '-51.1517495', '-23.3262992', '-51.1517495');
INSERT INTO `servicos` VALUES ('67', '0', 'TESTE', 'opaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', '2024-08-06', '0', '20:15:00', '20', '10', '4', '0.00', '0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '', '', '', '');
INSERT INTO `servicos` VALUES ('68', '0', 'Teste', '', '2024-08-07', '0', '18:30:00', '20', '4', '6', '0.00', '1', '2024-08-07 21:30:37', '2024-08-07 21:33:24', '', '-23.3263101', '-51.1517509', '-23.3263523', '-51.1516737');
INSERT INTO `servicos` VALUES ('69', '1', 'atendimento', '', '2024-08-22', '0', '12:30:00', '20', '5', '6', '0.00', '0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '', '', '', '');
INSERT INTO `servicos` VALUES ('72', '1', 'Teste VegasOn', 'teste', '2024-09-27', '0', '18:30:00', '1', '4', '7', '0.00', '0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '', '', '', '');
