--
-- Host: localhost    Database: checador3
-- ------------------------------------------------------


--
-- Table structure for table `areas`
--

CREATE TABLE `areas` (
  `id_area` int NOT NULL AUTO_INCREMENT,
  `area` char(20) DEFAULT NULL,
  `a_auxiliar` tinyint DEFAULT NULL,
  PRIMARY KEY (`id_area`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `areas`
--

INSERT INTO `areas` VALUES (1,'Pan',0),(2,'Café',0),(3,'Comedor-desayuno',0),(4,'Comedor-comida',0),(5,'Comedor-merienda',0),(6,'Comedor-bodega',0),(7,'comunes',1),(10,'Comedor-cocineros',0);

--
-- Table structure for table `becarios`
--

CREATE TABLE `becarios` (
  `id_becario` int NOT NULL AUTO_INCREMENT,
  `nombre` char(40) DEFAULT NULL,
  PRIMARY KEY (`id_becario`)
) ENGINE=InnoDB AUTO_INCREMENT=1417 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `becarios`
--

INSERT INTO `becarios` VALUES (1372,'Ricardo García'),(1373,'Estefania Romero'),(1374,'Osvaldo Lizarde'),(1375,'Mónica Carmona'),(1376,'Isaac Barrita'),(1377,'Jesús López'),(1378,'Pedro Miranda'),(1379,'Carlos Ruiz'),(1380,'Damián Adrián'),(1381,'Alondra García'),(1382,'Ivonne Vargas'),(1383,'Adrián Zamorano'),(1384,'Dorian Gutiérrez'),(1385,'Dulce Contreras'),(1386,'Abraham Hernández'),(1387,'Cristian Giraudo'),(1388,'Maxim Enríquez'),(1389,'Daniel Marín'),(1390,'Cristian Soria'),(1391,'Armando Hernández'),(1392,'Carlos Rosales'),(1393,'Jezer Valadez'),(1394,'Sandra Camarena'),(1395,'Karina Ortiz'),(1396,'Armando Martínez'),(1397,'Gabriel Guerrero'),(1398,'Julián Martínez'),(1399,'Vianey Andoney'),(1400,'Javan Galván'),(1401,'Rosa Isela'),(1402,'Daniela Gracia'),(1403,'Victor Herrera'),(1404,'Ángel Montiel'),(1405,'Ana María Hiranaka'),(1406,'Michelle Hernández'),(1407,'Saúl Lobato'),(1408,'Denisse Reyes'),(1409,'Miguel Galeana'),(1410,'Moisés Rodrigo'),(1411,'León Martha'),(1412,'Yaneth Andrade'),(1413,'Ángela Romero'),(1414,'Alejandro Hernández'),(1415,'Benjamín Fuentes'),(1416,'Cecilia Albinez');

--
-- Table structure for table `configuracion`
--

CREATE TABLE `configuracion` (
  `precio_desayuno` decimal(5,2) DEFAULT NULL,
  `precio_comida` decimal(5,2) DEFAULT NULL,
  `precio_merienda` decimal(5,2) DEFAULT NULL,
  `inicio_semestre` char(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `configuracion`
--

INSERT INTO `configuracion` VALUES (38.00,40.00,38.00,'2025-01-16');

--
-- Table structure for table `logins`
--

CREATE TABLE `logins` (
  `id_login` int NOT NULL AUTO_INCREMENT,
  `l_usuario` int NOT NULL,
  `l_entra` datetime DEFAULT NULL,
  `l_sale` datetime DEFAULT NULL,
  PRIMARY KEY (`id_login`)
) ENGINE=InnoDB AUTO_INCREMENT=1892 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `logins`
--

INSERT INTO `logins` VALUES (1706,3,'2024-01-22 18:37:28',NULL),(1707,3,'2024-01-22 18:43:00',NULL),(1708,3,'2024-01-24 18:00:45','2024-01-24 18:34:41'),(1709,3,'2024-01-24 18:34:49','2024-01-24 18:35:12'),(1710,3,'2024-01-25 09:16:12',NULL),(1711,3,'2024-01-26 12:18:00',NULL),(1712,3,'2024-01-27 13:02:23',NULL),(1713,3,'2024-01-29 13:24:26',NULL),(1714,3,'2024-02-01 10:34:02',NULL),(1715,3,'2024-02-06 07:11:58',NULL),(1716,3,'2024-02-06 07:21:15',NULL),(1717,3,'2024-02-06 16:18:08',NULL),(1718,3,'2024-02-08 10:20:18','2024-02-08 11:43:18'),(1719,3,'2024-02-11 09:38:08',NULL),(1720,3,'2024-02-13 11:57:13',NULL),(1721,3,'2024-02-13 15:28:32',NULL),(1722,3,'2024-02-15 11:25:52','2024-02-15 13:05:52'),(1723,3,'2024-02-15 13:08:38',NULL),(1724,3,'2024-02-17 23:09:39',NULL),(1725,3,'2024-02-18 12:24:34',NULL),(1726,3,'2024-02-19 10:23:27',NULL),(1727,3,'2024-02-22 09:39:54','2024-02-22 09:50:22'),(1728,3,'2024-02-22 09:50:34','2024-02-22 09:50:48'),(1729,3,'2024-02-22 09:50:55',NULL),(1730,3,'2024-02-24 19:23:49',NULL),(1731,3,'2024-02-26 11:21:11',NULL),(1732,3,'2024-02-29 11:31:03',NULL),(1733,3,'2024-03-01 13:16:29',NULL),(1734,3,'2024-03-06 13:04:02',NULL),(1735,3,'2024-03-07 10:35:08',NULL),(1736,3,'2024-03-10 13:30:02','2024-03-10 14:25:57'),(1737,3,'2024-03-10 20:38:25',NULL),(1738,3,'2024-03-12 08:21:20',NULL),(1739,3,'2024-03-12 14:42:34',NULL),(1740,3,'2024-03-14 11:04:07','2024-03-14 11:06:21'),(1741,3,'2024-03-14 11:06:36',NULL),(1742,3,'2024-03-18 16:46:09',NULL),(1743,3,'2024-03-19 15:49:42',NULL),(1744,3,'2024-03-21 11:23:14','2024-03-21 11:31:08'),(1745,3,'2024-03-21 11:31:19',NULL),(1746,3,'2024-03-22 06:37:12',NULL),(1747,3,'2024-03-23 17:37:25',NULL),(1748,3,'2024-03-31 08:04:33',NULL),(1749,3,'2024-04-02 11:57:34',NULL),(1750,3,'2024-04-04 09:21:57',NULL),(1751,3,'2024-04-05 11:41:01','2024-04-05 13:37:57'),(1752,3,'2024-04-10 13:36:11',NULL),(1753,3,'2024-04-11 13:50:50',NULL),(1754,3,'2024-04-12 19:50:24','2024-04-13 16:45:44'),(1755,3,'2024-04-13 16:45:50',NULL),(1756,3,'2024-04-14 20:49:08','2024-04-14 20:51:22'),(1757,3,'2024-04-15 20:04:42',NULL),(1758,3,'2024-04-17 12:39:45','2024-04-18 10:49:42'),(1759,3,'2024-04-18 10:49:47',NULL),(1760,3,'2024-04-18 20:25:13',NULL),(1761,3,'2024-06-03 16:42:48',NULL),(1762,3,'2024-06-04 18:25:58',NULL),(1763,3,'2024-06-05 19:59:31',NULL),(1764,3,'2024-06-06 17:28:43','2024-06-07 14:33:27'),(1765,3,'2024-06-07 14:33:31',NULL),(1766,3,'2024-06-08 14:41:29','2024-06-09 11:47:12'),(1767,3,'2024-06-09 11:47:17','2024-06-09 21:41:01'),(1768,3,'2024-06-10 16:24:54',NULL),(1769,3,'2024-06-12 11:31:18',NULL),(1770,3,'2024-06-25 10:05:44',NULL),(1771,3,'2024-06-26 15:31:55',NULL),(1772,3,'2024-06-27 15:38:24',NULL),(1773,3,'2024-06-28 15:54:22','2024-06-28 20:10:43'),(1774,3,'2024-06-28 20:43:34','2024-06-28 21:23:25'),(1775,3,'2024-06-28 21:44:55','2024-06-28 22:10:33'),(1776,3,'2024-06-29 03:34:18',NULL),(1777,3,'2024-07-26 14:23:53','2024-07-26 23:31:58'),(1778,3,'2024-07-26 23:32:02',NULL),(1779,3,'2024-07-27 09:07:05',NULL),(1780,3,'2024-07-28 20:46:02',NULL),(1781,3,'2024-07-29 16:42:48',NULL),(1782,3,'2024-07-30 10:15:08',NULL),(1783,3,'2024-07-30 14:58:33','2024-07-30 14:59:16'),(1784,3,'2024-08-01 13:17:12','2024-08-02 11:33:54'),(1785,3,'2024-08-01 13:55:00',NULL),(1786,3,'2024-08-02 08:50:26',NULL),(1787,3,'2024-08-02 11:34:00',NULL),(1788,3,'2024-08-02 14:58:59',NULL),(1789,3,'2024-08-03 19:59:03',NULL),(1790,3,'2024-08-05 07:01:10',NULL),(1791,3,'2024-08-05 12:33:56',NULL),(1792,3,'2024-08-07 07:36:11',NULL),(1793,3,'2024-08-08 10:03:07',NULL),(1794,3,'2024-08-09 09:25:19',NULL),(1795,3,'2024-08-09 12:04:44',NULL),(1796,3,'2024-08-10 19:52:28',NULL),(1797,3,'2024-08-12 09:49:12','2024-08-13 09:32:51'),(1798,3,'2024-08-13 09:33:03',NULL),(1799,3,'2024-08-14 09:33:47',NULL),(1800,3,'2024-08-15 10:15:00',NULL),(1801,3,'2024-08-16 15:09:10',NULL),(1802,3,'2024-08-16 20:03:17','2024-08-17 09:55:34'),(1803,3,'2024-08-17 09:55:44',NULL),(1804,3,'2024-08-19 14:46:56',NULL),(1805,3,'2024-08-19 16:00:21','2024-08-19 16:01:01'),(1806,3,'2024-08-21 15:13:23',NULL),(1807,3,'2024-08-21 21:12:04',NULL),(1808,3,'2024-08-22 10:15:22','2024-08-22 15:18:13'),(1809,3,'2024-08-22 15:18:22',NULL),(1810,3,'2024-08-22 18:56:09',NULL),(1811,3,'2024-08-23 11:12:59',NULL),(1812,3,'2024-08-23 22:09:19',NULL),(1813,3,'2024-08-24 09:54:12',NULL),(1814,3,'2024-08-26 06:26:20',NULL),(1815,3,'2024-08-26 11:47:12',NULL),(1816,3,'2024-08-28 21:08:53',NULL),(1817,3,'2024-08-29 11:27:15',NULL),(1818,3,'2024-08-30 21:02:31','2024-08-31 19:58:06'),(1819,3,'2024-08-31 19:58:13',NULL),(1820,3,'2024-09-05 09:10:35',NULL),(1821,3,'2024-09-05 11:35:25',NULL),(1822,3,'2024-09-05 12:55:57',NULL),(1823,3,'2024-09-07 04:22:46','2024-09-07 20:28:20'),(1824,3,'2024-09-07 20:28:33',NULL),(1825,3,'2024-09-12 08:28:12',NULL),(1826,3,'2024-09-12 12:23:59',NULL),(1827,3,'2024-09-13 22:37:07',NULL),(1828,3,'2024-09-13 23:51:10',NULL),(1829,3,'2024-09-19 10:59:15',NULL),(1830,3,'2024-09-21 08:08:10',NULL),(1831,3,'2024-09-25 10:06:16','2024-09-25 10:46:29'),(1832,3,'2024-09-25 10:46:39',NULL),(1833,3,'2024-09-25 10:51:17',NULL),(1834,3,'2024-09-26 15:21:14',NULL),(1835,3,'2024-10-02 08:56:23',NULL),(1836,3,'2024-10-05 09:52:50',NULL),(1837,3,'2024-10-05 12:36:27',NULL),(1838,3,'2024-10-06 09:56:06',NULL),(1839,3,'2024-10-07 14:11:35',NULL),(1840,3,'2024-10-10 10:03:16',NULL),(1841,3,'2024-10-12 08:19:22',NULL),(1842,3,'2024-10-17 05:01:08',NULL),(1843,3,'2024-10-17 10:17:52',NULL),(1844,3,'2024-10-19 09:22:35',NULL),(1845,3,'2024-10-21 08:25:34',NULL),(1846,3,'2024-10-24 12:32:43',NULL),(1847,3,'2024-10-25 23:33:00',NULL),(1848,3,'2024-10-27 22:47:13',NULL),(1849,3,'2024-10-30 19:37:26',NULL),(1850,3,'2024-10-31 16:19:16',NULL),(1851,3,'2024-11-03 01:12:05',NULL),(1852,3,'2024-11-03 10:51:32','2024-11-03 10:51:41'),(1853,3,'2024-11-03 10:52:55',NULL),(1854,3,'2024-11-07 00:20:20',NULL),(1855,3,'2024-11-08 14:49:57','2024-11-09 11:17:52'),(1856,3,'2024-11-09 11:18:03',NULL),(1857,3,'2024-11-14 20:56:54',NULL),(1858,3,'2024-11-15 14:15:05',NULL),(1859,3,'2024-11-16 08:20:03',NULL),(1860,3,'2024-11-17 22:56:52','2024-11-18 21:57:56'),(1861,3,'2024-11-18 21:58:09',NULL),(1862,3,'2024-11-20 23:51:58',NULL),(1863,3,'2024-11-21 10:01:14','2024-11-21 16:13:40'),(1864,3,'2024-11-21 16:13:57','2024-11-22 15:51:11'),(1865,3,'2024-11-22 15:51:39','2024-11-22 15:52:04'),(1866,3,'2024-11-22 15:52:17','2024-11-23 09:08:30'),(1867,3,'2024-11-23 09:08:42','2024-11-24 01:23:31'),(1868,3,'2024-11-24 01:23:43','2024-11-24 01:23:51'),(1869,3,'2024-11-24 01:24:02','2024-11-24 22:57:04'),(1870,3,'2024-11-24 22:57:47',NULL),(1871,3,'2024-11-25 11:42:39',NULL),(1872,3,'2024-12-01 00:32:02',NULL),(1873,3,'2024-12-01 07:26:06','2024-12-02 06:20:00'),(1874,3,'2024-12-02 06:13:50',NULL),(1875,3,'2024-12-02 06:20:29',NULL),(1876,3,'2024-12-08 04:33:52',NULL),(1877,3,'2024-12-10 09:28:26',NULL),(1878,3,'2025-01-02 08:28:24',NULL),(1879,3,'2025-01-02 08:29:01','2025-01-02 08:29:20'),(1880,3,'2025-01-08 23:26:58',NULL),(1881,3,'2025-01-13 18:42:14',NULL),(1882,3,'2025-01-16 20:33:42','2025-01-16 21:46:27'),(1883,3,'2025-01-16 21:46:33',NULL),(1884,3,'2025-01-17 09:03:55',NULL),(1885,3,'2025-01-19 09:30:57',NULL),(1886,3,'2025-01-19 15:59:58',NULL),(1887,3,'2025-01-20 19:40:31',NULL),(1888,3,'2025-01-20 19:44:25',NULL),(1889,3,'2025-01-21 09:49:21','2025-01-22 09:17:43'),(1890,3,'2025-01-22 09:17:57',NULL),(1891,3,'2025-01-22 09:47:47',NULL);

--
-- Table structure for table `puestos`
--

CREATE TABLE `puestos` (
  `id_puesto` int NOT NULL AUTO_INCREMENT,
  `pst_id_becario` int DEFAULT NULL,
  `pst_entrada_usual` char(5) DEFAULT NULL,
  `pst_salida_usual` char(5) DEFAULT NULL,
  `pst_alta` tinyint(1) DEFAULT NULL,
  `pst_puesto` char(30) DEFAULT NULL,
  `pst_fecha_alta` date DEFAULT NULL,
  `pst_fecha_baja` date DEFAULT NULL,
  `pst_area_id` int DEFAULT NULL,
  `pst_hora` decimal(5,2) DEFAULT NULL,
  `pst_checa` tinyint(1) DEFAULT NULL,
  `pst_desayunos` int DEFAULT NULL,
  `pst_comidas` int DEFAULT NULL,
  `pst_meriendas` int DEFAULT NULL,
  PRIMARY KEY (`id_puesto`)
) ENGINE=InnoDB AUTO_INCREMENT=619 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `puestos`
--

INSERT INTO `puestos` VALUES (571,1372,'06:00','14:00',1,'Cocinero','2025-01-16',NULL,10,62.00,1,0,0,0),(572,1373,'06:00','09:00',1,'Bodega','2025-01-16',NULL,3,42.00,1,0,0,0),(573,1374,'06:00','10:00',1,'Preparación 1','2025-01-16',NULL,3,42.00,1,0,0,0),(574,1375,'06:00','11:00',1,'Preparación 2/Servicio 1','2025-01-16',NULL,3,42.00,1,0,0,0),(575,1376,'08:00','13:00',1,'Servicio 2','2025-01-16',NULL,3,42.00,1,0,0,0),(576,1377,'08:00','12:30',1,'Auxiliar Plancha/Adelantos','2025-01-16',NULL,3,42.00,1,0,0,0),(577,1378,'08:00','12:00',1,'Lavado 1','2025-01-16',NULL,3,48.00,1,0,0,0),(578,1379,'09:00','13:00',1,'Lavado 2','2025-01-16',NULL,3,48.00,1,0,0,0),(579,1380,'06:30','11:00',1,'Limpieza','2025-01-16',NULL,3,42.00,1,0,0,0),(580,1381,'08:15','12:45',1,'Caja','2025-01-16',NULL,3,42.00,1,0,0,0),(581,1382,'08:00','14:00',1,'Cocinero 1','2025-01-16',NULL,10,62.00,1,0,0,0),(582,1383,'09:00','15:00',1,'Cocinero 2','2025-01-16',NULL,10,62.00,1,0,0,0),(583,1384,'07:00','11:30',1,'Preparación 1','2025-01-16',NULL,4,42.00,1,0,0,0),(584,1385,'07:30','12:00',1,'Preparación 2','2025-01-16',NULL,4,42.00,1,0,0,0),(585,1386,'09:30','14:00',1,'Prep- Servicio','2025-01-16',NULL,4,42.00,1,0,0,0),(586,1387,'11:30','15:30',1,'Servicio 1','2025-01-16',NULL,4,42.00,1,0,0,0),(587,1388,'12:30','16:30',1,'Servicio 2','2025-01-16',NULL,4,42.00,1,0,0,0),(588,1389,'09:00','15:00',1,'Bodega','2025-01-16',NULL,4,42.00,1,0,0,0),(589,1390,'12:00','16:00',1,'Lavado 1','2025-01-16',NULL,4,48.00,1,0,0,0),(590,1391,'13:00','17:00',1,'Lavado 2','2025-01-16',NULL,4,48.00,1,0,0,0),(591,1392,'12:45','16:15',1,'Caja','2025-01-16',NULL,4,42.00,1,0,0,0),(592,1393,'12:30','15:30',1,'Limpieza','2025-01-16',NULL,4,42.00,1,0,0,0),(593,1394,'13:00','19:30',1,'Cocinera','2025-01-16',NULL,10,62.00,1,0,0,0),(594,1395,'13:30','17:30',1,'Preparación','2025-01-16',NULL,5,42.00,1,0,0,0),(595,1396,'15:00','20:00',1,'Preparación Servicio','2025-01-16',NULL,5,42.00,1,0,0,0),(596,1397,'16:30','20:30',1,'Servicio','2025-01-16',NULL,5,42.00,1,0,0,0),(597,1398,'17:00','20:00',1,'Lavado 1','2025-01-16',NULL,5,48.00,1,0,0,0),(598,1399,'18:00','21:00',1,'Lavado 2','2025-01-16',NULL,5,48.00,1,0,0,0),(599,1378,'17:30','19:30',1,'Limpieza','2025-01-16',NULL,5,42.00,1,0,0,0),(600,1400,'15:00','21:00',1,'Bodega','2025-01-16',NULL,5,42.00,1,0,0,0),(601,1401,'16:30','20:30',1,'Caja','2025-01-16',NULL,5,42.00,1,0,0,0),(602,1402,'07:15','12:00',1,'Caja 1','2025-01-16',NULL,2,42.00,1,0,0,0),(603,1403,'11:45','16:00',1,'Caja 2','2025-01-16',NULL,2,42.00,1,0,0,0),(604,1404,'15:45','20:15',1,'Caja 3','2025-01-16',NULL,2,42.00,1,0,0,0),(605,1405,'07:00','09:00',1,'Tostado','2025-01-16',NULL,2,42.00,1,0,0,0),(606,1406,'07:00','11:30',1,'Preparación 1','2025-01-16',NULL,2,42.00,1,0,0,0),(607,1407,'09:00','13:00',1,'Preparación 2','2025-01-16',NULL,2,42.00,1,0,0,0),(608,1408,'11:30','16:30',1,'Preparación 3','2025-01-16',NULL,2,42.00,1,0,0,0),(609,1409,'13:00','17:30',1,'Preparación 4','2025-01-16',NULL,2,42.00,1,0,0,0),(610,1410,'16:30','21:00',1,'Preparación 5','2025-01-16',NULL,2,42.00,1,0,0,0),(611,1411,'17:00','21:00',1,'Preparación 6','2025-01-16',NULL,2,42.00,1,0,0,0),(612,1412,'11:30','17:30',1,'Preparación 1','2025-01-16',NULL,1,42.00,1,0,0,0),(613,1413,'06:00','12:00',1,'Preparación 2','2025-01-16',NULL,1,42.00,1,0,0,0),(614,1414,'20:00','22:00',1,'Lav prof 1','2025-01-16',NULL,7,48.00,1,0,0,0),(615,1415,'20:00','22:00',1,'Lav prof 2','2025-01-16',NULL,7,48.00,1,0,0,0),(616,1410,'10:00','15:00',1,'Acomodo 1','2025-01-16',NULL,7,42.00,1,0,0,0),(617,1416,'10:00','15:00',1,'Acomodo 2','2025-01-16',NULL,7,42.00,1,0,0,0),(618,1413,'06:00','08:00',1,'programar MENU','2025-01-13',NULL,1,54.00,0,0,0,0);

--
-- Table structure for table `tarjetas`
--

CREATE TABLE `tarjetas` (
  `id_tarjeta` int NOT NULL AUTO_INCREMENT,
  `becario_id` int DEFAULT NULL,
  `entrada` datetime DEFAULT NULL,
  `salida` datetime DEFAULT NULL,
  `entrada_checada` datetime DEFAULT NULL,
  `salida_checada` datetime DEFAULT NULL,
  `tipo` char(1) DEFAULT NULL,
  `reemplazo` int DEFAULT NULL,
  `ajuste_minutos` int DEFAULT '0',
  `ajuste_faltas` int DEFAULT '0',
  `creo` int DEFAULT NULL,
  `reviso` int DEFAULT NULL,
  `aclaracion` tinytext,
  `comentario` tinytext,
  `por_hora` decimal(5,2) DEFAULT '0.00',
  `ajuste_reemplazos` int DEFAULT '0',
  `ajuste_retardos` int DEFAULT '0',
  `ajuste_no_checo_entrada` int DEFAULT '0',
  `ajuste_no_checo_salida` int DEFAULT '0',
  `estado` char(1) DEFAULT NULL,
  `checa` tinyint(1) DEFAULT NULL,
  `asistio` tinyint(1) DEFAULT NULL,
  `tar_desayunos` int DEFAULT '0',
  `tar_comidas` int DEFAULT '0',
  `tar_meriendas` int DEFAULT '0',
  `ajuste_tar_desayunos` int DEFAULT '0',
  `ajuste_tar_meriendas` int DEFAULT '0',
  `ajuste_tar_comidas` int DEFAULT '0',
  `pagar` tinyint DEFAULT '1',
  PRIMARY KEY (`id_tarjeta`)
) ENGINE=InnoDB AUTO_INCREMENT=80688 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tarjetas`
--

INSERT INTO `tarjetas` VALUES (80622,602,'2025-01-17 10:00:00','2025-01-17 14:00:00','2025-01-17 09:57:20','2025-01-17 14:02:15','N',1402,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,0,0,0,0,0,1),(80623,603,'2025-01-17 10:00:00','2025-01-17 14:00:00','2025-01-17 10:37:20','2025-01-17 14:02:45','N',1403,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,0,0,0,0,0,1),(80624,604,'2025-01-17 10:00:00','2025-01-17 14:00:00',NULL,NULL,'N',NULL,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,0,0,0,0,0,1),(80626,606,'2025-01-17 10:00:00','2025-01-17 14:00:00','2025-01-17 09:57:29','2025-01-17 14:01:23','N',1406,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,0,0,0,0,0,1),(80627,607,'2025-01-17 10:00:00','2025-01-17 14:00:00','2025-01-17 09:58:23','2025-01-17 14:01:08','N',1407,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,0,0,0,0,0,1),(80628,608,'2025-01-17 10:00:00','2025-01-17 14:00:00','2025-01-17 10:11:55','2025-01-17 14:01:57','N',1408,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,0,0,0,0,0,1),(80629,609,'2025-01-17 10:00:00','2025-01-17 14:00:00','2025-01-17 10:37:07','2025-01-17 14:03:03','N',1409,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,0,0,0,0,0,1),(80630,610,'2025-01-17 10:00:00','2025-01-17 14:00:00','2025-01-17 10:02:01','2025-01-17 14:06:18','N',1410,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,0,0,0,0,0,1),(80631,611,'2025-01-17 10:00:00','2025-01-17 14:00:00','2025-01-17 09:54:18','2025-01-17 14:02:31','N',1411,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,0,0,0,0,0,1),(80639,616,'2025-01-19 10:00:00','2025-01-19 12:00:00',NULL,'2025-01-19 13:24:33','N',1410,0,0,NULL,NULL,'No habia internet en la mañana',NULL,42.00,0,0,0,0,NULL,1,NULL,1,0,0,0,0,0,1),(80640,617,'2025-01-19 10:00:00','2025-01-19 12:00:00',NULL,'2025-01-19 13:26:15','N',1416,0,0,NULL,NULL,'No habia internet en la mañana',NULL,42.00,0,0,0,0,NULL,1,NULL,1,0,0,0,0,0,1),(80644,612,'2025-01-19 12:00:00','2025-01-19 15:00:00','2025-01-19 11:57:46','2025-01-19 15:09:04','N',1412,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80645,613,'2025-01-19 12:00:00','2025-01-19 15:00:00','2025-01-19 11:43:01','2025-01-19 15:08:45','N',1413,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80647,613,'2025-01-20 07:00:00','2025-01-20 08:00:00','2025-01-20 06:54:16','2025-01-20 08:18:53','N',1413,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,0,0,0,0,0,0,1),(80648,613,'2025-01-20 13:00:00','2025-01-20 15:00:00','2025-01-20 12:25:17','2025-01-20 16:04:13','N',1413,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80649,613,'2025-01-21 06:30:00','2025-01-21 07:30:00','2025-01-21 06:24:07','2025-01-21 19:09:36','N',1413,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,0,0,0,0,0,0,1),(80650,613,'2025-01-21 16:00:00','2025-01-21 19:00:00','2025-01-21 15:42:42','2025-01-21 19:09:05','N',1413,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80651,612,'2025-01-21 16:00:00','2025-01-21 19:00:00','2025-01-21 15:44:17','2025-01-21 19:09:15','C',1412,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80653,613,'2025-01-22 07:00:00','2025-01-22 09:00:00','2025-01-22 06:44:14','2025-01-22 13:49:58','N',1413,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,0,0,0,0,0,1),(80654,613,'2025-01-22 09:00:00','2025-01-22 13:00:00','2025-01-22 06:44:21','2025-01-22 13:50:06','C',1413,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80655,612,'2025-01-22 09:00:00','2025-01-22 13:00:00','2025-01-22 09:00:59','2025-01-22 13:47:58','C',1412,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80656,612,'2025-01-23 06:30:00','2025-01-23 08:00:00',NULL,NULL,'C',NULL,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,0,0,0,0,0,1),(80657,613,'2025-01-23 06:30:00','2025-01-23 08:00:00',NULL,NULL,'C',NULL,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,0,0,0,0,0,1),(80658,606,'2025-01-20 08:30:00','2025-01-20 13:00:00','2025-01-20 08:31:25','2025-01-20 13:00:23','C',1406,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80659,607,'2025-01-20 13:00:00','2025-01-20 17:00:00','2025-01-20 12:50:10','2025-01-20 16:46:45','C',1407,0,0,NULL,NULL,'Chequé antes pq terminé temprano los deberes :3',NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80660,602,'2025-01-20 08:45:00','2025-01-20 12:30:00','2025-01-20 08:45:01','2025-01-20 12:43:07','C',1402,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80661,603,'2025-01-20 12:15:00','2025-01-20 16:15:00','2025-01-20 12:11:33','2025-01-20 16:26:55','C',1403,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80662,618,'2025-01-16 06:00:00','2025-01-16 08:00:00','2025-01-16 06:00:00','2025-01-16 08:00:00','N',1413,0,0,NULL,NULL,NULL,NULL,54.00,0,0,0,0,NULL,0,NULL,0,0,0,0,0,0,1),(80663,618,'2025-01-16 06:00:00','2025-01-16 08:00:00','2025-01-16 06:00:00','2025-01-16 08:00:00','N',1413,0,0,NULL,NULL,NULL,NULL,54.00,0,0,0,0,NULL,0,NULL,0,0,0,0,0,0,1),(80664,618,'2025-01-23 06:00:00','2025-01-23 08:00:00','2025-01-23 06:00:00','2025-01-23 08:00:00','N',1413,0,0,NULL,NULL,NULL,NULL,54.00,0,0,0,0,NULL,0,NULL,0,0,0,0,0,0,1),(80665,608,'2025-01-21 08:30:00','2025-01-21 13:00:00','2025-01-21 08:27:47','2025-01-21 13:14:35','N',1408,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80666,609,'2025-01-21 13:00:00','2025-01-21 17:00:00','2025-01-21 13:18:02','2025-01-21 16:58:03','N',1409,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80667,602,'2025-01-21 08:45:00','2025-01-21 12:30:00','2025-01-21 08:41:59',NULL,'N',1402,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80668,604,'2025-01-21 12:15:00','2025-01-21 16:15:00','2025-01-21 12:11:47','2025-01-21 16:23:15','N',1404,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80669,604,'2025-01-21 11:00:00','2025-01-21 12:00:00','2025-01-21 10:56:47','2025-01-21 12:00:39','C',1404,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,0,0,0,0,0,0,1),(80670,610,'2025-01-22 08:30:00','2025-01-22 13:00:00',NULL,'2025-01-22 13:16:31','C',1410,0,0,NULL,NULL,'No habia tarjetas en la mañana',NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80671,603,'2025-01-22 08:45:00','2025-01-22 12:30:00',NULL,'2025-01-22 12:30:16','C',1403,0,0,NULL,NULL,'al ingresar todavía no había tarjetas,cheque mi entrada en una hoja a parte.',NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80672,611,'2025-01-22 13:00:00','2025-01-22 17:00:00','2025-01-22 12:43:02',NULL,'C',1411,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80673,604,'2025-01-22 12:15:00','2025-01-22 16:15:00','2025-01-22 12:13:49',NULL,'C',1404,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80676,616,'2025-01-22 10:00:00','2025-01-22 13:00:00',NULL,NULL,'C',NULL,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80677,617,'2025-01-22 10:00:00','2025-01-22 13:00:00','2025-01-22 10:23:47',NULL,'C',1416,0,0,NULL,NULL,NULL,NULL,42.00,0,0,0,0,NULL,1,NULL,1,1,0,0,0,0,1),(80681,581,'2025-01-22 10:00:00','2025-01-22 13:00:00','2025-01-22 10:33:14',NULL,'C',1382,0,0,NULL,NULL,NULL,NULL,62.00,0,0,0,0,NULL,1,NULL,0,0,0,0,0,0,1),(80682,582,'2025-01-22 10:00:00','2025-01-22 13:00:00','2025-01-22 09:59:07','2025-01-22 13:47:34','C',1383,0,0,NULL,NULL,NULL,NULL,62.00,0,0,0,0,NULL,1,NULL,0,0,0,0,0,0,1),(80683,571,'2025-01-22 10:00:00','2025-01-22 13:00:00','2025-01-22 09:53:27','2025-01-22 13:48:01','C',1372,0,0,NULL,NULL,'Salí a las 13:47',NULL,62.00,0,0,0,0,NULL,1,NULL,0,0,0,0,0,0,1),(80684,593,'2025-01-22 10:00:00','2025-01-22 13:00:00','2025-01-22 09:53:49','2025-01-22 13:56:22','C',1394,0,0,NULL,NULL,'La reunión terminó 13:45',NULL,62.00,0,0,0,0,NULL,1,NULL,0,0,0,0,0,0,1),(80685,572,'2025-01-22 10:00:00','2025-01-22 13:00:00','2025-01-22 10:05:46','2025-01-22 14:04:02','C',1373,0,0,NULL,NULL,'La juta duró hasta 13.47',NULL,42.00,0,0,0,0,NULL,1,NULL,1,0,1,0,0,0,1),(80686,600,'2025-01-22 10:00:00','2025-01-22 13:00:00','2025-01-22 09:38:21','2025-01-22 13:48:56','C',1400,0,0,NULL,NULL,'La junta terminó 13:45',NULL,42.00,0,0,0,0,NULL,1,NULL,1,0,1,0,0,0,1),(80687,588,'2025-01-22 10:00:00','2025-01-22 13:00:00','2025-01-22 09:54:49','2025-01-22 13:48:46','C',1389,0,0,NULL,NULL,'la junta termino 1:45',NULL,42.00,0,0,0,0,NULL,1,NULL,1,0,1,0,0,0,1);

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

CREATE TABLE `usuarios` (
  `id_usuario` int NOT NULL AUTO_INCREMENT,
  `u_nombre` char(40) NOT NULL,
  `u_clave` char(32) NOT NULL,
  `permiso` char(3) DEFAULT NULL,
  PRIMARY KEY (`id_usuario`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

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

INSERT INTO `usuarios` VALUES (1,'Eduardo','364a440226e1b575411a0e324e712d17','com'),(2,'Ken','b1a6f0b085d099ebe0b1689157357d08','tar'),(3,'comisión','5da0a92061800a3a653ad62f264011aa','com'),(4,'tarjetas','89853f6fb75f182ae87519323a42e73f','tar');

--
-- Temporary view structure for view `v_becarios_puestos`
--

/*!50001 DROP VIEW IF EXISTS `v_becarios_puestos`*/;
/*!50001 CREATE VIEW `v_becarios_puestos` AS SELECT 
 1 AS `id_puesto_becario`,
 1 AS `id_becario`,
 1 AS `nombre`,
 1 AS `area`,
 1 AS `entrada_usual`,
 1 AS `salida_usual`,
 1 AS `alta`,
 1 AS `puesto`,
 1 AS `fecha_alta`,
 1 AS `fecha_baja`,
 1 AS `area_id`,
 1 AS `hora`,
 1 AS `checa`,
 1 AS `desayunos`,
 1 AS `comidas`,
 1 AS `meriendas`,
 1 AS `area_sanciones`*/;

--
-- Temporary view structure for view `v_tarjetas`
--

/*!50001 DROP VIEW IF EXISTS `v_tarjetas`*/;
/*!50001 CREATE VIEW `v_tarjetas` AS SELECT 
 1 AS `id_tarjeta`,
 1 AS `becario_id`,
 1 AS `entrada`,
 1 AS `salida`,
 1 AS `entrada_checada`,
 1 AS `salida_checada`,
 1 AS `tipo`,
 1 AS `reemplazo`,
 1 AS `ajuste_minutos`,
 1 AS `ajuste_faltas`,
 1 AS `creo`,
 1 AS `reviso`,
 1 AS `aclaracion`,
 1 AS `comentario`,
 1 AS `por_hora`,
 1 AS `ajuste_reemplazos`,
 1 AS `ajuste_retardos`,
 1 AS `ajuste_no_checo_entrada`,
 1 AS `ajuste_no_checo_salida`,
 1 AS `estado`,
 1 AS `checa`,
 1 AS `asistio`,
 1 AS `tar_desayunos`,
 1 AS `tar_comidas`,
 1 AS `tar_meriendas`,
 1 AS `ajuste_tar_desayunos`,
 1 AS `ajuste_tar_meriendas`,
 1 AS `ajuste_tar_comidas`,
 1 AS `pagar`,
 1 AS `id_puesto`,
 1 AS `pst_id_becario`,
 1 AS `pst_entrada_usual`,
 1 AS `pst_salida_usual`,
 1 AS `pst_alta`,
 1 AS `pst_puesto`,
 1 AS `pst_fecha_alta`,
 1 AS `pst_fecha_baja`,
 1 AS `pst_area_id`,
 1 AS `pst_hora`,
 1 AS `pst_checa`,
 1 AS `pst_desayunos`,
 1 AS `pst_comidas`,
 1 AS `pst_meriendas`,
 1 AS `entrada_pago`,
 1 AS `salida_pago`,
 1 AS `no_checo_entrada`,
 1 AS `no_checo_salida`,
 1 AS `reemplazos`,
 1 AS `faltas`,
 1 AS `alimentos`*/;

--
-- Final view structure for view `v_becarios_puestos`
--

/*!50001 DROP VIEW IF EXISTS `v_becarios_puestos`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`comedor`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `v_becarios_puestos` AS select `puestos`.`id_puesto` AS `id_puesto_becario`,`becarios`.`id_becario` AS `id_becario`,`becarios`.`nombre` AS `nombre`,`areas`.`area` AS `area`,`puestos`.`pst_entrada_usual` AS `entrada_usual`,`puestos`.`pst_salida_usual` AS `salida_usual`,`puestos`.`pst_alta` AS `alta`,`puestos`.`pst_puesto` AS `puesto`,`puestos`.`pst_fecha_alta` AS `fecha_alta`,`puestos`.`pst_fecha_baja` AS `fecha_baja`,`puestos`.`pst_area_id` AS `area_id`,`puestos`.`pst_hora` AS `hora`,`puestos`.`pst_checa` AS `checa`,`puestos`.`pst_desayunos` AS `desayunos`,`puestos`.`pst_comidas` AS `comidas`,`puestos`.`pst_meriendas` AS `meriendas`,(select `areas`.`area` from (`puestos` join `areas`) where ((`becarios`.`id_becario` = `puestos`.`pst_id_becario`) and (`puestos`.`pst_area_id` = `areas`.`id_area`) and (0 = `areas`.`a_auxiliar`)) order by `areas`.`area` limit 1) AS `area_sanciones` from ((`becarios` join `puestos`) join `areas`) where ((`puestos`.`pst_id_becario` = `becarios`.`id_becario`) and (`puestos`.`pst_area_id` = `areas`.`id_area`)) */;

--
-- Final view structure for view `v_tarjetas`
--

/*!50001 DROP VIEW IF EXISTS `v_tarjetas`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`comedor`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `v_tarjetas` AS select `tarjetas`.`id_tarjeta` AS `id_tarjeta`,`tarjetas`.`becario_id` AS `becario_id`,`tarjetas`.`entrada` AS `entrada`,`tarjetas`.`salida` AS `salida`,`tarjetas`.`entrada_checada` AS `entrada_checada`,`tarjetas`.`salida_checada` AS `salida_checada`,`tarjetas`.`tipo` AS `tipo`,`tarjetas`.`reemplazo` AS `reemplazo`,`tarjetas`.`ajuste_minutos` AS `ajuste_minutos`,`tarjetas`.`ajuste_faltas` AS `ajuste_faltas`,`tarjetas`.`creo` AS `creo`,`tarjetas`.`reviso` AS `reviso`,`tarjetas`.`aclaracion` AS `aclaracion`,`tarjetas`.`comentario` AS `comentario`,`tarjetas`.`por_hora` AS `por_hora`,`tarjetas`.`ajuste_reemplazos` AS `ajuste_reemplazos`,`tarjetas`.`ajuste_retardos` AS `ajuste_retardos`,`tarjetas`.`ajuste_no_checo_entrada` AS `ajuste_no_checo_entrada`,`tarjetas`.`ajuste_no_checo_salida` AS `ajuste_no_checo_salida`,`tarjetas`.`estado` AS `estado`,`tarjetas`.`checa` AS `checa`,`tarjetas`.`asistio` AS `asistio`,`tarjetas`.`tar_desayunos` AS `tar_desayunos`,`tarjetas`.`tar_comidas` AS `tar_comidas`,`tarjetas`.`tar_meriendas` AS `tar_meriendas`,`tarjetas`.`ajuste_tar_desayunos` AS `ajuste_tar_desayunos`,`tarjetas`.`ajuste_tar_meriendas` AS `ajuste_tar_meriendas`,`tarjetas`.`ajuste_tar_comidas` AS `ajuste_tar_comidas`,`tarjetas`.`pagar` AS `pagar`,`puestos`.`id_puesto` AS `id_puesto`,`puestos`.`pst_id_becario` AS `pst_id_becario`,`puestos`.`pst_entrada_usual` AS `pst_entrada_usual`,`puestos`.`pst_salida_usual` AS `pst_salida_usual`,`puestos`.`pst_alta` AS `pst_alta`,`puestos`.`pst_puesto` AS `pst_puesto`,`puestos`.`pst_fecha_alta` AS `pst_fecha_alta`,`puestos`.`pst_fecha_baja` AS `pst_fecha_baja`,`puestos`.`pst_area_id` AS `pst_area_id`,`puestos`.`pst_hora` AS `pst_hora`,`puestos`.`pst_checa` AS `pst_checa`,`puestos`.`pst_desayunos` AS `pst_desayunos`,`puestos`.`pst_comidas` AS `pst_comidas`,`puestos`.`pst_meriendas` AS `pst_meriendas`,if((`tarjetas`.`reemplazo` is not null),if((`tarjetas`.`entrada_checada` is null),cast(`tarjetas`.`entrada` as time),if((cast(`tarjetas`.`entrada` as time) > cast(`tarjetas`.`entrada_checada` as time)),cast(`tarjetas`.`entrada` as time),cast(`tarjetas`.`entrada_checada` as time))),NULL) AS `entrada_pago`,if((`tarjetas`.`reemplazo` is not null),if((`tarjetas`.`salida_checada` is null),cast(`tarjetas`.`salida` as time),if((cast(`tarjetas`.`salida` as time) < cast(`tarjetas`.`salida_checada` as time)),cast(`tarjetas`.`salida` as time),cast(`tarjetas`.`salida_checada` as time))),NULL) AS `salida_pago`,if(((`tarjetas`.`entrada_checada` is null) and (`tarjetas`.`reemplazo` is not null)),1,0) AS `no_checo_entrada`,if(((`tarjetas`.`salida_checada` is null) and (`tarjetas`.`reemplazo` is not null)),1,0) AS `no_checo_salida`,if(((`tarjetas`.`reemplazo` <> `puestos`.`pst_id_becario`) and (`tarjetas`.`reemplazo` is not null)),1,0) AS `reemplazos`,if(((`tarjetas`.`reemplazo` is null) and (cast(`tarjetas`.`entrada` as date) <= cast(now() as date))),1,0) AS `faltas`,((((`tarjetas`.`tar_desayunos` + `tarjetas`.`ajuste_tar_desayunos`) * (select `configuracion`.`precio_desayuno` from `configuracion`)) + ((`tarjetas`.`tar_comidas` + `tarjetas`.`ajuste_tar_comidas`) * (select `configuracion`.`precio_comida` from `configuracion`))) + ((`tarjetas`.`tar_meriendas` + `tarjetas`.`ajuste_tar_meriendas`) * (select `configuracion`.`precio_merienda` from `configuracion`))) AS `alimentos` from (`tarjetas` join `puestos` on((`tarjetas`.`becario_id` = `puestos`.`id_puesto`))) */;


