
--
-- Table structure for table `tipo_tiempos`
--

CREATE TABLE `tipo_tiempos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(150) NOT NULL,
  `descripcion` text DEFAULT '',
  `color` varchar(50) DEFAULT '',
  `createdAt` date NOT NULL,
  `updatedAt` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `tipo_tiempos`
--

INSERT INTO `tipo_tiempos` VALUES (1,'Gestión Operativa','','#021cde','2020-07-24','2020-10-22'),(2,'Gestión Comercial','','#01b71f','2020-07-24','2020-10-22'),(3,'Aporte Sectorial','','#04cedc','2020-07-24','2020-10-22'),(4,'Administrativo y Financiero','','#ebdc05','2020-07-24','2020-10-22'),(5,'Corporativo','','#fa0000','2020-07-24','2020-10-22'),(8,'Vacaciones / Permisos / Licencias ','vacaciones','#018e1d','2021-01-04','2021-01-14');

--
-- Table structure for table `usuario_centro_costos`
--

CREATE TABLE `usuario_centro_costos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `usuario` int(11) NOT NULL,
  `centroCosto` int(11) NOT NULL,
  `createdAt` date NOT NULL,
  `updatedAt` date NOT NULL,
  PRIMARY KEY (`id`),
  KEY `usuario` (`usuario`),
  KEY `centroCosto` (`centroCosto`),
  CONSTRAINT `usuario_centro_costos_ibfk_1` FOREIGN KEY (`centroCosto`) REFERENCES `centro_costos` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `usuario_centro_costos_ibfk_2` FOREIGN KEY (`usuario`) REFERENCES `usuarios` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=456 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `usuario_centro_costos`
--

INSERT INTO `usuario_centro_costos` VALUES (5,1028,270,'2020-08-07','2020-08-07'),(9,1028,172,'2020-08-11','2020-08-11'),(10,1028,312,'2020-08-11','2020-08-11'),(11,1028,314,'2020-08-11','2020-08-11'),(12,1028,316,'2020-08-11','2020-08-11'),(13,1028,317,'2020-08-11','2020-08-11'),(15,1028,323,'2020-08-11','2020-08-11'),(16,1028,324,'2020-08-11','2020-08-11'),(17,1028,327,'2020-08-11','2020-08-11'),(20,1005,103,'2020-08-11','2020-08-11'),(21,1005,179,'2020-08-11','2020-08-11'),(23,1046,270,'2020-08-12','2020-08-12'),(24,1046,312,'2020-08-12','2020-08-12'),(25,1046,314,'2020-08-12','2020-08-12'),(26,1046,316,'2020-08-12','2020-08-12'),(27,1046,317,'2020-08-12','2020-08-12'),(28,1046,319,'2020-08-12','2020-08-12'),(29,1046,323,'2020-08-12','2020-08-12'),(30,1046,324,'2020-08-12','2020-08-12'),(31,1046,327,'2020-08-12','2020-08-12'),(35,1047,316,'2020-08-12','2020-08-12'),(42,1048,312,'2020-08-12','2020-08-12'),(43,1048,314,'2020-08-12','2020-08-12'),(44,1048,316,'2020-08-12','2020-08-12'),(46,1048,319,'2020-08-12','2020-08-12'),(49,1048,327,'2020-08-12','2020-08-12'),(60,1035,333,'2020-08-12','2020-08-12'),(61,1035,334,'2020-08-12','2020-08-12'),(62,1035,335,'2020-08-12','2020-08-12'),(63,1035,336,'2020-08-12','2020-08-12'),(64,1035,337,'2020-08-12','2020-08-12'),(65,1035,342,'2020-08-12','2020-08-12'),(66,1037,333,'2020-08-12','2020-08-12'),(67,1037,334,'2020-08-12','2020-08-12'),(68,1037,338,'2020-08-12','2020-08-12'),(70,1037,277,'2020-08-12','2020-08-12'),(71,1035,172,'2020-08-12','2020-08-12'),(73,1001,103,'2020-08-12','2020-08-12'),(74,1027,103,'2020-08-12','2020-08-12'),(75,1029,103,'2020-08-12','2020-08-12'),(76,1002,114,'2020-08-12','2020-08-12'),(77,1004,103,'2020-08-12','2020-08-12'),(79,1006,114,'2020-08-12','2020-08-12'),(80,1007,103,'2020-08-12','2020-08-12'),(82,1008,103,'2020-08-12','2020-08-12'),(83,1009,103,'2020-08-12','2020-08-12'),(84,1010,103,'2020-08-12','2020-08-12'),(85,1011,103,'2020-08-12','2020-08-12'),(86,1029,171,'2020-08-12','2020-08-12'),(87,1029,172,'2020-08-12','2020-08-12'),(88,1029,179,'2020-08-12','2020-08-12'),(92,1025,138,'2020-08-12','2020-08-12'),(93,1025,139,'2020-08-12','2020-08-12'),(94,1025,140,'2020-08-12','2020-08-12'),(95,1025,141,'2020-08-12','2020-08-12'),(96,1025,144,'2020-08-12','2020-08-12'),(97,1025,147,'2020-08-12','2020-08-12'),(98,1025,171,'2020-08-12','2020-08-12'),(99,1025,172,'2020-08-12','2020-08-12'),(100,1025,177,'2020-08-12','2020-08-12'),(101,1025,179,'2020-08-12','2020-08-12'),(102,1025,183,'2020-08-12','2020-08-12'),(103,1025,255,'2020-08-12','2020-08-12'),(106,1025,331,'2020-08-12','2020-08-12'),(108,1031,147,'2020-08-12','2020-08-12'),(109,1031,148,'2020-08-12','2020-08-12'),(110,1031,149,'2020-08-12','2020-08-12'),(111,1031,150,'2020-08-12','2020-08-12'),(112,1031,152,'2020-08-12','2020-08-12'),(113,1031,154,'2020-08-12','2020-08-12'),(114,1031,155,'2020-08-12','2020-08-12'),(115,1031,156,'2020-08-12','2020-08-12'),(116,1031,157,'2020-08-12','2020-08-12'),(117,1031,159,'2020-08-12','2020-08-12'),(118,1031,160,'2020-08-12','2020-08-12'),(119,1032,139,'2020-08-12','2020-08-12'),(120,1034,147,'2020-08-12','2020-08-12'),(121,1034,148,'2020-08-12','2020-08-12'),(122,1034,149,'2020-08-12','2020-08-12'),(125,1034,154,'2020-08-12','2020-08-12'),(126,1034,155,'2020-08-12','2020-08-12'),(127,1034,156,'2020-08-12','2020-08-12'),(128,1034,157,'2020-08-12','2020-08-12'),(129,1034,159,'2020-08-12','2020-08-12'),(130,1034,160,'2020-08-12','2020-08-12'),(131,1036,138,'2020-08-12','2020-08-12'),(132,1036,140,'2020-08-12','2020-08-12'),(133,1036,141,'2020-08-12','2020-08-12'),(145,1040,144,'2020-08-12','2020-08-12'),(146,1040,171,'2020-08-12','2020-08-12'),(147,1040,172,'2020-08-12','2020-08-12'),(148,1040,174,'2020-08-12','2020-08-12'),(150,1042,147,'2020-08-12','2020-08-12'),(151,1042,148,'2020-08-12','2020-08-12'),(152,1042,149,'2020-08-12','2020-08-12'),(153,1042,150,'2020-08-12','2020-08-12'),(154,1042,152,'2020-08-12','2020-08-12'),(155,1042,154,'2020-08-12','2020-08-12'),(156,1042,155,'2020-08-12','2020-08-12'),(157,1042,156,'2020-08-12','2020-08-12'),(158,1042,157,'2020-08-12','2020-08-12'),(159,1042,159,'2020-08-12','2020-08-12'),(160,1042,160,'2020-08-12','2020-08-12'),(161,1043,138,'2020-08-12','2020-08-12'),(162,1043,139,'2020-08-12','2020-08-12'),(163,1043,140,'2020-08-12','2020-08-12'),(164,1043,141,'2020-08-12','2020-08-12'),(165,1043,144,'2020-08-12','2020-08-12'),(166,1043,183,'2020-08-12','2020-08-12'),(168,1039,144,'2020-08-12','2020-08-12'),(169,1039,177,'2020-08-12','2020-08-12'),(170,1045,147,'2020-08-12','2020-08-12'),(171,1045,148,'2020-08-12','2020-08-12'),(172,1045,149,'2020-08-12','2020-08-12'),(173,1045,150,'2020-08-12','2020-08-12'),(174,1045,152,'2020-08-12','2020-08-12'),(175,1045,154,'2020-08-12','2020-08-12'),(176,1045,155,'2020-08-12','2020-08-12'),(177,1045,156,'2020-08-12','2020-08-12'),(178,1045,157,'2020-08-12','2020-08-12'),(179,1045,159,'2020-08-12','2020-08-12'),(180,1045,160,'2020-08-12','2020-08-12'),(181,1012,118,'2020-08-12','2020-08-12'),(182,1012,125,'2020-08-12','2020-08-12'),(183,1012,192,'2020-08-12','2020-08-12'),(184,1012,179,'2020-08-12','2020-08-12'),(186,1013,125,'2020-08-12','2020-08-12'),(187,1013,179,'2020-08-12','2020-08-12'),(188,1013,118,'2020-08-12','2020-08-12'),(189,1013,251,'2020-08-12','2020-08-12'),(193,1017,213,'2020-08-12','2020-08-12'),(194,1018,192,'2020-08-12','2020-08-12'),(197,1030,118,'2020-08-12','2020-08-12'),(198,1030,125,'2020-08-12','2020-08-12'),(199,1030,192,'2020-08-12','2020-08-12'),(200,1030,213,'2020-08-12','2020-08-12'),(201,1030,251,'2020-08-12','2020-08-12'),(202,1030,179,'2020-08-12','2020-08-12'),(203,1030,272,'2020-08-12','2020-08-12'),(204,1020,125,'2020-08-12','2020-08-12'),(205,1020,192,'2020-08-12','2020-08-12'),(206,1021,125,'2020-08-12','2020-08-12'),(207,1021,192,'2020-08-12','2020-08-12'),(208,1022,118,'2020-08-12','2020-08-12'),(209,1022,125,'2020-08-12','2020-08-12'),(210,1023,125,'2020-08-12','2020-08-12'),(211,1023,192,'2020-08-12','2020-08-12'),(212,1023,213,'2020-08-12','2020-08-12'),(213,1024,118,'2020-08-12','2020-08-12'),(214,1,270,'2020-08-13','2020-08-13'),(215,1,322,'2020-08-13','2020-08-13'),(223,1028,319,'2020-08-31','2020-08-31'),(224,1028,313,'2020-09-03','2020-09-03'),(225,1028,314,'2020-09-03','2020-09-03'),(226,1028,319,'2020-09-09','2020-09-09'),(227,1028,173,'2020-09-10','2020-09-10'),(228,1028,343,'2020-09-10','2020-09-10'),(229,1046,343,'2020-09-10','2020-09-10'),(230,1028,158,'2020-09-24','2020-09-24'),(231,1028,344,'2020-09-24','2020-09-24'),(232,1046,344,'2020-09-24','2020-09-24'),(233,1046,158,'2020-09-24','2020-09-24'),(235,1047,137,'2020-10-19','2020-10-19'),(237,1048,172,'2020-10-19','2020-10-19'),(238,1048,173,'2020-10-19','2020-10-19'),(239,1048,313,'2020-10-19','2020-10-19'),(240,1048,315,'2020-10-19','2020-10-19'),(242,1048,343,'2020-10-19','2020-10-19'),(245,1047,328,'2020-10-19','2020-10-19'),(246,1047,172,'2020-10-19','2020-10-19'),(247,1047,313,'2020-10-19','2020-10-19'),(248,1046,313,'2020-10-19','2020-10-19'),(249,1046,315,'2020-10-19','2020-10-19'),(250,1046,318,'2020-10-19','2020-10-19'),(251,1,315,'2020-10-20','2020-10-20'),(252,1,345,'2020-10-27','2020-10-27'),(256,1,338,'2020-11-02','2020-11-02'),(257,1,318,'2020-11-02','2020-11-02'),(259,1004,106,'2020-11-09','2020-11-09'),(261,1050,103,'2020-11-10','2020-11-10'),(262,1004,107,'2020-11-13','2020-11-13'),(263,1011,112,'2020-11-13','2020-11-13'),(264,1010,112,'2020-11-13','2020-11-13'),(265,1009,112,'2020-11-13','2020-11-13'),(266,1008,112,'2020-11-13','2020-11-13'),(267,1004,112,'2020-11-13','2020-11-13'),(268,1041,184,'2020-11-16','2020-11-16'),(269,1047,173,'2020-11-16','2020-11-16'),(272,1006,107,'2020-11-17','2020-11-17'),(273,1006,116,'2020-11-17','2020-11-17'),(274,1006,103,'2020-11-17','2020-11-17'),(275,1002,107,'2020-11-17','2020-11-17'),(276,1002,116,'2020-11-17','2020-11-17'),(277,1027,106,'2020-11-17','2020-11-17'),(278,1027,107,'2020-11-17','2020-11-17'),(279,1027,109,'2020-11-17','2020-11-17'),(280,1027,112,'2020-11-17','2020-11-17'),(281,1027,114,'2020-11-17','2020-11-17'),(282,1009,107,'2020-11-17','2020-11-17'),(283,1048,333,'2020-11-17','2020-11-17'),(284,1048,274,'2020-11-17','2020-11-17'),(285,1048,268,'2020-11-17','2020-11-17'),(287,1028,309,'2020-11-19','2020-11-19'),(288,1028,333,'2020-11-19','2020-11-19'),(289,1028,346,'2020-11-19','2020-11-19'),(290,1028,338,'2020-11-19','2020-11-19'),(291,1034,150,'2020-11-23','2020-11-23'),(292,1034,152,'2020-11-23','2020-11-23'),(293,1034,344,'2020-11-23','2020-11-23'),(294,1034,347,'2020-11-23','2020-11-23'),(295,1034,348,'2020-11-23','2020-11-23'),(296,1034,349,'2020-11-23','2020-11-23'),(297,1037,350,'2020-11-24','2020-11-24'),(298,1037,351,'2020-11-24','2020-11-24'),(299,1035,346,'2020-11-24','2020-11-24'),(301,1042,347,'2020-11-30','2020-11-30'),(302,1042,344,'2020-11-30','2020-11-30'),(303,1042,349,'2020-11-30','2020-11-30'),(304,1042,348,'2020-11-30','2020-11-30'),(305,1031,347,'2020-11-30','2020-11-30'),(306,1031,344,'2020-11-30','2020-11-30'),(307,1031,348,'2020-11-30','2020-11-30'),(309,1045,347,'2020-11-30','2020-11-30'),(310,1045,344,'2020-11-30','2020-11-30'),(311,1045,348,'2020-11-30','2020-11-30'),(312,1045,349,'2020-11-30','2020-11-30'),(313,1051,138,'2020-11-30','2020-11-30'),(314,1051,137,'2020-11-30','2020-11-30'),(315,1051,172,'2020-11-30','2020-11-30'),(316,1040,169,'2020-11-30','2020-11-30'),(317,1041,137,'2020-12-02','2020-12-02'),(318,1041,344,'2020-12-02','2020-12-02'),(319,1041,183,'2020-12-15','2020-12-15'),(321,1041,379,'2020-12-16','2020-12-16'),(322,1043,177,'2020-12-21','2020-12-21'),(323,1005,109,'2021-01-08','2021-01-08'),(324,1008,107,'2021-01-08','2021-01-08'),(325,1005,116,'2021-01-08','2021-01-08'),(326,1039,169,'2021-01-11','2021-01-11'),(327,1004,382,'2021-01-12','2021-01-12'),(328,1011,382,'2021-01-12','2021-01-12'),(329,1011,381,'2021-01-12','2021-01-12'),(330,1050,381,'2021-01-13','2021-01-13'),(331,1050,382,'2021-01-13','2021-01-13'),(332,1027,381,'2021-01-29','2021-01-29'),(333,1027,116,'2021-01-29','2021-01-29'),(334,1027,382,'2021-01-29','2021-01-29'),(335,1006,382,'2021-01-29','2021-01-29'),(336,1002,382,'2021-01-29','2021-01-29'),(337,1010,382,'2021-01-29','2021-01-29'),(339,1010,107,'2021-01-29','2021-01-29'),(340,1010,116,'2021-01-29','2021-01-29'),(341,1041,173,'2021-01-29','2021-01-29'),(342,1041,384,'2021-01-29','2021-01-29'),(343,1028,365,'2021-01-29','2021-01-29'),(344,1028,366,'2021-01-29','2021-01-29'),(345,1028,367,'2021-01-29','2021-01-29'),(346,1047,254,'2021-02-02','2021-02-02'),(347,1047,384,'2021-02-02','2021-02-02'),(348,1047,255,'2021-02-02','2021-02-02'),(349,1053,159,'2021-02-17','2021-02-17'),(350,1053,157,'2021-02-17','2021-02-17'),(351,1053,156,'2021-02-17','2021-02-17'),(352,1053,155,'2021-02-17','2021-02-17'),(353,1053,154,'2021-02-17','2021-02-17'),(354,1053,152,'2021-02-17','2021-02-17'),(355,1053,150,'2021-02-17','2021-02-17'),(356,1053,149,'2021-02-17','2021-02-17'),(357,1053,148,'2021-02-17','2021-02-17'),(358,1053,147,'2021-02-17','2021-02-17'),(359,1053,349,'2021-02-17','2021-02-17'),(360,1053,348,'2021-02-17','2021-02-17'),(361,1053,344,'2021-02-17','2021-02-17'),(362,1053,347,'2021-02-17','2021-02-17'),(363,1053,160,'2021-02-17','2021-02-17'),(364,1052,213,'2021-03-04','2021-03-04'),(365,1052,312,'2021-03-04','2021-03-04'),(366,1052,315,'2021-03-04','2021-03-04'),(367,1052,319,'2021-03-04','2021-03-04'),(369,1052,322,'2021-03-04','2021-03-04'),(370,1052,337,'2021-03-04','2021-03-04'),(371,1007,106,'2021-03-05','2021-03-05'),(372,1007,107,'2021-03-05','2021-03-05'),(373,1007,381,'2021-03-05','2021-03-05'),(374,1025,365,'2021-03-11','2021-03-11'),(375,1010,134,'2021-03-19','2021-03-19'),(376,1004,134,'2021-03-19','2021-03-19'),(377,1052,309,'2021-03-24','2021-03-24'),(378,1052,333,'2021-03-24','2021-03-24'),(379,1041,409,'2021-03-24','2021-10-06'),(380,1047,387,'2021-03-24','2021-03-24'),(381,1028,315,'2021-04-01','2021-04-01'),(382,1028,334,'2021-04-01','2021-04-01'),(383,1054,192,'2021-04-06','2021-04-06'),(384,1055,192,'2021-04-06','2021-04-06'),(385,1055,213,'2021-04-06','2021-04-06'),(386,1056,192,'2021-04-06','2021-04-06'),(387,1056,125,'2021-04-06','2021-04-06'),(388,1035,274,'2021-04-07','2021-04-07'),(389,1035,374,'2021-04-07','2021-04-07'),(390,1035,268,'2021-04-07','2021-04-07'),(391,1047,365,'2021-05-26','2021-05-26'),(392,1025,169,'2021-05-28','2021-05-28'),(393,1041,364,'2021-05-28','2021-05-28'),(394,1057,116,'2021-06-07','2021-06-07'),(395,1057,179,'2021-06-07','2021-06-07'),(396,1057,103,'2021-06-07','2021-06-07'),(397,1057,109,'2021-06-07','2021-06-07'),(398,1057,383,'2021-06-07','2021-06-07'),(399,1057,138,'2021-06-07','2021-06-07'),(400,1057,140,'2021-06-07','2021-06-07'),(401,1057,141,'2021-06-07','2021-06-07'),(402,1048,365,'2021-07-01','2021-07-01'),(403,1048,366,'2021-07-01','2021-07-01'),(404,1048,367,'2021-07-01','2021-07-01'),(405,1048,374,'2021-07-01','2021-07-01'),(406,1048,389,'2021-07-01','2021-07-01'),(407,1048,334,'2021-07-01','2021-07-01'),(408,1048,337,'2021-07-01','2021-07-01'),(409,1031,364,'2021-07-02','2021-07-02'),(410,1031,349,'2021-07-02','2021-07-02'),(411,1028,351,'2021-07-05','2021-07-05'),(412,1027,383,'2021-07-13','2021-07-13'),(413,1047,258,'2021-07-15','2021-07-15'),(414,1047,391,'2021-07-20','2021-07-20'),(415,1031,392,'2021-07-28','2021-07-28'),(416,1045,364,'2021-07-28','2021-07-28'),(417,1034,364,'2021-07-28','2021-07-28'),(418,1034,392,'2021-07-28','2021-07-28'),(419,1045,392,'2021-07-28','2021-07-28'),(420,1042,392,'2021-07-28','2021-07-28'),(421,1042,364,'2021-07-28','2021-07-28'),(422,1053,364,'2021-07-28','2021-07-28'),(423,1053,392,'2021-07-28','2021-07-28'),(424,1059,107,'2021-08-09','2021-08-09'),(425,1059,382,'2021-08-09','2021-08-09'),(426,1059,114,'2021-08-09','2021-08-09'),(427,1059,116,'2021-08-09','2021-08-09'),(428,1047,409,'2021-08-13','2021-08-13'),(429,1034,365,'2021-10-04','2021-10-04'),(430,1041,385,'2021-10-06','2021-10-06'),(431,1028,275,'2021-10-06','2021-10-06'),(432,1028,375,'2021-10-06','2021-10-06'),(433,1028,405,'2021-10-06','2021-10-06'),(434,1051,365,'2021-10-26','2021-10-26'),(436,1025,103,'2021-11-02','2021-11-02'),(437,1051,391,'2021-11-29','2021-11-29'),(438,1051,255,'2021-11-29','2021-11-29'),(439,1053,365,'2021-11-30','2021-11-30'),(440,1041,391,'2021-12-03','2021-12-03'),(441,1050,109,'2021-12-29','2021-12-29'),(442,1060,173,'2022-01-03','2022-01-03'),(443,1060,183,'2022-01-03','2022-01-03'),(444,1060,255,'2022-01-07','2022-01-07'),(445,1060,409,'2022-01-07','2022-01-07'),(446,1060,384,'2022-01-07','2022-01-07'),(447,1032,138,'2022-05-23','2022-05-23'),(448,1032,140,'2022-05-23','2022-05-23'),(449,1041,309,'2022-06-01','2022-06-01'),(450,1041,331,'2022-06-01','2022-06-01'),(451,1041,106,'2022-06-01','2022-06-01'),(454,1062,137,'2022-07-19','2022-07-19'),(455,1062,365,'2022-07-19','2022-07-19');

--
-- Table structure for table `usuario_centro_costos_sap`
--

CREATE TABLE `usuario_centro_costos_sap` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `usuario` int(11) NOT NULL,
  `centroCostoSap` int(11) NOT NULL,
  `proyectoSap` int(11) NOT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `usuario` (`usuario`),
  KEY `centroCostoSap` (`centroCostoSap`),
  KEY `proyectoSap` (`proyectoSap`),
  CONSTRAINT `usuario_centro_costos_sap_ibfk_1` FOREIGN KEY (`centroCostoSap`) REFERENCES `centro_costos_sap` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `usuario_centro_costos_sap_ibfk_2` FOREIGN KEY (`proyectoSap`) REFERENCES `proyectos_sap` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `usuario_centro_costos_sap_ibfk_3` FOREIGN KEY (`usuario`) REFERENCES `usuarios` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=285 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `usuario_centro_costos_sap`
--

INSERT INTO `usuario_centro_costos_sap` VALUES (10,1,8,34,'2022-09-26 00:00:00','2022-09-26 00:00:00'),(12,1,12,55,'2022-09-26 00:00:00','2022-09-26 00:00:00'),(13,1,9,39,'2022-09-26 00:00:00','2022-09-26 00:00:00'),(14,1,8,36,'2022-09-27 00:00:00','2022-09-27 00:00:00'),(15,1,7,30,'2022-09-27 00:00:00','2022-09-27 00:00:00'),(16,1,11,52,'2022-09-30 00:00:00','2022-09-30 00:00:00'),(17,1,9,40,'2022-10-11 00:00:00','2022-10-11 00:00:00'),(20,1057,1,5,'2022-10-17 00:00:00','2022-10-17 00:00:00'),(21,1025,1,5,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(24,1025,8,35,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(27,1030,1,9,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(28,1030,4,12,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(29,1030,4,13,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(30,1030,4,14,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(31,1030,11,51,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(32,1025,11,51,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(33,1028,9,39,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(34,1028,9,46,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(36,1047,7,25,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(37,1047,7,26,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(40,1047,7,30,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(41,1047,7,31,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(42,1047,7,32,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(43,1047,8,33,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(44,1047,9,45,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(45,1039,5,15,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(53,1027,1,5,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(54,1011,1,5,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(55,1060,7,25,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(56,1060,7,26,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(61,1060,7,32,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(62,1007,1,5,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(66,1012,1,9,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(67,1012,3,11,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(68,1012,4,12,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(69,1012,4,13,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(70,1012,4,14,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(73,1013,1,9,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(74,1013,4,12,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(75,1013,4,13,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(76,1013,4,14,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(78,1057,9,41,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(79,1032,8,34,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(80,1032,8,35,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(81,1032,8,36,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(82,1022,4,14,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(83,1022,4,12,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(84,1041,1,5,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(85,1041,3,11,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(86,1041,7,25,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(87,1041,7,26,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(88,1041,7,30,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(89,1041,7,31,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(90,1041,8,33,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(91,1041,9,39,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(92,1043,1,5,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(99,1043,8,35,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(102,1043,8,38,'2022-10-19 00:00:00','2022-10-19 00:00:00'),(103,1040,7,31,'2022-10-21 00:00:00','2022-10-21 00:00:00'),(104,1040,5,23,'2022-10-21 00:00:00','2022-10-21 00:00:00'),(105,1025,9,46,'2022-10-26 00:00:00','2022-10-26 00:00:00'),(106,1025,9,46,'2022-10-26 00:00:00','2022-10-26 00:00:00'),(107,1039,5,23,'2022-11-07 00:00:00','2022-11-07 00:00:00'),(108,1063,8,34,'2022-11-07 00:00:00','2022-11-07 00:00:00'),(110,1040,6,107,'2022-11-11 00:00:00','2022-11-11 00:00:00'),(111,1062,7,32,'2022-11-14 00:00:00','2022-11-14 00:00:00'),(112,1030,8,34,'2022-11-21 00:00:00','2022-11-21 00:00:00'),(113,1012,6,107,'2022-11-21 00:00:00','2022-11-21 00:00:00'),(114,1012,9,45,'2022-11-21 00:00:00','2022-11-21 00:00:00'),(115,1013,6,107,'2022-11-21 00:00:00','2022-11-21 00:00:00'),(116,1013,9,45,'2022-11-21 00:00:00','2022-11-21 00:00:00'),(117,1057,9,42,'2022-12-02 00:00:00','2022-12-02 00:00:00'),(118,1039,5,22,'2022-12-05 00:00:00','2022-12-05 00:00:00'),(120,1066,11,51,'2022-12-21 00:00:00','2022-12-21 00:00:00'),(121,1043,9,46,'2023-01-05 00:00:00','2023-01-05 00:00:00'),(125,1062,8,33,'2023-01-20 00:00:00','2023-01-20 00:00:00'),(130,1062,9,39,'2023-01-30 00:00:00','2023-01-30 00:00:00'),(131,1062,9,45,'2023-01-30 00:00:00','2023-01-30 00:00:00'),(132,1062,7,111,'2023-03-13 00:00:00','2023-03-13 00:00:00'),(133,1062,7,112,'2023-03-13 00:00:00','2023-03-13 00:00:00'),(134,1013,7,111,'2023-03-13 00:00:00','2023-03-13 00:00:00'),(135,1013,7,112,'2023-03-13 00:00:00','2023-03-13 00:00:00'),(136,1012,7,111,'2023-03-13 00:00:00','2023-03-13 00:00:00'),(137,1012,7,112,'2023-03-13 00:00:00','2023-03-13 00:00:00'),(138,1047,7,111,'2023-03-13 00:00:00','2023-03-13 00:00:00'),(139,1047,7,112,'2023-03-13 00:00:00','2023-03-13 00:00:00'),(141,1060,7,112,'2023-03-13 00:00:00','2023-03-13 00:00:00'),(142,1041,9,45,'2023-04-21 00:00:00','2023-04-21 00:00:00'),(143,1051,8,35,'2023-05-19 00:00:00','2023-05-19 00:00:00'),(144,1051,9,39,'2023-05-19 00:00:00','2023-05-19 00:00:00'),(145,1051,9,46,'2023-05-19 00:00:00','2023-05-19 00:00:00'),(146,1039,5,114,'2023-05-22 00:00:00','2023-05-22 00:00:00'),(147,1039,5,115,'2023-05-22 00:00:00','2023-05-22 00:00:00'),(148,1028,9,113,'2023-05-22 00:00:00','2023-05-22 00:00:00'),(149,1028,9,116,'2023-05-22 00:00:00','2023-05-22 00:00:00'),(150,1028,9,117,'2023-05-22 00:00:00','2023-05-22 00:00:00'),(151,1028,9,118,'2023-05-22 00:00:00','2023-05-22 00:00:00'),(152,1028,9,119,'2023-05-22 00:00:00','2023-05-22 00:00:00'),(153,1067,9,45,'2023-05-22 00:00:00','2023-05-22 00:00:00'),(154,1041,7,112,'2023-06-06 00:00:00','2023-06-06 00:00:00'),(157,1068,7,32,'2023-09-28 00:00:00','2023-09-28 00:00:00'),(158,1068,7,31,'2023-09-28 00:00:00','2023-09-28 00:00:00'),(159,1068,8,33,'2023-09-28 00:00:00','2023-09-28 00:00:00'),(160,1069,7,25,'2023-09-29 00:00:00','2023-09-29 00:00:00'),(161,1069,7,26,'2023-09-29 00:00:00','2023-09-29 00:00:00'),(162,1069,7,32,'2023-09-29 00:00:00','2023-09-29 00:00:00'),(186,1070,7,26,'2023-12-15 00:00:00','2023-12-15 00:00:00'),(187,1070,7,32,'2023-12-15 00:00:00','2023-12-15 00:00:00'),(188,1070,7,111,'2023-12-15 00:00:00','2023-12-15 00:00:00'),(189,1040,9,46,'2024-01-09 00:00:00','2024-01-09 00:00:00'),(190,1057,7,26,'2024-01-15 00:00:00','2024-01-15 00:00:00'),(191,1028,9,129,'2024-03-21 00:00:00','2024-03-21 00:00:00'),(192,1028,9,130,'2024-03-21 00:00:00','2024-03-21 00:00:00'),(194,1057,8,33,'2024-05-03 00:00:00','2024-05-03 00:00:00'),(195,1043,9,130,'2024-05-13 00:00:00','2024-05-13 00:00:00'),(196,1062,9,130,'2024-05-13 00:00:00','2024-05-13 00:00:00'),(197,1012,9,39,'2024-05-13 00:00:00','2024-05-13 00:00:00'),(198,1013,9,39,'2024-05-13 00:00:00','2024-05-13 00:00:00'),(199,1028,9,45,'2024-05-13 00:00:00','2024-05-13 00:00:00'),(200,1062,9,46,'2024-05-13 00:00:00','2024-05-13 00:00:00'),(201,1043,9,39,'2024-05-13 00:00:00','2024-05-13 00:00:00'),(202,1051,9,127,'2024-05-13 00:00:00','2024-05-13 00:00:00'),(203,1047,18,133,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(204,1060,18,133,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(206,1069,18,133,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(207,1012,18,133,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(208,1013,18,133,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(209,1028,18,133,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(210,1062,18,133,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(211,1041,18,133,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(212,1012,18,134,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(213,1039,18,134,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(214,1028,18,135,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(215,1068,18,135,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(216,1062,18,135,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(217,1043,18,135,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(218,1040,18,135,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(219,1012,18,135,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(220,1028,18,136,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(221,1068,18,136,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(223,1062,18,136,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(224,1043,18,136,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(225,1067,18,136,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(226,1028,18,137,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(227,1067,18,137,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(228,1060,18,137,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(229,1041,18,137,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(230,1012,18,137,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(231,1013,18,137,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(232,1047,18,138,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(233,1060,18,138,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(234,1069,18,138,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(235,1070,18,138,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(236,1012,18,138,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(237,1013,18,138,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(238,1027,18,138,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(239,1041,18,138,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(240,1040,18,138,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(241,1039,18,138,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(242,1028,18,139,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(243,1068,18,139,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(244,1062,18,139,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(245,1043,18,139,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(246,1067,18,139,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(247,1060,18,139,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(248,1012,18,140,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(249,1013,18,140,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(250,1028,18,140,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(251,1040,18,140,'2024-05-20 00:00:00','2024-05-20 00:00:00'),(252,1025,8,33,'2024-05-24 00:00:00','2024-05-24 00:00:00'),(253,1040,18,141,'2024-06-07 00:00:00','2024-06-07 00:00:00'),(254,1047,18,141,'2024-06-07 00:00:00','2024-06-07 00:00:00'),(255,1060,18,141,'2024-06-07 00:00:00','2024-06-07 00:00:00'),(256,1013,18,141,'2024-06-07 00:00:00','2024-06-07 00:00:00'),(257,1012,18,141,'2024-06-07 00:00:00','2024-06-07 00:00:00'),(258,1043,18,141,'2024-06-07 00:00:00','2024-06-07 00:00:00'),(259,1047,7,128,'2024-06-27 00:00:00','2024-06-27 00:00:00'),(260,1028,8,33,'2024-08-26 00:00:00','2024-08-26 00:00:00'),(261,1012,7,32,'2024-09-03 00:00:00','2024-09-03 00:00:00'),(262,1012,7,128,'2024-09-03 00:00:00','2024-09-03 00:00:00'),(263,1012,7,26,'2024-09-03 00:00:00','2024-09-03 00:00:00'),(264,1013,7,32,'2024-09-03 00:00:00','2024-09-03 00:00:00'),(265,1013,7,128,'2024-09-03 00:00:00','2024-09-03 00:00:00'),(266,1013,7,26,'2024-09-03 00:00:00','2024-09-03 00:00:00'),(269,1072,7,32,'2024-10-18 00:00:00','2024-10-18 00:00:00'),(270,1071,7,26,'2024-10-18 00:00:00','2024-10-18 00:00:00'),(271,1071,7,32,'2024-10-18 00:00:00','2024-10-18 00:00:00'),(272,1072,7,25,'2024-10-25 00:00:00','2024-10-25 00:00:00'),(273,1072,7,131,'2024-10-25 00:00:00','2024-10-25 00:00:00'),(274,1071,7,111,'2024-10-25 00:00:00','2024-10-25 00:00:00'),(275,1071,7,128,'2024-10-25 00:00:00','2024-10-25 00:00:00'),(276,1073,9,127,'2024-10-28 00:00:00','2024-10-28 00:00:00'),(277,1047,7,131,'2024-11-13 00:00:00','2024-11-13 00:00:00'),(278,1074,7,25,'2024-11-21 00:00:00','2024-11-21 00:00:00'),(279,1074,7,26,'2024-11-21 00:00:00','2024-11-21 00:00:00'),(280,1074,7,32,'2024-11-21 00:00:00','2024-11-21 00:00:00'),(281,1074,7,112,'2024-11-21 00:00:00','2024-11-21 00:00:00'),(282,1074,7,128,'2024-11-21 00:00:00','2024-11-21 00:00:00'),(283,1074,7,131,'2024-11-21 00:00:00','2024-11-21 00:00:00');

--
-- Table structure for table `usuario_subareas`
--

CREATE TABLE `usuario_subareas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `usuario` int(11) NOT NULL,
  `subarea` int(11) NOT NULL,
  `createdAt` date NOT NULL,
  `updatedAt` date NOT NULL,
  PRIMARY KEY (`id`),
  KEY `subarea` (`subarea`),
  KEY `usuario` (`usuario`),
  CONSTRAINT `usuario_subareas_ibfk_1` FOREIGN KEY (`subarea`) REFERENCES `subareas` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `usuario_subareas_ibfk_2` FOREIGN KEY (`usuario`) REFERENCES `usuarios` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `usuario_subareas`
--


--
-- Temporary table structure for view `v_autorizaciones`
--

/*!50001 DROP VIEW IF EXISTS `v_autorizaciones`*/;
/*!50001 CREATE VIEW `v_autorizaciones` AS SELECT
 1 AS `id`,
  1 AS `usuario`,
  1 AS `nombreUsuario`,
  1 AS `mes`,
  1 AS `estado`,
  1 AS `nombreEstado`,
  1 AS `observaciones`,
  1 AS `autorizadoPor`,
  1 AS `nombreAutoriza`,
  1 AS `createdAt`,
  1 AS `updatedAt` */;

--
-- Temporary table structure for view `v_categoria_indicadores`
--

/*!50001 DROP VIEW IF EXISTS `v_categoria_indicadores`*/;
/*!50001 CREATE VIEW `v_categoria_indicadores` AS SELECT
 1 AS `id`,
  1 AS `area`,
  1 AS `nombreArea`,
  1 AS `centroCosto`,
  1 AS `nombre`,
  1 AS `usuario`,
  1 AS `nombreUsuario`,
  1 AS `createdAt`,
  1 AS `updatedAt` */;

--
-- Temporary table structure for view `v_centro_costos`
--

/*!50001 DROP VIEW IF EXISTS `v_centro_costos`*/;
/*!50001 CREATE VIEW `v_centro_costos` AS SELECT
 1 AS `id`,
  1 AS `categoria`,
  1 AS `nombreCategoria`,
  1 AS `codigo`,
  1 AS `nombre`,
  1 AS `estado`,
  1 AS `nombreEstado`,
  1 AS `color`,
  1 AS `createdAt`,
  1 AS `updatedAt` */;

--
-- Temporary table structure for view `v_feriados`
--

/*!50001 DROP VIEW IF EXISTS `v_feriados`*/;
/*!50001 CREATE VIEW `v_feriados` AS SELECT
 1 AS `id`,
  1 AS `fecha`,
  1 AS `descripcion`,
  1 AS `mes`,
  1 AS `year`,
  1 AS `createdAt`,
  1 AS `updatedAt` */;

--
-- Temporary table structure for view `v_presupuesto_indicadores`
--

/*!50001 DROP VIEW IF EXISTS `v_presupuesto_indicadores`*/;
/*!50001 CREATE VIEW `v_presupuesto_indicadores` AS SELECT
 1 AS `id`,
  1 AS `areaIndicador`,
  1 AS `nombreAreaIndicador`,
  1 AS `categoriaIndicador`,
  1 AS `nombreCategoriaIndicadores`,
  1 AS `responsableCategoria`,
  1 AS `subcategoriaIndicador`,
  1 AS `nombreSubcategoriaIndicadores`,
  1 AS `responsableSubcategoria`,
  1 AS `nombreResponsableSubcategoria`,
  1 AS `areaUsuario`,
  1 AS `nombreAreaUsuario`,
  1 AS `referenciaYearAnterior`,
  1 AS `year`,
  1 AS `enero`,
  1 AS `eneroReal`,
  1 AS `febrero`,
  1 AS `febreroReal`,
  1 AS `marzo`,
  1 AS `marzoReal`,
  1 AS `abril`,
  1 AS `abrilReal`,
  1 AS `mayo`,
  1 AS `mayoReal`,
  1 AS `junio`,
  1 AS `junioReal`,
  1 AS `julio`,
  1 AS `julioReal`,
  1 AS `agosto`,
  1 AS `agostoReal`,
  1 AS `septiembre`,
  1 AS `septiembreReal`,
  1 AS `octubre`,
  1 AS `octubreReal`,
  1 AS `noviembre`,
  1 AS `noviembreReal`,
  1 AS `diciembre`,
  1 AS `diciembreReal`,
  1 AS `metaAnual`,
  1 AS `valorAcumulado`,
  1 AS `tipoDato`,
  1 AS `createdAt`,
  1 AS `updatedAt` */;

--
-- Temporary table structure for view `v_proyectos`
--

/*!50001 DROP VIEW IF EXISTS `v_proyectos`*/;
/*!50001 CREATE VIEW `v_proyectos` AS SELECT
 1 AS `id`,
  1 AS `centroCosto`,
  1 AS `nombreCentroCosto`,
  1 AS `codigo`,
  1 AS `estado`,
  1 AS `nombreEstado`,
  1 AS `area`,
  1 AS `nombreArea`,
  1 AS `nombre`,
  1 AS `descripcion`,
  1 AS `createdAt`,
  1 AS `updatedAt` */;

--
-- Temporary table structure for view `v_proyectos_sap`
--

/*!50001 DROP VIEW IF EXISTS `v_proyectos_sap`*/;
/*!50001 CREATE VIEW `v_proyectos_sap` AS SELECT
 1 AS `id`,
  1 AS `codigoProyectoSap`,
  1 AS `centroCostoSap`,
  1 AS `codigoCentroCostoSap`,
  1 AS `nombreCentroCostoSap`,
  1 AS `descripcion`,
  1 AS `estado`,
  1 AS `nombreEstado`,
  1 AS `createdAt`,
  1 AS `updatedAt` */;

--
-- Temporary table structure for view `v_subareas`
--

/*!50001 DROP VIEW IF EXISTS `v_subareas`*/;
/*!50001 CREATE VIEW `v_subareas` AS SELECT
 1 AS `id`,
  1 AS `nombre`,
  1 AS `area`,
  1 AS `nombreArea`,
  1 AS `descripcion`,
  1 AS `createdAt`,
  1 AS `updatedAt` */;

--
-- Temporary table structure for view `v_subcategoria_indicadores`
--

/*!50001 DROP VIEW IF EXISTS `v_subcategoria_indicadores`*/;
/*!50001 CREATE VIEW `v_subcategoria_indicadores` AS SELECT
 1 AS `id`,
  1 AS `categoria`,
  1 AS `nombreCategoria`,
  1 AS `area`,
  1 AS `nombreArea`,
  1 AS `nombre`,
  1 AS `responsable`,
  1 AS `nombreResponsable`,
  1 AS `createdAt`,
  1 AS `updatedAt` */;

--
-- Temporary table structure for view `v_timecontrollings`
--

/*!50001 DROP VIEW IF EXISTS `v_timecontrollings`*/;
/*!50001 CREATE VIEW `v_timecontrollings` AS SELECT
 1 AS `id`,
  1 AS `usuario`,
  1 AS `nombreUsuario`,
  1 AS `tipoTiempo`,
  1 AS `nombre`,
  1 AS `centroCosto`,
  1 AS `codigo`,
  1 AS `nombreCentroCosto`,
  1 AS `proyecto`,
  1 AS `nombreProyecto`,
  1 AS `proyectoSap`,
  1 AS `codigoProyectoSap`,
  1 AS `nombreProyectoSap`,
  1 AS `centroCostoSap`,
  1 AS `codigoCentroCostoSap`,
  1 AS `nombreCentroCostoSap`,
  1 AS `horas`,
  1 AS `porcentaje`,
  1 AS `fecha`,
  1 AS `semana`,
  1 AS `mes`,
  1 AS `year`,
  1 AS `observaciones`,
  1 AS `createdAt`,
  1 AS `updatedAt` */;

--
-- Temporary table structure for view `v_usuario_categoria_indicadores`
--

/*!50001 DROP VIEW IF EXISTS `v_usuario_categoria_indicadores`*/;
/*!50001 CREATE VIEW `v_usuario_categoria_indicadores` AS SELECT
 1 AS `id`,
  1 AS `nombreUsuario`,
  1 AS `area`,
  1 AS `nombreArea`,
  1 AS `createdAt`,
  1 AS `updatedAt` */;

--
-- Temporary table structure for view `v_usuario_centro_costos`
--

/*!50001 DROP VIEW IF EXISTS `v_usuario_centro_costos`*/;
/*!50001 CREATE VIEW `v_usuario_centro_costos` AS SELECT
 1 AS `id`,
  1 AS `usuario`,
  1 AS `nombreUsuario`,
  1 AS `centroCosto`,
  1 AS `codigo`,
  1 AS `nombreCentroCosto`,
  1 AS `categoria`,
  1 AS `nombreCategoriaCentroCosto`,
  1 AS `createdAt`,
  1 AS `updatedAt` */;

--
-- Temporary table structure for view `v_usuario_centro_costos_sap`
--

/*!50001 DROP VIEW IF EXISTS `v_usuario_centro_costos_sap`*/;
/*!50001 CREATE VIEW `v_usuario_centro_costos_sap` AS SELECT
 1 AS `id`,
  1 AS `usuario`,
  1 AS `centroCostoSap`,
  1 AS `codigoCentroCostoSap`,
  1 AS `nombreCentroCostoSap`,
  1 AS `proyectoSap`,
  1 AS `codigoProyectoSap`,
  1 AS `nombreProyectoSap`,
  1 AS `createdAt`,
  1 AS `updatedAt` */;

--
-- Temporary table structure for view `v_usuario_subareas`
--

/*!50001 DROP VIEW IF EXISTS `v_usuario_subareas`*/;
/*!50001 CREATE VIEW `v_usuario_subareas` AS SELECT
 1 AS `id`,
  1 AS `usuario`,
  1 AS `nombreUsuario`,
  1 AS `subarea`,
  1 AS `nombreSubarea`,
  1 AS `area`,
  1 AS `nombreArea`,
  1 AS `createdAt`,
  1 AS `updatedAt` */;

--
-- Temporary table structure for view `v_usuario_subcategoria_indicadores`
--

/*!50001 DROP VIEW IF EXISTS `v_usuario_subcategoria_indicadores`*/;
/*!50001 CREATE VIEW `v_usuario_subcategoria_indicadores` AS SELECT
 1 AS `id`,
  1 AS `nombreUsuario`,
  1 AS `area`,
  1 AS `nombreArea`,
  1 AS `createdAt`,
  1 AS `updatedAt` */;

--
-- Temporary table structure for view `v_usuarios`
--

/*!50001 DROP VIEW IF EXISTS `v_usuarios`*/;
/*!50001 CREATE VIEW `v_usuarios` AS SELECT
 1 AS `id`,
  1 AS `nombre`,
  1 AS `email`,
  1 AS `telefono`,
  1 AS `rut`,
  1 AS `password`,
  1 AS `role`,
  1 AS `horas`,
  1 AS `estado`,
  1 AS `nombreEstado`,
  1 AS `zona`,
  1 AS `nombreZona`,
  1 AS `area`,
  1 AS `nombreArea`,
  1 AS `cargo`,
  1 AS `nombreCargo`,
  1 AS `img`,
  1 AS `descripcion`,
  1 AS `visualizacion`,
  1 AS `createdAt`,
  1 AS `updatedAt` */;

--
-- Table structure for table `zonas`
--

CREATE TABLE `zonas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(150) NOT NULL,
  `descripcion` text NOT NULL,
  `createdAt` date NOT NULL,
  `updatedAt` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `zonas`
--

INSERT INTO `zonas` VALUES (10,'Norte','Zona norte del Pais','2020-07-29','2020-07-29'),(20,'Metropolitana','Región metropolitana ','2020-07-29','2020-08-03'),(30,'Sur Austral','Zona Sur y Austral','2020-07-29','2020-07-29');

--
-- Final view structure for view `r_administracion_usuario_centro_costos`
--

/*!50001 DROP VIEW IF EXISTS `r_administracion_usuario_centro_costos`*/;

--
-- Final view structure for view `r_administracion_usuario_centro_costos_sap`
--

/*!50001 DROP VIEW IF EXISTS `r_administracion_usuario_centro_costos_sap`*/;

--
-- Final view structure for view `r_administracion_usuario_proyectos_sap`
--

/*!50001 DROP VIEW IF EXISTS `r_administracion_usuario_proyectos_sap`*/;

--
-- Final view structure for view `r_centro_costo_indicadores`
--

/*!50001 DROP VIEW IF EXISTS `r_centro_costo_indicadores`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `r_centro_costo_indicadores` AS select `usuarios`.`id` AS `usuario`,`usuarios`.`nombre` AS `nombre`,year(`timecontrollings`.`fecha`) AS `year`,month(`timecontrollings`.`fecha`) AS `mes`,`centro_costos`.`codigo` AS `centroCosto`,`centro_costos`.`nombre` AS `nombreCentroCosto`,`tipo_tiempos`.`color` AS `color`,round(sum(`timecontrollings`.`horas`),2) AS `horasTotales`,`timecontrollings`.`tipoTiempo` AS `indicadorControl`,`tipo_tiempos`.`nombre` AS `nombreIndicadorControl`,`timecontrollings`.`createdAt` AS `createdAt`,`timecontrollings`.`updatedAt` AS `updatedAt` from (((`usuarios` join `timecontrollings`) join `centro_costos`) join `tipo_tiempos`) where `timecontrollings`.`usuario` = `usuarios`.`id` and `timecontrollings`.`centroCosto` = `centro_costos`.`id` and `timecontrollings`.`tipoTiempo` = `tipo_tiempos`.`id` group by `timecontrollings`.`usuario`,year(`timecontrollings`.`fecha`),month(`timecontrollings`.`fecha`),`timecontrollings`.`centroCosto`,`tipo_tiempos`.`id` order by `timecontrollings`.`usuario` desc */;

--
-- Final view structure for view `r_gerencia_cat_centro_costo_mes`
--

/*!50001 DROP VIEW IF EXISTS `r_gerencia_cat_centro_costo_mes`*/;

--
-- Final view structure for view `r_gerencia_centro_costo_mes`
--

/*!50001 DROP VIEW IF EXISTS `r_gerencia_centro_costo_mes`*/;

--
-- Final view structure for view `r_gerencia_centro_costo_proyectos_sap_mes`
--

/*!50001 DROP VIEW IF EXISTS `r_gerencia_centro_costo_proyectos_sap_mes`*/;

--
-- Final view structure for view `r_gerencia_tipo_tiempo_mes`
--

/*!50001 DROP VIEW IF EXISTS `r_gerencia_tipo_tiempo_mes`*/;

--
-- Final view structure for view `r_gerencia_usuario_areas`
--

/*!50001 DROP VIEW IF EXISTS `r_gerencia_usuario_areas`*/;

--
-- Final view structure for view `r_proyecto_indicadores`
--

/*!50001 DROP VIEW IF EXISTS `r_proyecto_indicadores`*/;

--
-- Final view structure for view `r_proyecto_meses`
--

/*!50001 DROP VIEW IF EXISTS `r_proyecto_meses`*/;

--
-- Final view structure for view `r_proyecto_usuarios`
--

/*!50001 DROP VIEW IF EXISTS `r_proyecto_usuarios`*/;

--
-- Final view structure for view `r_proyectos`
--

/*!50001 DROP VIEW IF EXISTS `r_proyectos`*/;

--
-- Final view structure for view `r_timecontrollings`
--

/*!50001 DROP VIEW IF EXISTS `r_timecontrollings`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `r_timecontrollings` AS select `usuarios`.`id` AS `id`,`usuarios`.`nombre` AS `nombre`,`timecontrollings`.`fecha` AS `fecha`,`categoria_centro_costos`.`id` AS `categoriaCentroCosto`,`categoria_centro_costos`.`nombre` AS `nombreCategoriaCentroCosto`,`centro_costos`.`codigo` AS `centroCosto`,`centro_costos`.`nombre` AS `nombreCentroCosto`,round(sum(`timecontrollings`.`horas`),2) AS `horasTotales`,round(sum(`timecontrollings`.`horas`) * 100 / `usuarios`.`horas`,1) AS `porcentaje`,`timecontrollings`.`tipoTiempo` AS `indicadorControl`,`tipo_tiempos`.`nombre` AS `nombreIndicadorControl`,`areas`.`id` AS `areaGerencia`,`areas`.`nombre` AS `nombreAreaGerencia`,year(`timecontrollings`.`fecha`) AS `year`,month(`timecontrollings`.`fecha`) AS `mes`,`timecontrollings`.`observaciones` AS `observaciones`,`timecontrollings`.`createdAt` AS `createdAt`,`timecontrollings`.`updatedAt` AS `updatedAt` from (((((`usuarios` join `timecontrollings`) join `centro_costos`) join `tipo_tiempos`) join `categoria_centro_costos`) join `areas`) where `timecontrollings`.`usuario` = `usuarios`.`id` and `timecontrollings`.`centroCosto` = `centro_costos`.`id` and `centro_costos`.`categoria` = `categoria_centro_costos`.`id` and `usuarios`.`area` = `areas`.`id` and `timecontrollings`.`tipoTiempo` = `tipo_tiempos`.`id` group by `timecontrollings`.`usuario`,`timecontrollings`.`fecha`,`categoria_centro_costos`.`id`,`timecontrollings`.`centroCosto`,`tipo_tiempos`.`id` order by `timecontrollings`.`usuario`,`timecontrollings`.`fecha` desc */;

--
-- Final view structure for view `r_usuario_cat_centro_costo_mes`
--

/*!50001 DROP VIEW IF EXISTS `r_usuario_cat_centro_costo_mes`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `r_usuario_cat_centro_costo_mes` AS select `timecontrollings`.`id` AS `id`,`timecontrollings`.`usuario` AS `usuario`,`categoria_centro_costos`.`id` AS `catCentroCosto`,`categoria_centro_costos`.`nombre` AS `nombreCatCentroCosto`,round(sum(`timecontrollings`.`horas`),2) AS `horas`,`categoria_centro_costos`.`color` AS `color`,month(`timecontrollings`.`fecha`) AS `mes`,year(`timecontrollings`.`fecha`) AS `year`,`timecontrollings`.`createdAt` AS `createdAt`,`timecontrollings`.`updatedAt` AS `updatedAt` from ((`timecontrollings` join `centro_costos`) join `categoria_centro_costos`) where `timecontrollings`.`centroCosto` = `centro_costos`.`id` and `centro_costos`.`categoria` = `categoria_centro_costos`.`id` group by `timecontrollings`.`usuario`,`categoria_centro_costos`.`id`,month(`timecontrollings`.`fecha`),year(`timecontrollings`.`fecha`) */;

--
-- Final view structure for view `r_usuario_cat_centro_costos`
--

/*!50001 DROP VIEW IF EXISTS `r_usuario_cat_centro_costos`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `r_usuario_cat_centro_costos` AS select `timecontrollings`.`id` AS `id`,`timecontrollings`.`usuario` AS `usuario`,`categoria_centro_costos`.`id` AS `catCentroCosto`,`categoria_centro_costos`.`nombre` AS `nombreCatCentroCosto`,round(sum(`timecontrollings`.`horas`),2) AS `horas`,`timecontrollings`.`fecha` AS `fecha`,month(`timecontrollings`.`fecha`) AS `mes`,year(`timecontrollings`.`fecha`) AS `year`,`timecontrollings`.`createdAt` AS `createdAt`,`timecontrollings`.`updatedAt` AS `updatedAt` from ((`timecontrollings` join `centro_costos`) join `categoria_centro_costos`) where `timecontrollings`.`centroCosto` = `centro_costos`.`id` and `centro_costos`.`categoria` = `categoria_centro_costos`.`id` group by `timecontrollings`.`usuario`,`categoria_centro_costos`.`id`,`timecontrollings`.`fecha` */;

--
-- Final view structure for view `r_usuario_centro_costo_dia`
--

/*!50001 DROP VIEW IF EXISTS `r_usuario_centro_costo_dia`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `r_usuario_centro_costo_dia` AS select `timecontrollings`.`id` AS `id`,`usuarios`.`id` AS `usuario`,`usuarios`.`nombre` AS `nombreUsuario`,`usuarios`.`area` AS `area`,`areas`.`nombre` AS `nombreArea`,`centro_costos`.`id` AS `idCentroCosto`,`centro_costos`.`codigo` AS `codigo`,`centro_costos`.`color` AS `color`,`centro_costos`.`nombre` AS `nombreCentroCosto`,round(sum(`timecontrollings`.`horas`),2) AS `horas`,round(sum(`timecontrollings`.`porcentaje`),2) AS `porcentaje`,`timecontrollings`.`fecha` AS `fecha`,month(`timecontrollings`.`fecha`) AS `mes`,year(`timecontrollings`.`fecha`) AS `year`,`timecontrollings`.`createdAt` AS `createdAt`,`timecontrollings`.`updatedAt` AS `updatedAt` from (((`usuarios` join `centro_costos`) join `areas`) join `timecontrollings`) where `timecontrollings`.`centroCosto` = `centro_costos`.`id` and `timecontrollings`.`usuario` = `usuarios`.`id` and `usuarios`.`area` = `areas`.`id` group by `usuarios`.`id`,`centro_costos`.`id`,`timecontrollings`.`fecha`,month(`timecontrollings`.`fecha`) order by `usuarios`.`id`,`timecontrollings`.`fecha` desc */;

--
-- Final view structure for view `r_usuario_centro_costo_mes`
--

/*!50001 DROP VIEW IF EXISTS `r_usuario_centro_costo_mes`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `r_usuario_centro_costo_mes` AS select `timecontrollings`.`id` AS `id`,`timecontrollings`.`usuario` AS `usuario`,`timecontrollings`.`centroCosto` AS `centroCosto`,`centro_costos`.`nombre` AS `nombreCentroCosto`,`centro_costos`.`codigo` AS `codigo`,round(sum(`timecontrollings`.`horas`),2) AS `horas`,`centro_costos`.`color` AS `color`,month(`timecontrollings`.`fecha`) AS `mes`,year(`timecontrollings`.`fecha`) AS `year`,`timecontrollings`.`createdAt` AS `createdAt`,`timecontrollings`.`updatedAt` AS `updatedAt` from (`timecontrollings` join `centro_costos`) where `timecontrollings`.`centroCosto` = `centro_costos`.`id` group by `timecontrollings`.`usuario`,`timecontrollings`.`centroCosto`,month(`timecontrollings`.`fecha`),year(`timecontrollings`.`fecha`) */;

--
-- Final view structure for view `r_usuario_centro_costo_sap_dia`
--

/*!50001 DROP VIEW IF EXISTS `r_usuario_centro_costo_sap_dia`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `r_usuario_centro_costo_sap_dia` AS select `timecontrollings`.`id` AS `id`,`usuarios`.`id` AS `usuario`,`usuarios`.`nombre` AS `nombreUsuario`,`centro_costos_sap`.`id` AS `idCentroCostoSap`,`centro_costos_sap`.`codigo` AS `codigo`,`centro_costos_sap`.`color` AS `color`,`centro_costos_sap`.`nombre` AS `nombreCentroCosto`,round(sum(`timecontrollings`.`horas`),2) AS `horas`,round(sum(`timecontrollings`.`porcentaje`),2) AS `porcentaje`,`timecontrollings`.`fecha` AS `fecha`,month(`timecontrollings`.`fecha`) AS `mes`,year(`timecontrollings`.`fecha`) AS `year`,`timecontrollings`.`createdAt` AS `createdAt`,`timecontrollings`.`updatedAt` AS `updatedAt` from ((`usuarios` join `centro_costos_sap`) join `timecontrollings`) where `timecontrollings`.`centroCostoSap` = `centro_costos_sap`.`id` and `timecontrollings`.`usuario` = `usuarios`.`id` group by `usuarios`.`id`,`centro_costos_sap`.`id`,`timecontrollings`.`fecha`,month(`timecontrollings`.`fecha`) order by `usuarios`.`id`,`timecontrollings`.`fecha` desc */;

--
-- Final view structure for view `r_usuario_centro_costo_sap_mes`
--

/*!50001 DROP VIEW IF EXISTS `r_usuario_centro_costo_sap_mes`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `r_usuario_centro_costo_sap_mes` AS select `timecontrollings`.`id` AS `id`,`timecontrollings`.`usuario` AS `usuario`,`timecontrollings`.`centroCostoSap` AS `centroCostoSap`,`centro_costos_sap`.`nombre` AS `nombreCentroCostoSap`,`centro_costos_sap`.`codigo` AS `codigo`,round(sum(`timecontrollings`.`horas`),2) AS `horas`,`centro_costos_sap`.`color` AS `color`,month(`timecontrollings`.`fecha`) AS `mes`,year(`timecontrollings`.`fecha`) AS `year`,`timecontrollings`.`createdAt` AS `createdAt`,`timecontrollings`.`updatedAt` AS `updatedAt` from (`timecontrollings` join `centro_costos_sap`) where `timecontrollings`.`centroCostoSap` = `centro_costos_sap`.`id` group by `timecontrollings`.`usuario`,`timecontrollings`.`centroCostoSap`,month(`timecontrollings`.`fecha`),year(`timecontrollings`.`fecha`) */;

--
-- Final view structure for view `r_usuario_centro_costos`
--

/*!50001 DROP VIEW IF EXISTS `r_usuario_centro_costos`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `r_usuario_centro_costos` AS select `timecontrollings`.`id` AS `id`,`timecontrollings`.`usuario` AS `usuario`,`timecontrollings`.`centroCosto` AS `centroCosto`,`centro_costos`.`nombre` AS `nombreCentroCosto`,`centro_costos`.`codigo` AS `codigo`,round(sum(`timecontrollings`.`horas`),2) AS `horas`,`timecontrollings`.`fecha` AS `fecha`,month(`timecontrollings`.`fecha`) AS `mes`,year(`timecontrollings`.`fecha`) AS `year`,`timecontrollings`.`createdAt` AS `createdAt`,`timecontrollings`.`updatedAt` AS `updatedAt` from (`timecontrollings` join `centro_costos`) where `timecontrollings`.`centroCosto` = `centro_costos`.`id` group by `timecontrollings`.`usuario`,`timecontrollings`.`centroCosto`,`timecontrollings`.`fecha` */;

--
-- Final view structure for view `r_usuario_fechas`
--

/*!50001 DROP VIEW IF EXISTS `r_usuario_fechas`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `r_usuario_fechas` AS select `timecontrollings`.`usuario` AS `usuario`,round(sum(`timecontrollings`.`horas`),2) AS `horas`,`timecontrollings`.`fecha` AS `fecha`,month(`timecontrollings`.`fecha`) AS `mes`,year(`timecontrollings`.`fecha`) AS `year`,`timecontrollings`.`createdAt` AS `createdAt`,`timecontrollings`.`updatedAt` AS `updatedAt` from `timecontrollings` group by `timecontrollings`.`usuario`,`timecontrollings`.`fecha` */;

--
-- Final view structure for view `r_usuario_hora_mes`
--

/*!50001 DROP VIEW IF EXISTS `r_usuario_hora_mes`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `r_usuario_hora_mes` AS select `r_usuario_fechas`.`usuario` AS `usuario`,round(sum(`r_usuario_fechas`.`horas`),2) AS `horas`,`r_usuario_fechas`.`mes` AS `mes`,`r_usuario_fechas`.`year` AS `year`,`r_usuario_fechas`.`createdAt` AS `createdAt`,`r_usuario_fechas`.`updatedAt` AS `updatedAt` from `r_usuario_fechas` group by `r_usuario_fechas`.`usuario`,`r_usuario_fechas`.`year`,`r_usuario_fechas`.`mes` */;

--
-- Final view structure for view `r_usuario_proyecto_sap_dia`
--

/*!50001 DROP VIEW IF EXISTS `r_usuario_proyecto_sap_dia`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `r_usuario_proyecto_sap_dia` AS select `timecontrollings`.`id` AS `id`,`usuarios`.`id` AS `usuario`,`usuarios`.`nombre` AS `nombreUsuario`,`centro_costos_sap`.`id` AS `idCentroCostoSap`,`centro_costos_sap`.`codigo` AS `codigo`,`centro_costos_sap`.`color` AS `color`,`centro_costos_sap`.`nombre` AS `nombreCentroCosto`,`proyectos_sap`.`id` AS `idProyectoSap`,`proyectos_sap`.`codigo` AS `codigoProyectoSap`,`proyectos_sap`.`descripcion` AS `nombreProyectoSap`,round(sum(`timecontrollings`.`horas`),2) AS `horas`,round(sum(`timecontrollings`.`porcentaje`),2) AS `porcentaje`,`timecontrollings`.`fecha` AS `fecha`,month(`timecontrollings`.`fecha`) AS `mes`,year(`timecontrollings`.`fecha`) AS `year`,`timecontrollings`.`createdAt` AS `createdAt`,`timecontrollings`.`updatedAt` AS `updatedAt` from (((`usuarios` join `centro_costos_sap`) join `timecontrollings`) join `proyectos_sap`) where `timecontrollings`.`centroCostoSap` = `centro_costos_sap`.`id` and `timecontrollings`.`usuario` = `usuarios`.`id` and `timecontrollings`.`proyectoSap` = `proyectos_sap`.`id` group by `usuarios`.`id`,`centro_costos_sap`.`id`,`proyectos_sap`.`id`,`timecontrollings`.`fecha`,month(`timecontrollings`.`fecha`),year(`timecontrollings`.`fecha`) order by `usuarios`.`id`,`timecontrollings`.`fecha` desc */;

--
-- Final view structure for view `r_usuario_tipo_tiempo_mes`
--

/*!50001 DROP VIEW IF EXISTS `r_usuario_tipo_tiempo_mes`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `r_usuario_tipo_tiempo_mes` AS select `timecontrollings`.`id` AS `id`,`timecontrollings`.`usuario` AS `usuario`,`timecontrollings`.`tipoTiempo` AS `tipoTiempo`,`tipo_tiempos`.`nombre` AS `nombreTipoTiempo`,round(sum(`timecontrollings`.`horas`),2) AS `horas`,`tipo_tiempos`.`color` AS `color`,month(`timecontrollings`.`fecha`) AS `mes`,year(`timecontrollings`.`fecha`) AS `year`,`timecontrollings`.`createdAt` AS `createdAt`,`timecontrollings`.`updatedAt` AS `updatedAt` from (`timecontrollings` join `tipo_tiempos`) where `timecontrollings`.`tipoTiempo` = `tipo_tiempos`.`id` group by `timecontrollings`.`usuario`,`timecontrollings`.`tipoTiempo`,month(`timecontrollings`.`fecha`),year(`timecontrollings`.`fecha`) */;

--
-- Final view structure for view `r_usuario_tipo_tiempos`
--

/*!50001 DROP VIEW IF EXISTS `r_usuario_tipo_tiempos`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `r_usuario_tipo_tiempos` AS select `timecontrollings`.`usuario` AS `usuario`,`timecontrollings`.`tipoTiempo` AS `tipoTiempo`,`tipo_tiempos`.`nombre` AS `nombreTipoTiempo`,round(sum(`timecontrollings`.`horas`),2) AS `horas`,`timecontrollings`.`fecha` AS `fecha`,month(`timecontrollings`.`fecha`) AS `mes`,year(`timecontrollings`.`fecha`) AS `year`,`timecontrollings`.`createdAt` AS `createdAt`,`timecontrollings`.`updatedAt` AS `updatedAt` from (`timecontrollings` join `tipo_tiempos`) where `timecontrollings`.`tipoTiempo` = `tipo_tiempos`.`id` group by `timecontrollings`.`usuario`,`timecontrollings`.`tipoTiempo`,`timecontrollings`.`fecha` */;

--
-- Final view structure for view `v_autorizaciones`
--

/*!50001 DROP VIEW IF EXISTS `v_autorizaciones`*/;

--
-- Final view structure for view `v_categoria_indicadores`
--

/*!50001 DROP VIEW IF EXISTS `v_categoria_indicadores`*/;

--
-- Final view structure for view `v_centro_costos`
--

/*!50001 DROP VIEW IF EXISTS `v_centro_costos`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `v_centro_costos` AS select `centro_costos`.`id` AS `id`,`centro_costos`.`categoria` AS `categoria`,`categoria_centro_costos`.`nombre` AS `nombreCategoria`,`centro_costos`.`codigo` AS `codigo`,`centro_costos`.`nombre` AS `nombre`,`centro_costos`.`estado` AS `estado`,`estados`.`nombre` AS `nombreEstado`,`centro_costos`.`color` AS `color`,`centro_costos`.`createdAt` AS `createdAt`,`centro_costos`.`updatedAt` AS `updatedAt` from ((`centro_costos` join `categoria_centro_costos`) join `estados`) where `centro_costos`.`categoria` = `categoria_centro_costos`.`id` and `centro_costos`.`estado` = `estados`.`id` */;

--
-- Final view structure for view `v_feriados`
--

/*!50001 DROP VIEW IF EXISTS `v_feriados`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `v_feriados` AS select `feriados`.`id` AS `id`,`feriados`.`fecha` AS `fecha`,`feriados`.`descripcion` AS `descripcion`,month(`feriados`.`fecha`) AS `mes`,year(`feriados`.`fecha`) AS `year`,`feriados`.`createdAt` AS `createdAt`,`feriados`.`updatedAt` AS `updatedAt` from `feriados` order by `feriados`.`fecha` desc */;

--
-- Final view structure for view `v_presupuesto_indicadores`
--

/*!50001 DROP VIEW IF EXISTS `v_presupuesto_indicadores`*/;

--
-- Final view structure for view `v_proyectos`
--

/*!50001 DROP VIEW IF EXISTS `v_proyectos`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `v_proyectos` AS select `proyectos`.`id` AS `id`,`proyectos`.`centroCosto` AS `centroCosto`,`centro_costos`.`nombre` AS `nombreCentroCosto`,`centro_costos`.`codigo` AS `codigo`,`proyectos`.`estado` AS `estado`,`estados`.`nombre` AS `nombreEstado`,`proyectos`.`area` AS `area`,`areas`.`nombre` AS `nombreArea`,`proyectos`.`nombre` AS `nombre`,`proyectos`.`descripcion` AS `descripcion`,`proyectos`.`createdAt` AS `createdAt`,`proyectos`.`updatedAt` AS `updatedAt` from (((`proyectos` join `areas`) join `estados`) join `centro_costos`) where `proyectos`.`centroCosto` = `centro_costos`.`id` and `proyectos`.`estado` = `estados`.`id` and `proyectos`.`area` = `areas`.`id` and `proyectos`.`id` > 0 order by `proyectos`.`id` desc */;

--
-- Final view structure for view `v_proyectos_sap`
--

/*!50001 DROP VIEW IF EXISTS `v_proyectos_sap`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `v_proyectos_sap` AS select `proyectos_sap`.`id` AS `id`,`proyectos_sap`.`codigo` AS `codigoProyectoSap`,`proyectos_sap`.`centroCostoSap` AS `centroCostoSap`,`centro_costos_sap`.`codigo` AS `codigoCentroCostoSap`,`centro_costos_sap`.`nombre` AS `nombreCentroCostoSap`,`proyectos_sap`.`descripcion` AS `descripcion`,`proyectos_sap`.`estado` AS `estado`,`estados`.`nombre` AS `nombreEstado`,`proyectos_sap`.`createdAt` AS `createdAt`,`proyectos_sap`.`updatedAt` AS `updatedAt` from ((`proyectos_sap` join `centro_costos_sap`) join `estados`) where `proyectos_sap`.`centroCostoSap` = `centro_costos_sap`.`id` and `proyectos_sap`.`estado` = `estados`.`id` */;

--
-- Final view structure for view `v_subareas`
--

/*!50001 DROP VIEW IF EXISTS `v_subareas`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `v_subareas` AS select `subareas`.`id` AS `id`,`subareas`.`nombre` AS `nombre`,`subareas`.`area` AS `area`,`areas`.`nombre` AS `nombreArea`,`subareas`.`descripcion` AS `descripcion`,`subareas`.`createdAt` AS `createdAt`,`subareas`.`updatedAt` AS `updatedAt` from (`subareas` join `areas`) where `subareas`.`area` = `areas`.`id` */;

--
-- Final view structure for view `v_subcategoria_indicadores`
--

/*!50001 DROP VIEW IF EXISTS `v_subcategoria_indicadores`*/;

--
-- Final view structure for view `v_timecontrollings`
--

/*!50001 DROP VIEW IF EXISTS `v_timecontrollings`*/;

--
-- Final view structure for view `v_usuario_categoria_indicadores`
--

/*!50001 DROP VIEW IF EXISTS `v_usuario_categoria_indicadores`*/;

--
-- Final view structure for view `v_usuario_centro_costos`
--

/*!50001 DROP VIEW IF EXISTS `v_usuario_centro_costos`*/;

--
-- Final view structure for view `v_usuario_centro_costos_sap`
--

/*!50001 DROP VIEW IF EXISTS `v_usuario_centro_costos_sap`*/;

--
-- Final view structure for view `v_usuario_subareas`
--

/*!50001 DROP VIEW IF EXISTS `v_usuario_subareas`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `v_usuario_subareas` AS select `usuario_subareas`.`id` AS `id`,`usuario_subareas`.`usuario` AS `usuario`,`usuarios`.`nombre` AS `nombreUsuario`,`usuario_subareas`.`subarea` AS `subarea`,`subareas`.`nombre` AS `nombreSubarea`,`areas`.`id` AS `area`,`areas`.`nombre` AS `nombreArea`,`usuario_subareas`.`createdAt` AS `createdAt`,`usuario_subareas`.`updatedAt` AS `updatedAt` from (((`usuarios` join `areas`) join `subareas`) join `usuario_subareas`) where `usuario_subareas`.`usuario` = `usuarios`.`id` and `usuario_subareas`.`subarea` = `subareas`.`id` and `subareas`.`area` = `areas`.`id` order by `usuarios`.`nombre` */;

--
-- Final view structure for view `v_usuario_subcategoria_indicadores`
--

/*!50001 DROP VIEW IF EXISTS `v_usuario_subcategoria_indicadores`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `v_usuario_subcategoria_indicadores` AS select distinct `usuarios`.`id` AS `id`,`usuarios`.`nombre` AS `nombreUsuario`,`areas`.`id` AS `area`,`areas`.`nombre` AS `nombreArea`,`usuarios`.`createdAt` AS `createdAt`,`usuarios`.`updatedAt` AS `updatedAt` from ((`usuarios` join `areas`) join `subcategoria_indicadores`) where `usuarios`.`area` = `areas`.`id` and `subcategoria_indicadores`.`responsable` = `usuarios`.`id` and `usuarios`.`id` <> 1 order by `usuarios`.`nombre` */;

--
-- Final view structure for view `v_usuarios`
--

/*!50001 DROP VIEW IF EXISTS `v_usuarios`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `v_usuarios` AS select `usuarios`.`id` AS `id`,`usuarios`.`nombre` AS `nombre`,`usuarios`.`email` AS `email`,`usuarios`.`telefono` AS `telefono`,`usuarios`.`rut` AS `rut`,`usuarios`.`password` AS `password`,`usuarios`.`role` AS `role`,`usuarios`.`horas` AS `horas`,`usuarios`.`estado` AS `estado`,`estados`.`nombre` AS `nombreEstado`,`usuarios`.`zona` AS `zona`,`zonas`.`nombre` AS `nombreZona`,`usuarios`.`area` AS `area`,`areas`.`nombre` AS `nombreArea`,`usuarios`.`cargo` AS `cargo`,`cargos`.`nombre` AS `nombreCargo`,`usuarios`.`img` AS `img`,`usuarios`.`descripcion` AS `descripcion`,`usuarios`.`visualizacion` AS `visualizacion`,`usuarios`.`createdAt` AS `createdAt`,`usuarios`.`updatedAt` AS `updatedAt` from (((((`usuarios` join `estados`) join `zonas`) join `areas`) join `cargos`) join `roles`) where `usuarios`.`estado` = `estados`.`id` and `usuarios`.`role` = `roles`.`id` and `usuarios`.`zona` = `zonas`.`id` and `usuarios`.`area` = `areas`.`id` and `usuarios`.`cargo` = `cargos`.`id` and `usuarios`.`id` > 0 */;


