
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 `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 `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', '', '', '', '', '');
