-- MySQL dump 10.13  Distrib 8.0.36, for Linux (x86_64)
--
-- Host: localhost    Database: api_rutas
-- ------------------------------------------------------
-- Server version	8.0.36-0ubuntu0.20.04.1

/*!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 */;

--
-- Table structure for table `colores_unidades`
--

DROP TABLE IF EXISTS `colores_unidades`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `colores_unidades` (
  `id` int NOT NULL AUTO_INCREMENT,
  `descripcion` varchar(128) NOT NULL,
  `filtros` varchar(256) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `colores_unidades`
--

LOCK TABLES `colores_unidades` WRITE;
/*!40000 ALTER TABLE `colores_unidades` DISABLE KEYS */;
INSERT INTO `colores_unidades` VALUES (1,'Azul','hue-rotate(200deg)'),(2,'Verde','hue-rotate(90deg)'),(3,'Marrón','hue-rotate(45deg)'),(4,'Cyan','hue-rotate(180deg)'),(5,'Violeta','hue-rotate(270deg)'),(6,'Rosa','hue-rotate(315deg)'),(7,'Gris','saturate(0%)'),(8,'Blanco','saturate(0%) brightness(400%)'),(9,'Negro','saturate(0%) brightness(20%)'),(10,'Rojo','');
/*!40000 ALTER TABLE `colores_unidades` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `mensajes_coordinadores_unidades`
--

DROP TABLE IF EXISTS `mensajes_coordinadores_unidades`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mensajes_coordinadores_unidades` (
  `id` int NOT NULL AUTO_INCREMENT,
  `coordinador` int NOT NULL,
  `unidad` int NOT NULL,
  `mensaje` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `mensajes_coordinadores_unidades`
--

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

--
-- Table structure for table `orden_directa_traslado`
--

DROP TABLE IF EXISTS `orden_directa_traslado`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `orden_directa_traslado` (
  `id` int NOT NULL AUTO_INCREMENT,
  `unidad` int NOT NULL,
  `latitud` varchar(32) NOT NULL,
  `longitud` varchar(32) NOT NULL,
  `coordinador` int NOT NULL,
  `indicacion` text NOT NULL,
  `creador` int NOT NULL,
  `activa` tinyint(1) NOT NULL,
  `id_google_route` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=91 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `orden_directa_traslado`
--

LOCK TABLES `orden_directa_traslado` WRITE;
/*!40000 ALTER TABLE `orden_directa_traslado` DISABLE KEYS */;
INSERT INTO `orden_directa_traslado` VALUES (1,45,'20.697681689891443','-103.42103396979981',0,'Hola mundo!',1,0,0),(2,45,'20.65704898811442','-103.43665515510254',0,'Necesito que te muevas ahí ya!',1,0,0),(3,45,'20.693373337057697','-103.29640781013184',0,'Mecánico',1,0,0),(4,15,'20.696815688998498','-103.36474436872659',0,'Mecánico',1,0,0),(5,45,'20.697360525420514','-103.36816226569825',0,'Mecánico',1,0,0),(6,45,'20.682512204142398','-103.30128240104403',0,'Prueba de orden de traslado',1,0,0),(7,45,'20.66081710894569','-103.3442455804939',0,'Mecánico',1,0,0),(8,45,'20.66684680037153','-103.38996326057129',0,'Mover aquí',1,0,0),(9,45,'20.67905302653361','-103.3818951758545',0,'Prueba 2',1,0,0),(10,45,'20.65656711219535','-103.35889255134278',0,'Prueba de orden de traslado directo',1,0,0),(11,45,'20.68483458061185','-103.32885181037598',0,'Hola',1,0,0),(12,45,'20.68459368692254','-103.32524692145996',0,'Prueba',1,0,0),(13,45,'20.669818143141885','-103.31546222297364',0,'Prueba',1,0,0),(14,45,'20.674797019621234','-103.30378924934082',0,'Test',1,0,0),(15,45,'20.67929392901716','-103.28370486823731',0,'Prueba',1,0,0),(16,45,'20.691499154359697','-103.32250033942871',0,'Prueba',1,0,0),(17,45,'20.687228991805373','-103.3733879721516',0,'Taller',1,0,0),(18,46,'20.717913679972387','-103.38326846687012',0,'Ve aquí',0,0,0),(19,45,'20.694278976680682','-103.3943344748898',0,'Ve aquí',0,0,0),(20,45,'20.717221375022586','-103.38264524628633',0,'¡Ve aquí!',0,0,0),(21,45,'20.697299058438535','-103.38309971593269',0,'Prueba',0,0,0),(22,45,'20.73380834834397','-103.39657222358399',0,'Prueba',0,0,0),(23,45,'20.683710406790105','-103.33357249824219',0,'asdasd',0,0,0),(24,45,'20.669095389439807','-103.37202464667969',0,'T',0,0,0),(25,45,'20.669095389439807','-103.37202464667969',0,'T',0,0,0),(26,45,'20.669095389439807','-103.37202464667969',0,'T',0,0,0),(27,45,'20.669095389439807','-103.37202464667969',0,'T',0,0,0),(28,45,'20.669095389439807','-103.37202464667969',0,'T',55,0,0),(29,45,'20.669095389439807','-103.37202464667969',0,'T',55,0,0),(30,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(31,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(32,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(33,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(34,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(35,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(36,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(37,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(38,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(39,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(40,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(41,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(42,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(43,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(44,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(45,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(46,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(47,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(48,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(49,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(50,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(51,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(52,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(53,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(54,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(55,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(56,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(57,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(58,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(59,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(60,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(61,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(62,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(63,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(64,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(65,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(66,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(67,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(68,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(69,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(70,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(71,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(72,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(73,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(74,45,'20.674797019621234','-103.35194026557618',0,'T',55,0,0),(75,45,'20.703141381823883','-103.41064845649414',0,'Ve aquí',55,0,0),(76,45,'20.707316307700417','-103.40704356757813',0,'Ve aquí',55,0,0),(77,45,'20.70009484640126','-103.37998352349166',0,'kjhkjh',55,0,0),(78,45,'20.70009484640126','-103.37998352349166',0,'kjhkjh',55,0,0),(79,45,'20.70009484640126','-103.37998352349166',0,'kjhkjh',55,0,0),(80,45,'20.688380158901598','-103.35803424445801',0,'Prueba',55,0,0),(81,45,'20.67808941277624','-103.33125506965332',0,'',55,0,0),(82,45,'20.697360525420514','-103.38309680549317',0,'',55,0,22),(83,45,'20.62524190146054','-103.30181514350586',0,'asdasd',55,0,23),(84,45,'20.706513446269618','-103.35657512275391',0,'Prueba',55,0,24),(85,45,'20.706513446269618','-103.35657512275391',0,'Prueba',55,0,24),(86,45,'20.706513446269618','-103.35657512275391',0,'Prueba',55,0,24),(87,45,'20.657027365173338','-103.35168277351075',0,'',55,0,25),(88,45,'20.703301958022177','-103.33691989509278',0,'Ve al acuario',55,0,26),(89,45,'20.63745146871119','-103.34824954597168',0,'Recarga combustible aquí',55,0,27),(90,45,'20.712279383281903','-103.39695315985895',0,'Ve aquí',55,0,28);
/*!40000 ALTER TABLE `orden_directa_traslado` ENABLE KEYS */;
UNLOCK TABLES;

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

DROP TABLE IF EXISTS `roles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `roles` (
  `id` int NOT NULL AUTO_INCREMENT,
  `descripcion` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

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

LOCK TABLES `roles` WRITE;
/*!40000 ALTER TABLE `roles` DISABLE KEYS */;
INSERT INTO `roles` VALUES (-1,'Administrador General'),(1,'Administrador de Empresa'),(2,'Coordinador'),(3,'Conductor'),(4,'Usuario');
/*!40000 ALTER TABLE `roles` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `tipos_combustible`
--

DROP TABLE IF EXISTS `tipos_combustible`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tipos_combustible` (
  `id` int NOT NULL AUTO_INCREMENT,
  `descripcion` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `tipos_combustible`
--

LOCK TABLES `tipos_combustible` WRITE;
/*!40000 ALTER TABLE `tipos_combustible` DISABLE KEYS */;
INSERT INTO `tipos_combustible` VALUES (1,'Gasolina'),(2,'Diesel'),(3,'Gas Natural');
/*!40000 ALTER TABLE `tipos_combustible` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `tipos_estatus_unidad`
--

DROP TABLE IF EXISTS `tipos_estatus_unidad`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tipos_estatus_unidad` (
  `id` int NOT NULL AUTO_INCREMENT,
  `descripcion` varchar(128) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `tipos_estatus_unidad`
--

LOCK TABLES `tipos_estatus_unidad` WRITE;
/*!40000 ALTER TABLE `tipos_estatus_unidad` DISABLE KEYS */;
INSERT INTO `tipos_estatus_unidad` VALUES (1,'Normal'),(2,'Retrasado'),(3,'Averiado'),(4,'Retrasado y averiado');
/*!40000 ALTER TABLE `tipos_estatus_unidad` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `tipos_puntos`
--

DROP TABLE IF EXISTS `tipos_puntos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tipos_puntos` (
  `id` int NOT NULL AUTO_INCREMENT,
  `clave` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `descripcion` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `accion` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `svg_icono` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `fecha_creacion` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `tipos_puntos`
--

LOCK TABLES `tipos_puntos` WRITE;
/*!40000 ALTER TABLE `tipos_puntos` DISABLE KEYS */;
INSERT INTO `tipos_puntos` VALUES (1,'','Base','','','2020-11-20 16:52:18'),(2,'','Carga de Combustible','','','2020-11-20 16:52:18'),(3,'','Parada','','','2020-11-20 16:52:18'),(4,'','Cruce','','','2020-11-20 16:52:18');
/*!40000 ALTER TABLE `tipos_puntos` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `tipos_vehiculos`
--

DROP TABLE IF EXISTS `tipos_vehiculos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tipos_vehiculos` (
  `id` int NOT NULL AUTO_INCREMENT,
  `descripcion` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `tipos_vehiculos`
--

LOCK TABLES `tipos_vehiculos` WRITE;
/*!40000 ALTER TABLE `tipos_vehiculos` DISABLE KEYS */;
INSERT INTO `tipos_vehiculos` VALUES (1,'Automóvil'),(2,'Camioneta'),(3,'Camión'),(4,'Tractor'),(5,'Trailer truck'),(6,'Motocicleta');
/*!40000 ALTER TABLE `tipos_vehiculos` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `unidades_movimiento`
--

DROP TABLE IF EXISTS `unidades_movimiento`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `unidades_movimiento` (
  `id` int NOT NULL AUTO_INCREMENT,
  `empresa` int NOT NULL,
  `unidad` int NOT NULL,
  `ruta_actual` int NOT NULL,
  `latitud` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `longitud` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `latitud_anterior` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `longitud_anterior` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `estatus` int NOT NULL,
  `fech_salida` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `id_empresa` (`empresa`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `unidades_movimiento`
--

LOCK TABLES `unidades_movimiento` WRITE;
/*!40000 ALTER TABLE `unidades_movimiento` DISABLE KEYS */;
INSERT INTO `unidades_movimiento` VALUES (6,18,4,6,'20.70908681','-103.34858843','20.70908681','-103.34858843',1,'2023-04-24 13:55:08'),(7,18,5,24,'20.345876666666665','-103.59445','20.345876666666665','-103.59445',1,'2023-05-09 12:19:06'),(8,18,12,18,'0','0','0','0',1,'2023-08-14 14:10:46'),(9,18,6,12,'20.338844216666665','-103.60496463333332','20.338844216666665','-103.60496463333332',1,'2023-08-14 14:11:21'),(10,18,13,17,'20.728065','-103.41511166666666','20.728065','-103.41511166666666',1,'2023-08-14 14:11:34'),(11,18,14,0,'20.51356934','-103.48774975','20.51356934','-103.48774975',1,'2023-08-14 14:11:46'),(12,18,7,0,'23.7052522','-133.3482538','23.7052522','-133.3482538',1,'2023-08-14 14:12:36'),(13,18,11,15,'20.505697416666667','-103.35560845','20.505697416666667','-103.35560845',1,'2023-08-14 14:12:46'),(14,18,19,16,'20.338293333333336','-103.60482166666667','20.338293333333336','-103.60480833333334',1,'2023-10-24 14:53:11'),(15,18,22,15,'20.519653333333334','-103.38730166666667','20.519653333333334','-103.38730166666667',1,'2023-10-24 14:54:01'),(16,18,18,27,'20.443851666666667','-103.43407666666666','20.443851666666667','-103.43407666666666',1,'2023-10-24 14:54:28'),(17,18,17,14,'0','0','0','0',1,'2023-10-24 14:54:50'),(18,18,24,23,'0','0','0','0',1,'2023-10-24 14:56:26'),(19,18,21,22,'0','0','0','0',1,'2023-10-24 14:56:58'),(20,18,28,0,'0','0','0','0',1,'2023-10-24 14:57:52'),(21,18,16,0,'20.45933','-103.42215166666668','20.45933','-103.42215166666668',1,'2023-10-24 14:59:12'),(22,18,25,25,'23.7052522','-133.3482538','23.7052522','-133.3482538',1,'2024-03-18 13:33:12'),(23,18,29,26,'0','0','0','0',1,'2024-03-18 13:35:53'),(24,18,31,28,'0','0','0','0',1,'2024-04-01 13:42:18');
/*!40000 ALTER TABLE `unidades_movimiento` ENABLE KEYS */;
UNLOCK TABLES;
/*!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 2024-06-11 21:38:51
