--
-- Host: localhost    Database: agendacrm
-- ------------------------------------------------------


--
-- Current Database: `agendacrm`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `agendacrm` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `agendacrm`;

--
-- Table structure for table `communes`
--

CREATE TABLE `communes` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) COLLATE utf8mb4_general_ci NOT NULL,
  `owner_id` int NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=341 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `communes`
--

INSERT INTO `communes` VALUES (1,'Arica',1,'2025-06-25 00:28:36'),(2,'Camarones',1,'2025-06-25 00:28:36'),(3,'Putre',1,'2025-06-25 00:28:36'),(4,'General Lagos',1,'2025-06-25 00:28:36'),(5,'Iquique',1,'2025-06-25 00:28:36'),(6,'Alto Hospicio',1,'2025-06-25 00:28:36'),(7,'Pozo Almonte',1,'2025-06-25 00:28:36'),(8,'Camiña',1,'2025-06-25 00:28:36'),(9,'Colchane',1,'2025-06-25 00:28:36'),(10,'Huara',1,'2025-06-25 00:28:36'),(11,'Pica',1,'2025-06-25 00:28:36'),(12,'Antofagasta',1,'2025-06-25 00:28:36'),(13,'Mejillones',1,'2025-06-25 00:28:36'),(14,'Sierra Gorda',1,'2025-06-25 00:28:36'),(15,'Taltal',1,'2025-06-25 00:28:36'),(16,'Calama',1,'2025-06-25 00:28:36'),(17,'Ollagüe',1,'2025-06-25 00:28:36'),(18,'San Pedro de Atacama',1,'2025-06-25 00:28:36'),(19,'Tocopilla',1,'2025-06-25 00:28:36'),(20,'María Elena',1,'2025-06-25 00:28:36'),(21,'Copiapó',1,'2025-06-25 00:28:36'),(22,'Caldera',1,'2025-06-25 00:28:36'),(23,'Tierra Amarilla',1,'2025-06-25 00:28:36'),(24,'Chañaral',1,'2025-06-25 00:28:36'),(25,'Diego de Almagro',1,'2025-06-25 00:28:36'),(26,'Vallenar',1,'2025-06-25 00:28:36'),(27,'Alto del Carmen',1,'2025-06-25 00:28:36'),(28,'Freirina',1,'2025-06-25 00:28:36'),(29,'Huasco',1,'2025-06-25 00:28:36'),(30,'La Serena',1,'2025-06-25 00:28:36'),(31,'Coquimbo',1,'2025-06-25 00:28:36'),(32,'Andacollo',1,'2025-06-25 00:28:36'),(33,'La Higuera',1,'2025-06-25 00:28:36'),(34,'Paiguano',1,'2025-06-25 00:28:36'),(35,'Vicuña',1,'2025-06-25 00:28:36'),(36,'Illapel',1,'2025-06-25 00:28:36'),(37,'Canela',1,'2025-06-25 00:28:36'),(38,'Los Vilos',1,'2025-06-25 00:28:36'),(39,'Salamanca',1,'2025-06-25 00:28:36'),(40,'Ovalle',1,'2025-06-25 00:28:36'),(41,'Combarbalá',1,'2025-06-25 00:28:36'),(42,'Monte Patria',1,'2025-06-25 00:28:36'),(43,'Punitaqui',1,'2025-06-25 00:28:36'),(44,'Río Hurtado',1,'2025-06-25 00:28:36'),(45,'Valparaíso',1,'2025-06-25 00:28:36'),(46,'Casablanca',1,'2025-06-25 00:28:36'),(47,'Concón',1,'2025-06-25 00:28:36'),(48,'Juan Fernández',1,'2025-06-25 00:28:36'),(49,'Puchuncaví',1,'2025-06-25 00:28:36'),(50,'Quintero',1,'2025-06-25 00:28:36'),(51,'Viña del Mar',1,'2025-06-25 00:28:36'),(52,'Isla de Pascua',1,'2025-06-25 00:28:36'),(53,'Los Andes',1,'2025-06-25 00:28:36'),(54,'Calle Larga',1,'2025-06-25 00:28:36'),(55,'Catemu',1,'2025-06-25 00:28:36'),(56,'Llay-Llay',1,'2025-06-25 00:28:36'),(57,'Panquehue',1,'2025-06-25 00:28:36'),(58,'Putaendo',1,'2025-06-25 00:28:36'),(59,'San Felipe',1,'2025-06-25 00:28:36'),(60,'Santa María',1,'2025-06-25 00:28:36'),(61,'Quillota',1,'2025-06-25 00:28:36'),(62,'Calera',1,'2025-06-25 00:28:36'),(63,'Hijuelas',1,'2025-06-25 00:28:36'),(64,'La Cruz',1,'2025-06-25 00:28:36'),(65,'Nogales',1,'2025-06-25 00:28:36'),(66,'San Antonio',1,'2025-06-25 00:28:36'),(67,'Algarrobo',1,'2025-06-25 00:28:36'),(68,'Cartagena',1,'2025-06-25 00:28:36'),(69,'El Quisco',1,'2025-06-25 00:28:36'),(70,'El Tabo',1,'2025-06-25 00:28:36'),(71,'Santo Domingo',1,'2025-06-25 00:28:36'),(72,'San Felipe',1,'2025-06-25 00:28:36'),(73,'Santa María',1,'2025-06-25 00:28:36'),(74,'Limache',1,'2025-06-25 00:28:36'),(75,'Olmué',1,'2025-06-25 00:28:36'),(76,'Quilpué',1,'2025-06-25 00:28:36'),(77,'Villa Alemana',1,'2025-06-25 00:28:36'),(78,'Colina',1,'2025-06-25 00:28:36'),(79,'Lampa',1,'2025-06-25 00:28:36'),(80,'Tiltil',1,'2025-06-25 00:28:36'),(81,'Pirque',1,'2025-06-25 00:28:36'),(82,'Puente Alto',1,'2025-06-25 00:28:36'),(83,'San José de Maipo',1,'2025-06-25 00:28:36'),(84,'Buin',1,'2025-06-25 00:28:36'),(85,'Calera de Tango',1,'2025-06-25 00:28:36'),(86,'Paine',1,'2025-06-25 00:28:36'),(87,'San Bernardo',1,'2025-06-25 00:28:36'),(88,'Melipilla',1,'2025-06-25 00:28:36'),(89,'Alhué',1,'2025-06-25 00:28:36'),(90,'Curacaví',1,'2025-06-25 00:28:36'),(91,'María Pinto',1,'2025-06-25 00:28:36'),(92,'San Pedro',1,'2025-06-25 00:28:36'),(93,'El Monte',1,'2025-06-25 00:28:36'),(94,'Isla de Maipo',1,'2025-06-25 00:28:36'),(95,'Padre Hurtado',1,'2025-06-25 00:28:36'),(96,'Peñaflor',1,'2025-06-25 00:28:36'),(97,'Talagante',1,'2025-06-25 00:28:36'),(98,'Cerrillos',1,'2025-06-25 00:28:36'),(99,'Cerro Navia',1,'2025-06-25 00:28:36'),(100,'Conchalí',1,'2025-06-25 00:28:36'),(101,'El Bosque',1,'2025-06-25 00:28:36'),(102,'Estación Central',1,'2025-06-25 00:28:36'),(103,'Huechuraba',1,'2025-06-25 00:28:36'),(104,'Independencia',1,'2025-06-25 00:28:36'),(105,'La Cisterna',1,'2025-06-25 00:28:36'),(106,'La Florida',1,'2025-06-25 00:28:36'),(107,'La Granja',1,'2025-06-25 00:28:36'),(108,'La Pintana',1,'2025-06-25 00:28:36'),(109,'La Reina',1,'2025-06-25 00:28:36'),(110,'Las Condes',1,'2025-06-25 00:28:36'),(111,'Lo Barnechea',1,'2025-06-25 00:28:36'),(112,'Lo Espejo',1,'2025-06-25 00:28:36'),(113,'Lo Prado',1,'2025-06-25 00:28:36'),(114,'Macul',1,'2025-06-25 00:28:36'),(115,'Maipú',1,'2025-06-25 00:28:36'),(116,'Ñuñoa',1,'2025-06-25 00:28:36'),(117,'Pedro Aguirre Cerda',1,'2025-06-25 00:28:36'),(118,'Peñalolén',1,'2025-06-25 00:28:36'),(119,'Providencia',1,'2025-06-25 00:28:36'),(120,'Pudahuel',1,'2025-06-25 00:28:36'),(121,'Quilicura',1,'2025-06-25 00:28:36'),(122,'Quinta Normal',1,'2025-06-25 00:28:36'),(123,'Recoleta',1,'2025-06-25 00:28:36'),(124,'Renca',1,'2025-06-25 00:28:36'),(125,'San Joaquín',1,'2025-06-25 00:28:36'),(126,'San Miguel',1,'2025-06-25 00:28:36'),(127,'San Ramón',1,'2025-06-25 00:28:36'),(128,'Santiago',1,'2025-06-25 00:28:36'),(129,'Vitacura',1,'2025-06-25 00:28:36'),(130,'Rancagua',1,'2025-06-25 00:28:36'),(131,'Codegua',1,'2025-06-25 00:28:36'),(132,'Coinco',1,'2025-06-25 00:28:36'),(133,'Coltauco',1,'2025-06-25 00:28:36'),(134,'Doñihue',1,'2025-06-25 00:28:36'),(135,'Graneros',1,'2025-06-25 00:28:36'),(136,'Las Cabras',1,'2025-06-25 00:28:36'),(137,'Machalí',1,'2025-06-25 00:28:36'),(138,'Malloa',1,'2025-06-25 00:28:36'),(139,'Mostazal',1,'2025-06-25 00:28:36'),(140,'Olivar',1,'2025-06-25 00:28:36'),(141,'Peumo',1,'2025-06-25 00:28:36'),(142,'Pichidegua',1,'2025-06-25 00:28:36'),(143,'Quinta de Tilcoco',1,'2025-06-25 00:28:36'),(144,'Rengo',1,'2025-06-25 00:28:36'),(145,'Requínoa',1,'2025-06-25 00:28:36'),(146,'San Vicente de Tagua Tagua',1,'2025-06-25 00:28:36'),(147,'Pichilemu',1,'2025-06-25 00:28:36'),(148,'La Estrella',1,'2025-06-25 00:28:36'),(149,'Litueche',1,'2025-06-25 00:28:36'),(150,'Marchigüe',1,'2025-06-25 00:28:36'),(151,'Navidad',1,'2025-06-25 00:28:36'),(152,'Paredones',1,'2025-06-25 00:28:36'),(153,'San Fernando',1,'2025-06-25 00:28:36'),(154,'Chépica',1,'2025-06-25 00:28:36'),(155,'Chimbarongo',1,'2025-06-25 00:28:36'),(156,'Lolol',1,'2025-06-25 00:28:36'),(157,'Nancagua',1,'2025-06-25 00:28:36'),(158,'Palmilla',1,'2025-06-25 00:28:36'),(159,'Peralillo',1,'2025-06-25 00:28:36'),(160,'Placilla',1,'2025-06-25 00:28:36'),(161,'Pumanque',1,'2025-06-25 00:28:36'),(162,'Santa Cruz',1,'2025-06-25 00:28:36'),(163,'Talca',1,'2025-06-25 00:28:36'),(164,'Curepto',1,'2025-06-25 00:28:36'),(165,'Constitución',1,'2025-06-25 00:28:36'),(166,'Empedrado',1,'2025-06-25 00:28:36'),(167,'Maule',1,'2025-06-25 00:28:36'),(168,'Pelarco',1,'2025-06-25 00:28:36'),(169,'Pencahue',1,'2025-06-25 00:28:36'),(170,'Río Claro',1,'2025-06-25 00:28:36'),(171,'San Clemente',1,'2025-06-25 00:28:36'),(172,'San Rafael',1,'2025-06-25 00:28:36'),(173,'Colbún',1,'2025-06-25 00:28:36'),(174,'Linares',1,'2025-06-25 00:28:36'),(175,'Longaví',1,'2025-06-25 00:28:36'),(176,'Parral',1,'2025-06-25 00:28:36'),(177,'Retiro',1,'2025-06-25 00:28:36'),(178,'San Javier',1,'2025-06-25 00:28:36'),(179,'Villa Alegre',1,'2025-06-25 00:28:36'),(180,'Yerbas Buenas',1,'2025-06-25 00:28:36'),(181,'Cauquenes',1,'2025-06-25 00:28:36'),(182,'Chanco',1,'2025-06-25 00:28:36'),(183,'Pelluhue',1,'2025-06-25 00:28:36'),(184,'Curicó',1,'2025-06-25 00:28:36'),(185,'Hualañé',1,'2025-06-25 00:28:36'),(186,'Licantén',1,'2025-06-25 00:28:36'),(187,'Molina',1,'2025-06-25 00:28:36'),(188,'Romeral',1,'2025-06-25 00:28:36'),(189,'Sagrada Familia',1,'2025-06-25 00:28:36'),(190,'Teno',1,'2025-06-25 00:28:36'),(191,'Vichuquén',1,'2025-06-25 00:28:36'),(192,'Chillán',1,'2025-06-25 00:28:36'),(193,'Bulnes',1,'2025-06-25 00:28:36'),(194,'Cobquecura',1,'2025-06-25 00:28:36'),(195,'Coelemu',1,'2025-06-25 00:28:36'),(196,'Coihueco',1,'2025-06-25 00:28:36'),(197,'Chillán Viejo',1,'2025-06-25 00:28:36'),(198,'El Carmen',1,'2025-06-25 00:28:36'),(199,'Ninhue',1,'2025-06-25 00:28:36'),(200,'Ñiquén',1,'2025-06-25 00:28:36'),(201,'Pemuco',1,'2025-06-25 00:28:36'),(202,'Pinto',1,'2025-06-25 00:28:36'),(203,'Portezuelo',1,'2025-06-25 00:28:36'),(204,'Quillón',1,'2025-06-25 00:28:36'),(205,'Quirihue',1,'2025-06-25 00:28:36'),(206,'Ránquil',1,'2025-06-25 00:28:36'),(207,'San Carlos',1,'2025-06-25 00:28:36'),(208,'San Fabián',1,'2025-06-25 00:28:36'),(209,'San Ignacio',1,'2025-06-25 00:28:36'),(210,'San Nicolás',1,'2025-06-25 00:28:36'),(211,'Treguaco',1,'2025-06-25 00:28:36'),(212,'Yungay',1,'2025-06-25 00:28:36'),(213,'Concepción',1,'2025-06-25 00:28:36'),(214,'Coronel',1,'2025-06-25 00:28:36'),(215,'Chiguayante',1,'2025-06-25 00:28:36'),(216,'Florida',1,'2025-06-25 00:28:36'),(217,'Hualqui',1,'2025-06-25 00:28:36'),(218,'Lota',1,'2025-06-25 00:28:36'),(219,'Penco',1,'2025-06-25 00:28:36'),(220,'San Pedro de la Paz',1,'2025-06-25 00:28:36'),(221,'Santa Juana',1,'2025-06-25 00:28:36'),(222,'Talcahuano',1,'2025-06-25 00:28:36'),(223,'Tomé',1,'2025-06-25 00:28:36'),(224,'Hualpén',1,'2025-06-25 00:28:36'),(225,'Lebu',1,'2025-06-25 00:28:36'),(226,'Arauco',1,'2025-06-25 00:28:36'),(227,'Cañete',1,'2025-06-25 00:28:36'),(228,'Contulmo',1,'2025-06-25 00:28:36'),(229,'Curanilahue',1,'2025-06-25 00:28:36'),(230,'Los Álamos',1,'2025-06-25 00:28:36'),(231,'Tirúa',1,'2025-06-25 00:28:36'),(232,'Los Ángeles',1,'2025-06-25 00:28:36'),(233,'Antuco',1,'2025-06-25 00:28:36'),(234,'Cabrero',1,'2025-06-25 00:28:36'),(235,'Laja',1,'2025-06-25 00:28:36'),(236,'Mulchén',1,'2025-06-25 00:28:36'),(237,'Nacimiento',1,'2025-06-25 00:28:36'),(238,'Negrete',1,'2025-06-25 00:28:36'),(239,'Quilaco',1,'2025-06-25 00:28:36'),(240,'Quilleco',1,'2025-06-25 00:28:36'),(241,'San Rosendo',1,'2025-06-25 00:28:36'),(242,'Santa Bárbara',1,'2025-06-25 00:28:36'),(243,'Tucapel',1,'2025-06-25 00:28:36'),(244,'Yumbel',1,'2025-06-25 00:28:36'),(245,'Alto Biobío',1,'2025-06-25 00:28:36'),(246,'Temuco',1,'2025-06-25 00:28:36'),(247,'Carahue',1,'2025-06-25 00:28:36'),(248,'Cunco',1,'2025-06-25 00:28:36'),(249,'Curarrehue',1,'2025-06-25 00:28:36'),(250,'Freire',1,'2025-06-25 00:28:36'),(251,'Galvarino',1,'2025-06-25 00:28:36'),(252,'Gorbea',1,'2025-06-25 00:28:36'),(253,'Lautaro',1,'2025-06-25 00:28:36'),(254,'Loncoche',1,'2025-06-25 00:28:36'),(255,'Melipeuco',1,'2025-06-25 00:28:36'),(256,'Nueva Imperial',1,'2025-06-25 00:28:36'),(257,'Padre Las Casas',1,'2025-06-25 00:28:36'),(258,'Perquenco',1,'2025-06-25 00:28:36'),(259,'Pitrufquén',1,'2025-06-25 00:28:36'),(260,'Pucón',1,'2025-06-25 00:28:36'),(261,'Saavedra',1,'2025-06-25 00:28:36'),(262,'Teodoro Schmidt',1,'2025-06-25 00:28:36'),(263,'Toltén',1,'2025-06-25 00:28:36'),(264,'Vilcún',1,'2025-06-25 00:28:36'),(265,'Villarrica',1,'2025-06-25 00:28:36'),(266,'Cholchol',1,'2025-06-25 00:28:36'),(267,'Angol',1,'2025-06-25 00:28:36'),(268,'Collipulli',1,'2025-06-25 00:28:36'),(269,'Curacautín',1,'2025-06-25 00:28:36'),(270,'Ercilla',1,'2025-06-25 00:28:36'),(271,'Lonquimay',1,'2025-06-25 00:28:36'),(272,'Los Sauces',1,'2025-06-25 00:28:36'),(273,'Lumaco',1,'2025-06-25 00:28:36'),(274,'Purén',1,'2025-06-25 00:28:36'),(275,'Renaico',1,'2025-06-25 00:28:36'),(276,'Traiguén',1,'2025-06-25 00:28:36'),(277,'Victoria',1,'2025-06-25 00:28:36'),(278,'Valdivia',1,'2025-06-25 00:28:36'),(279,'Corral',1,'2025-06-25 00:28:36'),(280,'Lanco',1,'2025-06-25 00:28:36'),(281,'Los Lagos',1,'2025-06-25 00:28:36'),(282,'Máfil',1,'2025-06-25 00:28:36'),(283,'Mariquina',1,'2025-06-25 00:28:36'),(284,'Paillaco',1,'2025-06-25 00:28:36'),(285,'Panguipulli',1,'2025-06-25 00:28:36'),(286,'La Unión',1,'2025-06-25 00:28:36'),(287,'Futrono',1,'2025-06-25 00:28:36'),(288,'Lago Ranco',1,'2025-06-25 00:28:36'),(289,'Río Bueno',1,'2025-06-25 00:28:36'),(290,'Puerto Montt',1,'2025-06-25 00:28:36'),(291,'Calbuco',1,'2025-06-25 00:28:36'),(292,'Cochamó',1,'2025-06-25 00:28:36'),(293,'Fresia',1,'2025-06-25 00:28:36'),(294,'Frutillar',1,'2025-06-25 00:28:36'),(295,'Los Muermos',1,'2025-06-25 00:28:36'),(296,'Llanquihue',1,'2025-06-25 00:28:36'),(297,'Maullín',1,'2025-06-25 00:28:36'),(298,'Puerto Varas',1,'2025-06-25 00:28:36'),(299,'Castro',1,'2025-06-25 00:28:36'),(300,'Ancud',1,'2025-06-25 00:28:36'),(301,'Chonchi',1,'2025-06-25 00:28:36'),(302,'Curaco de Vélez',1,'2025-06-25 00:28:36'),(303,'Dalcahue',1,'2025-06-25 00:28:36'),(304,'Puqueldón',1,'2025-06-25 00:28:36'),(305,'Queilén',1,'2025-06-25 00:28:36'),(306,'Quellón',1,'2025-06-25 00:28:36'),(307,'Quemchi',1,'2025-06-25 00:28:36'),(308,'Quinchao',1,'2025-06-25 00:28:36'),(309,'Osorno',1,'2025-06-25 00:28:36'),(310,'Puerto Octay',1,'2025-06-25 00:28:36'),(311,'Purranque',1,'2025-06-25 00:28:36'),(312,'Puyehue',1,'2025-06-25 00:28:36'),(313,'Río Negro',1,'2025-06-25 00:28:36'),(314,'San Juan de la Costa',1,'2025-06-25 00:28:36'),(315,'San Pablo',1,'2025-06-25 00:28:36'),(316,'Chaitén',1,'2025-06-25 00:28:36'),(317,'Futaleufú',1,'2025-06-25 00:28:36'),(318,'Hualaihué',1,'2025-06-25 00:28:36'),(319,'Palena',1,'2025-06-25 00:28:36'),(320,'Coyhaique',1,'2025-06-25 00:28:36'),(321,'Lago Verde',1,'2025-06-25 00:28:36'),(322,'Aysén',1,'2025-06-25 00:28:36'),(323,'Cisnes',1,'2025-06-25 00:28:36'),(324,'Guaitecas',1,'2025-06-25 00:28:36'),(325,'Cochrane',1,'2025-06-25 00:28:36'),(326,'O’Higgins',1,'2025-06-25 00:28:36'),(327,'Tortel',1,'2025-06-25 00:28:36'),(328,'Chile Chico',1,'2025-06-25 00:28:36'),(329,'Río Ibáñez',1,'2025-06-25 00:28:36'),(330,'Punta Arenas',1,'2025-06-25 00:28:36'),(331,'Laguna Blanca',1,'2025-06-25 00:28:36'),(332,'Río Verde',1,'2025-06-25 00:28:36'),(333,'San Gregorio',1,'2025-06-25 00:28:36'),(334,'Cabo de Hornos',1,'2025-06-25 00:28:36'),(335,'Antártica',1,'2025-06-25 00:28:36'),(336,'Porvenir',1,'2025-06-25 00:28:36'),(337,'Primavera',1,'2025-06-25 00:28:36'),(338,'Timaukel',1,'2025-06-25 00:28:36'),(339,'Natales',1,'2025-06-25 00:28:36'),(340,'Torres del Paine',1,'2025-06-25 00:28:36');

--
-- Table structure for table `flow_orders`
--

CREATE TABLE `flow_orders` (
  `id` int NOT NULL AUTO_INCREMENT,
  `url` varchar(100) COLLATE utf8mb4_general_ci NOT NULL,
  `token` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `flow_order` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `reservation_id` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `flow_orders`
--

INSERT INTO `flow_orders` VALUES (1,'https://sandbox.flow.cl/app/web/pay.php','E5FEFBDA8F9599260E77F7EEEE1FB89DB3E8D2DT','4633561',86),(2,'https://sandbox.flow.cl/app/web/pay.php','A6FF8D4D847C05CA1F04BF214FC07A65FA76778Y','4646044',87),(3,'https://sandbox.flow.cl/app/web/pay.php','A1EC2444E674BDBC05A6689F79BE9763B32D4D9W','4753720',100),(4,'https://sandbox.flow.cl/app/web/pay.php','24AC3FFFBFD8E297A5F3F6A302375767BF0893AT','4753721',101);

--
-- Table structure for table `local_tags`
--

CREATE TABLE `local_tags` (
  `local_id` int NOT NULL,
  `tags` varchar(255) COLLATE utf8mb4_general_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `local_tags`
--

INSERT INTO `local_tags` VALUES (16,'Peluquería,Spa'),(17,'Peluquería');

--
-- Table structure for table `locals`
--

CREATE TABLE `locals` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) COLLATE utf8mb4_general_ci NOT NULL,
  `address` varchar(100) COLLATE utf8mb4_general_ci NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `phone` varchar(12) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `email` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `location` point DEFAULT NULL,
  `image_path` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `commune_id` int NOT NULL,
  `owner_id` int NOT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `owner_id` (`owner_id`),
  KEY `commune_id` (`commune_id`),
  CONSTRAINT `locals_ibfk_1` FOREIGN KEY (`owner_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `locals_ibfk_2` FOREIGN KEY (`commune_id`) REFERENCES `communes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `locals`
--

INSERT INTO `locals` VALUES (16,'Maldito Look Sucursal Maipú','SN','Peluquería Maldito Look.','+56959374730','',0x000000000101000000E73A8DB4545E43C0E0BC38F1D52652C0,NULL,115,19,'2025-09-27 20:46:49'),(17,'Maldito Look Sucursal Ñuñoa','ñuñoa 123','sucursal ñuñoa','+56959374730','example@example.com',0x000000000101000000E73A8DB4545E43C0E0BC38F1D52652C0,NULL,116,19,'2025-11-22 19:32:14');

--
-- Table structure for table `professional_specialties`
--

CREATE TABLE `professional_specialties` (
  `professional_id` int NOT NULL,
  `specialty_id` int NOT NULL,
  KEY `professional_id` (`professional_id`),
  KEY `specialty_id` (`specialty_id`),
  CONSTRAINT `professional_specialties_ibfk_1` FOREIGN KEY (`professional_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `professional_specialties_ibfk_2` FOREIGN KEY (`specialty_id`) REFERENCES `specialties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `professional_specialties`
--


--
-- Table structure for table `reservation_services`
--

CREATE TABLE `reservation_services` (
  `id` int NOT NULL AUTO_INCREMENT,
  `id_reservation` int NOT NULL,
  `id_service` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id_reservation` (`id_reservation`),
  KEY `id_service` (`id_service`),
  CONSTRAINT `reservation_services_ibfk_1` FOREIGN KEY (`id_reservation`) REFERENCES `reservations` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `reservation_services_ibfk_2` FOREIGN KEY (`id_service`) REFERENCES `services` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `reservation_services`
--


--
-- Table structure for table `reservation_states`
--

CREATE TABLE `reservation_states` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(20) COLLATE utf8mb4_general_ci NOT NULL,
  `description` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `reservation_states`
--

INSERT INTO `reservation_states` VALUES (1,'Creada','Reserva creada'),(2,'Confirmada Sin Pagar',''),(3,'Confirmada Pagada',''),(100,'blocked','Horas Bloqueadas');

--
-- Table structure for table `reservations`
--

CREATE TABLE `reservations` (
  `id` int NOT NULL AUTO_INCREMENT,
  `start_date` datetime NOT NULL,
  `end_date` datetime NOT NULL,
  `duration` int NOT NULL,
  `state_id` int NOT NULL,
  `local_id` int NOT NULL,
  `notes` varchar(100) COLLATE utf8mb4_general_ci NOT NULL,
  `assigned_to` int NOT NULL,
  `customer_name` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `customer_email` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `customer_phone` varchar(15) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `payment_method` varchar(10) COLLATE utf8mb4_general_ci NOT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT NULL,
  `owner_id` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `local_id` (`local_id`),
  KEY `status_id` (`state_id`),
  CONSTRAINT `reservations_ibfk_1` FOREIGN KEY (`local_id`) REFERENCES `locals` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `reservations_ibfk_2` FOREIGN KEY (`state_id`) REFERENCES `reservation_states` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `reservations`
--

INSERT INTO `reservations` VALUES (57,'2025-09-28 09:30:00','2025-09-28 10:30:00',30,3,16,'a',23,'a','a','a','','2025-09-28 10:50:31',NULL,19),(61,'2025-09-28 08:00:00','2025-09-28 12:00:00',0,2,16,'test',31,'test','test','test','','2025-09-28 11:16:33',NULL,19),(65,'2025-09-28 09:00:00','2025-09-28 12:00:00',0,100,16,'otro motivo',21,'Bloqueo','','','','2025-09-28 11:55:37',NULL,19),(69,'2025-11-23 14:30:00','2025-11-23 15:30:00',60,1,16,'corte moderno',23,'manuel palma','manueleduardopalmamora60@gmail.com','+56959374730','cash','2025-11-22 00:16:55',NULL,19),(70,'2025-11-23 13:30:00','2025-11-23 14:30:00',60,1,16,'sin comentarios',24,'manuel','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-11-22 11:23:12',NULL,19),(71,'2025-11-23 13:30:00','2025-11-23 15:00:00',90,1,16,'sin comentarios',24,'manuel palma','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-11-22 11:24:20',NULL,19),(72,'2025-11-23 13:30:00','2025-11-23 15:00:00',90,1,16,'sin comentarios',24,'manuel palma','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-11-22 11:25:50',NULL,19),(73,'2025-11-23 13:30:00','2025-11-23 15:00:00',90,1,16,'sin comentarios',24,'manuel palma','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-11-22 11:26:18',NULL,19),(74,'2025-11-23 13:30:00','2025-11-23 15:00:00',90,1,16,'sin comentarios',24,'manuel palma','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-11-22 11:29:37',NULL,19),(75,'2025-11-23 13:30:00','2025-11-23 15:00:00',90,1,16,'sin comentarios',24,'manuel palma','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-11-22 11:30:05',NULL,19),(76,'2025-11-23 13:30:00','2025-11-23 15:00:00',90,1,16,'sin comentarios',24,'manuel palma','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-11-22 11:31:57',NULL,19),(77,'2025-11-23 13:30:00','2025-11-23 15:00:00',90,1,16,'sin comentarios',24,'manuel palma','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-11-22 11:36:26',NULL,19),(78,'2025-11-23 13:30:00','2025-11-23 15:00:00',90,1,16,'sin comentarios',24,'manuel palma','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-11-22 11:39:10',NULL,19),(79,'2025-11-23 13:30:00','2025-11-23 15:00:00',90,1,16,'sin comentarios',24,'manuel palma','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-11-22 11:44:22',NULL,19),(80,'2025-11-23 13:30:00','2025-11-23 15:00:00',90,1,16,'sin comentarios',24,'manuel palma','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-11-22 11:45:10',NULL,19),(81,'2025-11-23 13:30:00','2025-11-23 15:00:00',90,1,16,'sin comentarios',24,'manuel palma','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-11-22 11:48:28',NULL,19),(82,'2025-11-23 13:30:00','2025-11-23 15:00:00',90,1,16,'sin comentarios',24,'manuel palma','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-11-22 11:48:47',NULL,19),(83,'2025-11-23 13:30:00','2025-11-23 15:00:00',90,1,16,'sin comentarios',24,'manuel palma','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-11-22 11:49:50',NULL,19),(84,'2025-11-23 13:30:00','2025-11-23 15:00:00',90,1,16,'sin comentarios',24,'manuel palma','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-11-22 11:58:35',NULL,19),(85,'2025-11-26 10:00:00','2025-11-26 10:30:00',30,1,16,'test',0,'manuel palma','manuel.mlpalma50@gmail.com','+5688999999','flow','2025-11-22 17:05:45',NULL,19),(86,'2025-11-26 10:00:00','2025-11-26 10:30:00',30,3,16,'test',24,'manuel palma','manuel.mlpalma50@gmail.com','+5688999999','flow','2025-11-22 17:10:38',NULL,19),(87,'2025-11-25 12:00:00','2025-11-25 13:00:00',60,3,16,'nada',27,'manuel palma','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-11-23 19:14:25',NULL,19),(88,'2025-11-25 10:30:00','2025-11-25 11:30:00',60,1,16,'no tan corto',30,'manuel palma mora','manueleduardopalmamora60@gmail.com','+56959374730','cash','2025-11-23 19:22:29',NULL,19),(89,'2025-11-25 10:30:00','2025-11-25 11:30:00',60,1,16,'no tan corto',22,'manuel palma mora','manueleduardopalmamora60@gmail.com','+56959374730','cash','2025-11-23 19:25:46',NULL,19),(90,'2025-11-25 10:30:00','2025-11-25 11:30:00',60,1,16,'no tan corto',21,'manuel palma mora','manueleduardopalmamora60@gmail.com','+56959374730','cash','2025-11-23 19:32:28',NULL,19),(91,'2025-11-25 10:00:00','2025-11-25 11:00:00',60,1,16,'Sin comentarios ',31,'Manuel Palma','manueleduardopalmamora60@gmail.com','+56959374730','cash','2025-11-24 08:44:11',NULL,19),(92,'2025-12-02 09:00:00','2025-12-02 10:30:00',30,100,16,'trabajo',21,'Bloqueo','','','cash','2025-12-02 17:55:36',NULL,19),(93,'2025-12-06 11:30:00','2025-12-06 12:00:00',30,1,16,'test',22,'juan perez','manuel.mlpalma50@gmail.com','+56998387684','flow','2025-12-02 18:54:16',NULL,19),(94,'2025-12-03 12:30:00','2025-12-03 12:45:00',15,1,16,'s',21,'Manuel Eduardo Palma Mora','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-12-02 18:54:47',NULL,19),(95,'2025-12-03 12:30:00','2025-12-03 12:45:00',15,1,16,'ascs',21,'Manuel Eduardo Palma Mora','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-12-02 18:57:36',NULL,19),(96,'2025-12-03 12:30:00','2025-12-03 12:45:00',15,1,16,'ascs',21,'Manuel Eduardo Palma Mora','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-12-02 18:57:43',NULL,19),(97,'2025-12-03 12:30:00','2025-12-03 12:45:00',15,1,16,'ascs',21,'Manuel Eduardo Palma Mora','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-12-02 18:58:39',NULL,19),(98,'2025-12-03 12:30:00','2025-12-03 12:45:00',15,1,16,'ascs',21,'Manuel Eduardo Palma Mora','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-12-02 18:59:58',NULL,19),(99,'2025-12-03 12:30:00','2025-12-03 12:45:00',15,1,16,'ascs',21,'Manuel Eduardo Palma Mora','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-12-02 19:01:54',NULL,19),(100,'2025-12-03 12:30:00','2025-12-03 12:45:00',15,1,16,'ss',21,'Manuel Eduardo Palma Mora','manueleduardopalmamora60@gmail.com','+56959374730','flow','2025-12-02 19:04:46',NULL,19),(101,'2025-12-06 11:30:00','2025-12-06 12:00:00',30,3,16,'test',22,'juan perez','manuel.mlpalma50@gmail.com','+56998387684','flow','2025-12-02 19:05:04',NULL,19);

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(15) COLLATE utf8mb4_general_ci NOT NULL,
  `description` varchar(20) COLLATE utf8mb4_general_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `owner_id` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `roles`
--

INSERT INTO `roles` VALUES (1,'admin','admin','2025-09-25 23:17:58',1),(2,'customer','customer','2025-09-26 22:11:33',1),(3,'professional','professional','2025-09-27 20:35:43',1);

--
-- Table structure for table `services`
--

CREATE TABLE `services` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `duration` int NOT NULL,
  `local_id` int NOT NULL,
  `specialty_id` int NOT NULL,
  `owner_id` int NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `local_id` (`local_id`),
  KEY `owner_id` (`owner_id`),
  KEY `specialty_id` (`specialty_id`),
  CONSTRAINT `services_ibfk_1` FOREIGN KEY (`local_id`) REFERENCES `locals` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `services_ibfk_2` FOREIGN KEY (`specialty_id`) REFERENCES `specialties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `services_ibfk_3` FOREIGN KEY (`owner_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `services`
--

INSERT INTO `services` VALUES (13,'Corte de pelo','Corte de pelo básico',6000.00,30,16,4,19,'2025-09-28 00:31:04','2025-09-28 00:31:04'),(14,'Corte de pelo clásico o moderno','Puedes elegir entre un corte de pelo clásico o moderno con tijeras, navajas o máquina. Este servicio incluye lavado de cabello y aplicación de productos de alta calidad.',5000.00,60,16,4,19,'2025-09-28 02:46:39','2025-09-28 02:46:39'),(15,'Alisado','Alisado con plancha',5000.00,60,16,4,19,'2025-09-28 02:56:18','2025-09-28 02:56:18'),(16,'Perfilado de barba','Ritual de barba con tijera y navaja. Aplicación de toalla caliente más aceite preshave, gel de afeitado y bálsamo postshave. Limpieza facial con gel.',18990.00,60,16,6,19,'2025-09-28 02:59:00','2025-09-28 02:59:00'),(17,'Perfilado de barba Premium','Ritual de barba con toalla caliente, aceite pre-shave, gel de afeitado y post-shave balm. Masaje cráneo facial, limpieza/tratamiento antiedad y mascarilla.',28990.00,120,16,6,19,'2025-09-28 03:02:40','2025-09-28 03:02:40'),(18,'Baño de parafina','Baño de parafina para hidratar.',5000.00,15,16,5,19,'2025-09-28 03:04:59','2025-09-28 03:04:59'),(19,'Manos permanentes','Espectacular...',18000.00,45,16,5,19,'2025-09-28 03:06:42','2025-09-28 03:06:42'),(20,'Balayage','Iluminación en degradé',129000.00,180,16,4,19,'2025-09-28 03:08:13','2025-09-28 03:08:13');

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

CREATE TABLE `settings` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `value` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `local_id` int NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `local_id` (`local_id`),
  CONSTRAINT `settings_ibfk_1` FOREIGN KEY (`local_id`) REFERENCES `locals` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `settings` VALUES (12,'flow_enabled','true',16,'2025-09-27 23:46:49'),(13,'flow_api','https://sandbox.flow.cl/',16,'2025-09-27 23:46:49'),(14,'flow_api_key','36CF74A2-08C8-4A4E-A8F5-47C0L0422F16',16,'2025-09-27 23:46:49'),(15,'cash_enabled','true',16,'2025-11-22 02:14:59'),(16,'flow_secret_key','225ddf5545df72d74cfb9930a481caa2056957c1',16,'2025-11-22 14:09:39'),(17,'flow_enabled','true',17,'2025-11-22 22:32:14'),(18,'flow_api','https://sandbox.flow.cl/',17,'2025-11-22 22:32:14'),(19,'flow_api_key','https://sandbox.flow.cl/',17,'2025-11-22 22:32:14'),(20,'flow_secret_key','https://sandbox.flow.cl/',17,'2025-11-22 22:32:14'),(21,'cash_enabled','true',17,'2025-11-22 22:32:14');

--
-- Table structure for table `specialties`
--

CREATE TABLE `specialties` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
  `description` varchar(100) COLLATE utf8mb4_general_ci NOT NULL,
  `local_id` int NOT NULL,
  `owner_id` int NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `local_id` (`local_id`),
  KEY `owner_id` (`owner_id`),
  CONSTRAINT `specialties_ibfk_1` FOREIGN KEY (`local_id`) REFERENCES `locals` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `specialties_ibfk_2` FOREIGN KEY (`owner_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `specialties`
--

INSERT INTO `specialties` VALUES (4,'Peluquería','peluquería...',16,19,'2025-09-28 00:25:44'),(5,'Manicure','manicure y más...',16,19,'2025-09-28 01:52:59'),(6,'Barbería','barbería...',16,19,'2025-09-28 02:58:18');

--
-- Table structure for table `tags`
--

CREATE TABLE `tags` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) COLLATE utf8mb4_general_ci NOT NULL,
  `active` tinyint NOT NULL DEFAULT '1',
  `deleted` tinyint NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `tags`
--

INSERT INTO `tags` VALUES (1,'Peluquería',1,0,'2025-11-22 21:54:39'),(2,'Barbería',1,0,'2025-11-22 21:56:30'),(3,'Spa',1,0,'2025-11-22 21:57:04'),(4,'Manicuría',1,0,'2025-11-22 21:57:11'),(5,'NailArt',1,0,'2025-11-22 21:57:28'),(6,'Depilación',1,0,'2025-11-22 21:57:34'),(7,'SalónDeBelleza',1,0,'2025-11-22 21:57:50');

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

CREATE TABLE `users` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
  `email` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
  `role_id` int NOT NULL,
  `local_id` int DEFAULT NULL,
  `password` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `image` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `active` tinyint(1) DEFAULT '1',
  `deleted` tinyint(1) DEFAULT '0',
  `owner_id` int DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`),
  KEY `local_id` (`local_id`),
  KEY `role_id` (`role_id`),
  CONSTRAINT `users_ibfk_1` FOREIGN KEY (`local_id`) REFERENCES `locals` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `users_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES (1,'Administrador','admin@admin.com',1,NULL,'$2y$10$JG57z4raEU1Ib/sz0uzW7.0we6G9ia0GS2cc1XS/.5NWM.cotHI7W',NULL,1,0,0,'2025-06-21 22:56:03'),(13,'Manuel Palma','manuel.mlpalma50@gmail.com',2,NULL,'$2y$10$7GuRKRNjrUrrF04HuFFwVeurR.8144rB772iOeQoEwLgVNuk/ChZq',NULL,1,0,1,'2025-09-27 17:41:19'),(19,'Alejandro Salgado','alemash69@gmail.com',2,NULL,'$2y$10$GQ8HJ7D/n7E8ThGgDkdVDeECF3WZe8g69U59yjH4kMCnM8MDTp9LG',NULL,1,0,1,'2025-09-27 20:35:07'),(21,'Bett','mpalma@liceopullinque.cl',3,16,'$2y$10$oj1OrH3TnplCzK8vshLlDOXe4BfPGoJkVI5rTFlU0tAeZQ1Cr43kS','bett_1759023140.jpeg',1,0,19,'2025-09-27 22:32:20'),(22,'Ester','ester@malditolook.cl',3,16,'$2y$10$KR9x..m4cyJbdqEMCyv4BeodVhHs8dd8LNbplRy0hkC6W23hiJsVC','ester_1759024625.jpeg',1,0,19,'2025-09-27 22:57:05'),(23,'Ale','ale@malditolook.cl',3,16,'$2y$10$3AP.0m5M/wJ05NsS85d7Lenjiy3UiiUgmXIpe16k6S1sOJuCglnyO','ale_1759024666.jpeg',1,0,19,'2025-09-27 22:57:46'),(24,'Aldo','aldo@malditolook.cl',3,16,'$2y$10$e5W8c2280K9rkTAT8gxtMuyNbK05bYq5wHmlf3alA2CjDqWbahZVK','aldo_1759024712.jpeg',1,0,19,'2025-09-27 22:58:32'),(25,'Pedro','pedro@malditolook.cl',3,16,'$2y$10$P8rn9E/gMEp2t4Vj.baYKuImB6IKBsgq6A02S24rkqPJCykYqy4CC','pedro_1759024753.jpeg',1,0,19,'2025-09-27 22:59:13'),(26,'Charlotte','charlotte@malditolook.cl',3,16,'$2y$10$tNCDUPZaZwPEYK7U9jyQYudb5DS75JscbmqfUUkUV4usnRNU0dmhS','charlotte_1759024805.jpeg',1,0,19,'2025-09-27 23:00:05'),(27,'Lizz','lizz@malditolook.cl',3,16,'$2y$10$7EjYWoJ4fKjk1hoJ1mDeUOYxdvkBRvjkHQ57m5qE.uTTb2zuVZcEO','lizz_1759024867.jpeg',1,0,19,'2025-09-27 23:01:07'),(28,'Mónica','monica@malditolook.cl',3,16,'$2y$10$pf0nOiGuvcwCDhvnFCeOMuNdGiJWC6xyz2TDCNm3bLQbAFx6nFzqm','monica_1759024899.jpeg',1,0,19,'2025-09-27 23:01:39'),(29,'Fran','fran@malditolook.cl',3,16,'$2y$10$WOdk2FF9b4KKHs3oPIZxX.BYD5melvvh3sb7mMf6XYfjlcYSMGw7e','fran_1759024939.jpeg',1,0,19,'2025-09-27 23:02:19'),(30,'Rodrigo','rodrigo@malditolook.cl',3,16,'$2y$10$IHDqvqnVz6oDSAb7xM4MpeIXuNEiS8hCEHtkRMDYy2IGnPAJk0EuC','rodrigo_1759024967.jpeg',1,0,19,'2025-09-27 23:02:47'),(31,'Alonso','alonso@malditolook.cl',3,16,'$2y$10$/5SG.b3gyNfIVxYd3OMu1.HRCwf9V9S1NJqFZQ.yGT0KGn6Y88nMG','alonso_1759025007.jpeg',1,0,19,'2025-09-27 23:03:27'),(32,'Eduardo Palma','palmamora001@gmail.com',2,NULL,'$2y$10$z2koG5NcrN78nn9qi7qBoO8Wlziw5eUDp5q0GiEEBcBIykDjRYAE6',NULL,1,1,1,'2025-11-21 22:58:56');


