-- mysqldump-php https://github.com/ifsnop/mysqldump-php
--
-- Host: localhost	Database: dmacherprojetos_agenda
-- ------------------------------------------------------
-- Server version 	5.7.44
-- Date: Fri, 24 Jul 2026 11:07:24 -0300

/*!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 utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40101 SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `appointments`
--

/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `appointments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `date_sched` datetime NOT NULL,
  `contact` varchar(40) NOT NULL,
  `email` varchar(170) NOT NULL,
  `address` varchar(100) NOT NULL,
  `details` text,
  `send_notify` tinyint(1) NOT NULL DEFAULT '1',
  `notified` tinyint(1) NOT NULL DEFAULT '0',
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `date_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `appointments`
--

LOCK TABLES `appointments` WRITE;
/*!40000 ALTER TABLE `appointments` DISABLE KEYS */;
SET autocommit=0;
INSERT INTO `appointments` VALUES (1,0,'0000-00-00 00:00:00','','','',NULL,1,0,0,'2025-05-21 11:55:46'),(3,2,'2025-05-29 10:20:00','','bah_franca@hotmail.com','Rua Pedro Moreira de Sousa, 323, Jardim Park Real, Indaiatuba, SP','',1,0,0,'2025-05-28 10:16:27'),(4,3,'2025-05-29 11:21:00','19992701474','contato@primehousesolutions.com.br','Rua Tapuia, 587, Vila Maria Helena, Indaiatuba , SP','',1,0,0,'2025-05-28 10:16:46');
/*!40000 ALTER TABLE `appointments` ENABLE KEYS */;
UNLOCK TABLES;
COMMIT;

-- Dumped table `appointments` with 3 row(s)
--

--
-- Table structure for table `clients`
--

/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `clients` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `nome_razao_social` varchar(250) DEFAULT NULL,
  `cpf_cnpj` varchar(30) DEFAULT NULL,
  `rg_ie` varchar(30) DEFAULT NULL,
  `email` varchar(200) DEFAULT NULL,
  `telefone_residencial` varchar(20) DEFAULT NULL,
  `telefone_trabalho` varchar(20) DEFAULT NULL,
  `whatsapp` varchar(20) DEFAULT NULL,
  `estado_civil` enum('Solteiro(a)','Casado(a)','Divorciado(a)','Viúvo(a)','Separado(a)','União Estável') DEFAULT NULL,
  `cep` varchar(10) DEFAULT NULL,
  `logradouro` varchar(250) DEFAULT NULL,
  `numero` varchar(10) DEFAULT NULL,
  `bairro` varchar(100) DEFAULT NULL,
  `complemento` varchar(100) DEFAULT NULL,
  `municipio` varchar(100) DEFAULT NULL,
  `uf` char(2) DEFAULT NULL,
  `data_nascimento` date DEFAULT NULL,
  `sexo` enum('Masculino','Feminino','Não definido') DEFAULT NULL,
  `obs` text,
  `advertencia` text,
  `categoria` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `clients`
--

LOCK TABLES `clients` WRITE;
/*!40000 ALTER TABLE `clients` DISABLE KEYS */;
SET autocommit=0;
INSERT INTO `clients` VALUES (1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,1,'BÃRBARA FRANÇA','41857069870',NULL,'bah_franca@hotmail.com',NULL,NULL,'19971545012',NULL,'13348731','Rua Pedro Moreira de Sousa','323','Jardim Park Real','Quadra 3 Lote 7','Indaiatuba','SP',NULL,NULL,NULL,NULL,NULL),(3,1,'Cris',NULL,NULL,'contato@primehousesolutions.com.br',NULL,'19992701474',NULL,NULL,NULL,'Rua Tapuia','587','Vila Maria Helena',NULL,'Indaiatuba ','SP',NULL,NULL,NULL,NULL,NULL),(4,1,'Mateus ',NULL,NULL,'contato@kikutividros.com.br',NULL,'19999566477','19999566477',NULL,'13332656','Rua Senador Romeu Tuma','320','Mato Dentro ','Pisa - Bloco 33 Apartamento 102','Indaiatuba ','SP',NULL,NULL,NULL,NULL,NULL);
/*!40000 ALTER TABLE `clients` ENABLE KEYS */;
UNLOCK TABLES;
COMMIT;

-- Dumped table `clients` with 4 row(s)
--

--
-- Table structure for table `email_logs`
--

/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `email_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `appointment_id` int(11) NOT NULL,
  `client_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `sent_by` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `subject` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `message` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `sent_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `status` enum('success','error') COLLATE utf8mb4_unicode_ci NOT NULL,
  `error_message` text COLLATE utf8mb4_unicode_ci,
  `client_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sent_by` (`sent_by`(250))
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `email_logs`
--

LOCK TABLES `email_logs` WRITE;
/*!40000 ALTER TABLE `email_logs` DISABLE KEYS */;
SET autocommit=0;
INSERT INTO `email_logs` VALUES (1,0,0,'','','','','','2025-05-21 14:57:28','success',NULL,''),(2,1,2,'2','Adminstrator Admin','bah_franca@hotmail.com','Reunião Agendada','Olá BÃRBARA FRANÇA,\n\nVocê tem uma reunião marcada para: 21-05-2025 08:00.\n\nAtenciosamente,\nDmacher Projetos.','2025-05-21 19:08:40','success','Email enviado com sucesso.','BÃRBARA FRANÇA'),(3,1,3,'2','Adminstrator Admin','bah_franca@hotmail.com','Reunião Agendada','Olá BÃRBARA FRANÇA,\n\nVocê tem uma reunião marcada para: 29-05-2025 10:20.\n\nAtenciosamente,\nDmacher Projetos.','2025-05-28 13:16:27','success','Email enviado com sucesso.','BÃRBARA FRANÇA'),(4,1,4,'3','Adminstrator Admin','contato@primehousesolutions.com.br','Reunião Agendada','Olá Cris,\n\nVocê tem uma reunião marcada para: 29-05-2025 11:21.\n\nAtenciosamente,\nDmacher Projetos.','2025-05-28 13:16:46','success','Email enviado com sucesso.','Cris'),(5,1,5,'6','Adminstrator Admin','x@x.com','Reunião Agendada','Olá <script> alert(\'message\'); </script>,\n\nVocê tem uma reunião marcada para: 27-10-2025 16:54.\n\nAtenciosamente,\nDmacher Projetos.','2025-11-29 17:52:23','success','Email enviado com sucesso.','<script> Alert(\'message\'); </script>');
/*!40000 ALTER TABLE `email_logs` ENABLE KEYS */;
UNLOCK TABLES;
COMMIT;

-- Dumped table `email_logs` with 5 row(s)
--

--
-- Table structure for table `location`
--

/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `location` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `location` text,
  `description` text,
  `max_a_day` int(11) NOT NULL,
  `date_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `date_updated` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `location`
--

LOCK TABLES `location` WRITE;
/*!40000 ALTER TABLE `location` DISABLE KEYS */;
SET autocommit=0;
/*!40000 ALTER TABLE `location` ENABLE KEYS */;
UNLOCK TABLES;
COMMIT;

-- Dumped table `location` with 0 row(s)
--

--
-- Table structure for table `patient_list`
--

/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `patient_list` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `type` set('0','1','','') NOT NULL,
  `date_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `patient_list`
--

LOCK TABLES `patient_list` WRITE;
/*!40000 ALTER TABLE `patient_list` DISABLE KEYS */;
SET autocommit=0;
INSERT INTO `patient_list` VALUES (43,'teste','','2025-04-05 10:20:27');
/*!40000 ALTER TABLE `patient_list` ENABLE KEYS */;
UNLOCK TABLES;
COMMIT;

-- Dumped table `patient_list` with 1 row(s)
--

--
-- Table structure for table `patient_meta`
--

/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `patient_meta` (
  `patient_id` int(11) NOT NULL,
  `meta_field` text,
  `meta_value` text,
  `date_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  KEY `patient_id` (`patient_id`),
  CONSTRAINT `patient_meta_ibfk_1` FOREIGN KEY (`patient_id`) REFERENCES `patient_list` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `patient_meta`
--

LOCK TABLES `patient_meta` WRITE;
/*!40000 ALTER TABLE `patient_meta` DISABLE KEYS */;
SET autocommit=0;
INSERT INTO `patient_meta` VALUES (43,'name','teste','2025-04-05 10:20:27'),(43,'email','teste@teste.com.br','2025-04-05 10:20:27'),(43,'contact','19555555555','2025-04-05 10:20:27'),(43,'address','Rua 1\r\n2','2025-04-05 10:20:27');
/*!40000 ALTER TABLE `patient_meta` ENABLE KEYS */;
UNLOCK TABLES;
COMMIT;

-- Dumped table `patient_meta` with 4 row(s)
--

--
-- Table structure for table `postits`
--

/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `postits` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL DEFAULT 'Novo Post-it',
  `content` text,
  `color` varchar(50) NOT NULL DEFAULT 'yellow',
  `width` int(11) NOT NULL DEFAULT '250',
  `height` int(11) NOT NULL DEFAULT '250',
  `position_x` int(11) NOT NULL,
  `position_y` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `postits`
--

LOCK TABLES `postits` WRITE;
/*!40000 ALTER TABLE `postits` DISABLE KEYS */;
SET autocommit=0;
INSERT INTO `postits` VALUES (4,'Novo Post-it','','yellow',250,250,20,20,'2025-04-15 22:09:22','2025-04-15 22:09:22');
/*!40000 ALTER TABLE `postits` ENABLE KEYS */;
UNLOCK TABLES;
COMMIT;

-- Dumped table `postits` with 1 row(s)
--

--
-- Table structure for table `schedule_settings`
--

/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `schedule_settings` (
  `meta_field` text NOT NULL,
  `meta_value` text NOT NULL,
  `date_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `schedule_settings`
--

LOCK TABLES `schedule_settings` WRITE;
/*!40000 ALTER TABLE `schedule_settings` DISABLE KEYS */;
SET autocommit=0;
INSERT INTO `schedule_settings` VALUES ('day_schedule','Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday','2025-11-29 14:45:47'),('morning_schedule','07:30,12:00','2025-11-29 14:45:47'),('afternoon_schedule','13:00,18:30','2025-11-29 14:45:47'),('notification_time','30','2025-11-29 14:45:47');
/*!40000 ALTER TABLE `schedule_settings` ENABLE KEYS */;
UNLOCK TABLES;
COMMIT;

-- Dumped table `schedule_settings` with 4 row(s)
--

--
-- Table structure for table `smtp_settings`
--

/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = @saved_cs_client */;
SET autocommit=0;
UNLOCK TABLES;
COMMIT;

-- Dumped table `smtp_settings` with 1 row(s)
--

--
-- Table structure for table `system_info`
--

/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `system_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `meta_field` text NOT NULL,
  `meta_value` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `system_info`
--

LOCK TABLES `system_info` WRITE;
/*!40000 ALTER TABLE `system_info` DISABLE KEYS */;
SET autocommit=0;
INSERT INTO `system_info` VALUES (1,'name','Agenda'),(6,'short_name','Agenda'),(11,'logo','uploads/favicon.png'),(13,'user_avatar','uploads/user_avatar.jpg'),(14,'cover','uploads/1630631400_clinic-cover.jpg');
/*!40000 ALTER TABLE `system_info` ENABLE KEYS */;
UNLOCK TABLES;
COMMIT;

-- Dumped table `system_info` with 5 row(s)
--

--
-- Table structure for table `users`
--

/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = @saved_cs_client */;
SET autocommit=0;
UNLOCK TABLES;
COMMIT;

-- Dumped table `users` with 1 row(s)
--

/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET AUTOCOMMIT=@OLD_AUTOCOMMIT */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!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 */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on: Fri, 24 Jul 2026 11:07:24 -0300
