﻿-- MySQL dump 10.13  Distrib 9.6.0, for Win64 (x86_64)
--
-- Host: localhost    Database: sis_odonto
-- ------------------------------------------------------
-- Server version	9.6.0

/*!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 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!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 */;
SET @MYSQLDUMP_TEMP_LOG_BIN = @@SESSION.SQL_LOG_BIN;
SET @@SESSION.SQL_LOG_BIN= 0;

--
-- GTID state at the beginning of the backup 
--

SET @@GLOBAL.GTID_PURGED=/*!80000 '+'*/ 'a55635f9-101c-11f1-b100-00155ded4801:1-1161';

--
-- Table structure for table `agendamentos`
--

DROP TABLE IF EXISTS `agendamentos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `agendamentos` (
  `id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `clinica_id` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pacienteNome` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dentistaId` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `status` enum('Confirmado','Pendente','Concluido','Faltou') COLLATE utf8mb4_unicode_ci DEFAULT 'Pendente',
  `procedimento` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `observacoes` text COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_dentista_slot` (`dentistaId`,`start_time`),
  CONSTRAINT `agendamentos_ibfk_1` FOREIGN KEY (`dentistaId`) REFERENCES `dentistas` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `agendamentos`
--

LOCK TABLES `agendamentos` WRITE;
/*!40000 ALTER TABLE `agendamentos` DISABLE KEYS */;
INSERT INTO `agendamentos` VALUES ('test_1',NULL,'WESLLEY ANTONY TELLES DA SILVA','d1','2026-02-27 12:03:07','2026-02-27 13:03:07','Pendente','TESTE',NULL);
/*!40000 ALTER TABLE `agendamentos` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `clinicas`
--

DROP TABLE IF EXISTS `clinicas`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `clinicas` (
  `id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nome_fantasia` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `documento` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cor` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT '#2563eb',
  `createdAt` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `clinicas`
--

LOCK TABLES `clinicas` WRITE;
/*!40000 ALTER TABLE `clinicas` DISABLE KEYS */;
INSERT INTO `clinicas` VALUES ('c1','SCOREODONTO MATRIZ','00.000.000/0001-00','#059669','2026-03-10 15:55:57'),('c2','SCOREODONTO FILIAL SUL','00.000.000/0002-00','#2563eb','2026-03-10 15:55:57');
/*!40000 ALTER TABLE `clinicas` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `dentistas`
--

DROP TABLE IF EXISTS `dentistas`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `dentistas` (
  `id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `clinica_id` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nome` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `telefone` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `corAgenda` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `especialidade` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ativo` tinyint(1) DEFAULT '1',
  `ordem` int DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `dentistas`
--

LOCK TABLES `dentistas` WRITE;
/*!40000 ALTER TABLE `dentistas` DISABLE KEYS */;
INSERT INTO `dentistas` VALUES ('d1','c1','MURILO AMORIM','muriloamorim791@gmail.com','(67) 99999-1111','#10B981','ORTODONTIA',1,0),('d2','c1','RUI CESAR VARGAS','ruibto@gmail.com','(67) 99999-2222','#3B82F6','IMPLANTE',1,0);
/*!40000 ALTER TABLE `dentistas` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `dentistas_horarios`
--

DROP TABLE IF EXISTS `dentistas_horarios`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `dentistas_horarios` (
  `id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `dentista_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `clinica_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `dia_semana` int NOT NULL,
  `hora_inicio` time NOT NULL,
  `hora_fim` time NOT NULL,
  `ativo` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `dentistas_horarios`
--

LOCK TABLES `dentistas_horarios` WRITE;
/*!40000 ALTER TABLE `dentistas_horarios` DISABLE KEYS */;
/*!40000 ALTER TABLE `dentistas_horarios` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `especialidades`
--

DROP TABLE IF EXISTS `especialidades`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `especialidades` (
  `id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nome` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `descricao` text COLLATE utf8mb4_unicode_ci,
  `ordem` int DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `especialidades`
--

LOCK TABLES `especialidades` WRITE;
/*!40000 ALTER TABLE `especialidades` DISABLE KEYS */;
INSERT INTO `especialidades` VALUES ('0.29431554436274265','DENTISTICA','RESTAURA├ç├òES',1),('e1','ORTODONTIA','CORRE├ç├éO DA POSI├ç├éO DOS DENTES E OSSOS MAXILARES',2),('e2','IMPLANTODONTIA','IMPLANTES UNIT├üRIOS E MULTIPLOS',4),('e3','ENDODONTIA','TRATAMENTO DE CANAL E LESÔö£├▓ES PERIAPICAIS',3),('e4','CLINICO GERAL','PROCEDIMENTOS BASICOS, LIMPEZA E RESTAURA├ç├òES',0);
/*!40000 ALTER TABLE `especialidades` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `financeiro`
--

DROP TABLE IF EXISTS `financeiro`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `financeiro` (
  `id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `clinica_id` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pacienteNome` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `descricao` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `valor` decimal(10,2) DEFAULT NULL,
  `dataVencimento` date DEFAULT NULL,
  `status` enum('Pago','Pendente','Atrasado') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `formaPagamento` enum('Boleto','Pix','Cart├úo','Dinheiro') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tipo` enum('RECEITA','DESPESA') COLLATE utf8mb4_unicode_ci DEFAULT 'RECEITA',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `financeiro`
--

LOCK TABLES `financeiro` WRITE;
/*!40000 ALTER TABLE `financeiro` DISABLE KEYS */;
INSERT INTO `financeiro` VALUES ('f1',NULL,'WESLLEY ANTONY','MANUTEN├ç├âO MENSAL ORTO',150.00,'2023-10-15','Pago','Pix','RECEITA'),('f2',NULL,'NICOLLY BEATRIZ','ENTRADA IMPLANTE',1200.00,'2023-10-20','Pendente','Boleto','RECEITA');
/*!40000 ALTER TABLE `financeiro` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `google_tokens`
--

DROP TABLE IF EXISTS `google_tokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `google_tokens` (
  `owner_id` varchar(255) NOT NULL,
  `refresh_token` text NOT NULL,
  `access_token` text,
  `expiry_date` bigint DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`owner_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `google_tokens`
--

LOCK TABLES `google_tokens` WRITE;
/*!40000 ALTER TABLE `google_tokens` DISABLE KEYS */;
/*!40000 ALTER TABLE `google_tokens` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `gto_builders`
--

DROP TABLE IF EXISTS `gto_builders`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `gto_builders` (
  `id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `pacienteId` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `dentistaId` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `credenciadaId` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT 'RASCUNHO',
  `total` decimal(10,2) DEFAULT '0.00',
  `createdAt` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `gto_builders`
--

LOCK TABLES `gto_builders` WRITE;
/*!40000 ALTER TABLE `gto_builders` DISABLE KEYS */;
/*!40000 ALTER TABLE `gto_builders` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `gto_items`
--

DROP TABLE IF EXISTS `gto_items`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `gto_items` (
  `id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `builderId` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `procedimentoId` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `codigoTUSS` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `descricao` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `dente` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `face` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `quantidade` int DEFAULT '1',
  `valorUnitario` decimal(10,2) NOT NULL,
  `valorTotal` decimal(10,2) NOT NULL,
  `observacao` text COLLATE utf8mb4_unicode_ci,
  `anexosCount` int DEFAULT '0',
  `codigoInterno` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `gto_items`
--

LOCK TABLES `gto_items` WRITE;
/*!40000 ALTER TABLE `gto_items` DISABLE KEYS */;
/*!40000 ALTER TABLE `gto_items` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `guias_odontologicas`
--

DROP TABLE IF EXISTS `guias_odontologicas`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `guias_odontologicas` (
  `id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `numeroGuiaPrestador` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `numeroGuiaOperadora` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dataSolicitacao` date NOT NULL,
  `tipoTratamento` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `beneficiarioId` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `beneficiarioNome` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `beneficiarioIdentificacao` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `createdAt` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `guias_odontologicas`
--

LOCK TABLES `guias_odontologicas` WRITE;
/*!40000 ALTER TABLE `guias_odontologicas` DISABLE KEYS */;
INSERT INTO `guias_odontologicas` VALUES ('1','177903','O-001','2026-02-25','Tratamento Odontologico','AUTORIZADO','B1','RONEY OTTONI DE SOUZA','181442','2026-02-26 15:43:38'),('2','178056','O-002','2026-02-25','Tratamento Odontologico','AUTORIZADO','B2','MILENA LIMA DIAS OTTONI DE SOUZA','157320','2026-02-26 15:43:38'),('3','178179','O-003','2026-02-25','Tratamento Odontologico','AUTORIZADO','B3','EVANDRO MACHADO AZEMAN','2025100002341','2026-02-26 15:43:38'),('4','177208','O-004','2026-02-24','Tratamento Odontologico','AUTORIZADO','B4','MARIA JULIA MIRANDA DA SILVA','145805','2026-02-26 15:43:38'),('5','177335','O-005','2026-02-24','Tratamento Odontologico','AUTORIZADO_PARCIAL','B5','JOAO ITALO CORREA DE AMORIM SANT ANNA','443079','2026-02-26 15:43:38'),('6','176468','O-006','2026-02-23','Urgencia / Emergencia','AUTORIZADO','B6','EDUARDO STENIO GONCALVES DOS SANTOS','435593','2026-02-26 15:43:38'),('7','176572','O-007','2026-02-23','Tratamento Odontologico','AUTORIZADO','B7','LUCIA MARIA DA SILVA JULIO','127311','2026-02-26 15:43:38'),('8','176666','O-008','2026-02-23','Tratamento Odontologico','AUTORIZADO','B8','JAIRO HIDEKI NAGAO','96512','2026-02-26 15:43:38'),('9','176721','O-009','2026-02-23','Tratamento Odontologico','AUTORIZADO','B8','JAIRO HIDEKI NAGAO','96512','2026-02-26 15:43:38');
/*!40000 ALTER TABLE `guias_odontologicas` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `leads`
--

DROP TABLE IF EXISTS `leads`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `leads` (
  `id` varchar(50) NOT NULL,
  `nome` varchar(100) DEFAULT NULL,
  `sobrenome` varchar(100) DEFAULT NULL,
  `cpf` varchar(20) DEFAULT NULL,
  `whatsapp` varchar(20) DEFAULT NULL,
  `tipoInteresse` enum('Particular','Plano') DEFAULT NULL,
  `dataCadastro` datetime DEFAULT NULL,
  `status` enum('Novo','Convertido','Arquivado') DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `leads`
--

LOCK TABLES `leads` WRITE;
/*!40000 ALTER TABLE `leads` DISABLE KEYS */;
/*!40000 ALTER TABLE `leads` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `notificacoes`
--

DROP TABLE IF EXISTS `notificacoes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `notificacoes` (
  `id` varchar(50) NOT NULL,
  `titulo` varchar(255) DEFAULT NULL,
  `mensagem` text,
  `tipo` enum('lead','sistema','agenda','financeiro') DEFAULT 'sistema',
  `lida` tinyint(1) DEFAULT '0',
  `data` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `notificacoes`
--

LOCK TABLES `notificacoes` WRITE;
/*!40000 ALTER TABLE `notificacoes` DISABLE KEYS */;
INSERT INTO `notificacoes` VALUES ('notif_fin_overdue_f2','FATURA ATRASADA','A conta \"ENTRADA IMPLANTE\" de R$ 1200.00 venceu em 20/10/2023','financeiro',1,'2026-02-27 10:16:03'),('notif_fin_overdue_f2 ','FATURA ATRASADA','A conta \"ENTRADA IMPLANTE\" de R$ 1200.00 venceu em 20/10/2023 ','financeiro',0,'2026-03-10 15:55:58'),('notif_sys_setup','CONFIGURA├ç├âO DO SISTEMA','O sistema possui poucos pacientes cadastrados. Considere importar dados.','sistema',1,'2026-02-27 10:16:03');
/*!40000 ALTER TABLE `notificacoes` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `pacientes`
--

DROP TABLE IF EXISTS `pacientes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `pacientes` (
  `id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nome` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `cpf` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `telefone` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ultimoTratamento` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `convenio` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dataNascimento` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `pacientes`
--

LOCK TABLES `pacientes` WRITE;
/*!40000 ALTER TABLE `pacientes` DISABLE KEYS */;
INSERT INTO `pacientes` VALUES ('1','WESLLEY ANTONY TELLES DA SILVA','702.013.331-20','(67) 98125-2514','WESLLEY@EMAIL.COM','ORTO','CASSEMS','17/08/2000'),('2','NICOLLY BEATRIZ TEIXEIRA','101.034.232-06','(67) 99904-7557','NICOLLY@EMAIL.COM','LIMPEZA','ODONTOSEG','22/09/2010'),('3','ROSANGELA DUTRA','917.670.830-68','(67) 9272-2487','ROSANGELA@EMAIL.COM',NULL,'CASSEMS','23/11/1978');
/*!40000 ALTER TABLE `pacientes` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `planos`
--

DROP TABLE IF EXISTS `planos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `planos` (
  `id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nome` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tipo` enum('Convenio','Particular','Parceria') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `descontoPadrao` decimal(5,2) DEFAULT NULL,
  `corCartao` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `planos`
--

LOCK TABLES `planos` WRITE;
/*!40000 ALTER TABLE `planos` DISABLE KEYS */;
INSERT INTO `planos` VALUES ('p1','PARTICULAR','Particular',0.00,'#1f2937'),('p2','UNIMED ODONTO','Convenio',0.00,'#1eb545'),('p3','ODONTOPREV','Convenio',0.00,'#0066cc'),('p4','CASSEMS','Convenio',0.00,'#e63946'),('p5','SESI ODONTO','Convenio',0.00,'#f4a261');
/*!40000 ALTER TABLE `planos` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `procedimentos`
--

DROP TABLE IF EXISTS `procedimentos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `procedimentos` (
  `id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nome` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `descricao` text COLLATE utf8mb4_unicode_ci,
  `especialidadeId` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `especialidadeNome` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `valorParticular` decimal(10,2) DEFAULT NULL,
  `codigoInterno` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `categoria` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT 'Particular',
  `tipo_regiao` enum('DENTE','ARCO','GERAL') COLLATE utf8mb4_unicode_ci DEFAULT 'GERAL',
  `exige_face` tinyint(1) DEFAULT '0',
  `codigo` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ordem` int DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `especialidadeId` (`especialidadeId`),
  CONSTRAINT `procedimentos_ibfk_1` FOREIGN KEY (`especialidadeId`) REFERENCES `especialidades` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `procedimentos`
--

LOCK TABLES `procedimentos` WRITE;
/*!40000 ALTER TABLE `procedimentos` DISABLE KEYS */;
INSERT INTO `procedimentos` VALUES ('proc1','CONSULTA INICIAL','AVALIAÔö£├ºÔö£├óO INICIAL E PLANO DE TRATAMENTO','e4','CLÔö£├¼NICO GERAL',150.00,NULL,'Particular','GERAL',0,NULL,0),('proc2','MANUTEN├ç├âO ORTOD├öNTICA','MANUTEN├ç├éO MENSAL DE APARELHO FIXO','E1','ORTODONTIA',250.00,'','PARTICULAR','ARCO',0,'',0);
/*!40000 ALTER TABLE `procedimentos` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `procedimentos_valores_planos`
--

DROP TABLE IF EXISTS `procedimentos_valores_planos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `procedimentos_valores_planos` (
  `id` int NOT NULL AUTO_INCREMENT,
  `procedimentoId` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `planoId` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `planoNome` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `valor` decimal(10,2) DEFAULT NULL,
  `codigoPlano` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `procedimentoId` (`procedimentoId`),
  KEY `planoId` (`planoId`),
  CONSTRAINT `procedimentos_valores_planos_ibfk_1` FOREIGN KEY (`procedimentoId`) REFERENCES `procedimentos` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `procedimentos_valores_planos`
--

LOCK TABLES `procedimentos_valores_planos` WRITE;
/*!40000 ALTER TABLE `procedimentos_valores_planos` DISABLE KEYS */;
INSERT INTO `procedimentos_valores_planos` VALUES (1,'proc1','p2','UNIMED ODONTO',80.00,NULL),(2,'proc1','p3','ODONTOPREV',75.00,NULL);
/*!40000 ALTER TABLE `procedimentos_valores_planos` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `settings`
--

DROP TABLE IF EXISTS `settings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `settings` (
  `id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `category` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `data` text COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `settings`
--

LOCK TABLES `settings` WRITE;
/*!40000 ALTER TABLE `settings` DISABLE KEYS */;
INSERT INTO `settings` VALUES ('main','general','{\"clinicEmail\":\"RECEP.CONSULTTCLINIC@GMAIL.COM\",\"clinicCalendarId\":\"RECEP.CONSULTTCLINIC@GMAIL.COM\",\"googleApiKey\":\"[REDACTED]",\"googleCalendarIds\":{\"d2\":\"ruibto@gmail.com\",\"d1\":\"muriloamorim791@gmail.com\"}}');
/*!40000 ALTER TABLE `settings` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `usuarios`
--

DROP TABLE IF EXISTS `usuarios`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `usuarios` (
  `id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nome` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `senha` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `cro` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cro_uf` varchar(2) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `celular` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `especialidade` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cor_agenda` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT '#2563eb',
  `role` enum('paciente','dentista','funcionario','donoclinica','admin') COLLATE utf8mb4_unicode_ci DEFAULT 'admin',
  `createdAt` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `usuarios`
--

LOCK TABLES `usuarios` WRITE;
/*!40000 ALTER TABLE `usuarios` DISABLE KEYS */;
INSERT INTO `usuarios` VALUES ('u1','RUI CESAR','admin@scoreodonto.com','admin',NULL,NULL,NULL,NULL,'#2563eb','admin','2026-03-10 16:27:04'),('u2','DENTISTA TESTE','dentista@scoreodonto.com','123456',NULL,NULL,NULL,NULL,'#2563eb','admin','2026-03-10 16:27:04'),('u3','FUNCIONARIO TESTE','funcionario@scoreodonto.com','cassems',NULL,NULL,NULL,NULL,'#2563eb','admin','2026-03-10 16:27:04'),('u4','DONO CLINICA','dono@scoreodonto.com','Rc362514',NULL,NULL,NULL,NULL,'#2563eb','admin','2026-03-10 16:27:04'),('u5','PACIENTE TESTE','paciente@scoreodonto.com','14253636',NULL,NULL,NULL,NULL,'#2563eb','admin','2026-03-10 16:27:04');
/*!40000 ALTER TABLE `usuarios` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `vinculos`
--

DROP TABLE IF EXISTS `vinculos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `vinculos` (
  `id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `usuario_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `clinica_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `role` enum('paciente','dentista','funcionario','donoclinica','admin') COLLATE utf8mb4_unicode_ci DEFAULT 'admin',
  `createdAt` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_clinica` (`usuario_id`,`clinica_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `vinculos`
--

LOCK TABLES `vinculos` WRITE;
/*!40000 ALTER TABLE `vinculos` DISABLE KEYS */;
INSERT INTO `vinculos` VALUES ('v_u1_c1','u1','c1','admin','2026-03-10 16:27:04'),('v_u1_c2','u1','c2','admin','2026-03-10 16:27:04'),('v_u2_c1','u2','c1','dentista','2026-03-10 16:27:04'),('v_u3_c1','u3','c1','funcionario','2026-03-10 16:27:04'),('v_u4_c1','u4','c1','donoclinica','2026-03-10 16:27:04'),('v_u4_c2','u4','c2','donoclinica','2026-03-10 16:27:04'),('v_u5_c1','u5','c1','paciente','2026-03-10 16:27:04');
/*!40000 ALTER TABLE `vinculos` ENABLE KEYS */;
UNLOCK TABLES;
SET @@SESSION.SQL_LOG_BIN = @MYSQLDUMP_TEMP_LOG_BIN;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!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 2026-03-15 20:33:25
