--
-- Host: localhost    Database: innov936_RHH
-- ------------------------------------------------------


--
-- Table structure for table `ajustes`
--

CREATE TABLE `ajustes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `FECHA_INI` date NOT NULL,
  `FECHA_FIN` date DEFAULT NULL,
  `empleado_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_ajustes_empleados1` (`empleado_id`),
  CONSTRAINT `fk_ajustes_empleados1` FOREIGN KEY (`empleado_id`) REFERENCES `empleados` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `ajustes`
--


--
-- Table structure for table `ajustes_asignaciones`
--

CREATE TABLE `ajustes_asignaciones` (
  `asignacion_id` int(11) NOT NULL,
  `ajuste_id` int(11) NOT NULL,
  KEY `fk_asignaciones_empleados_asignaciones1` (`asignacion_id`),
  KEY `fk_asignaciones_empleados_ajustes1` (`ajuste_id`),
  CONSTRAINT `fk_asignaciones_empleados_ajustes1` FOREIGN KEY (`ajuste_id`) REFERENCES `ajustes` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
  CONSTRAINT `fk_asignaciones_empleados_asignaciones1` FOREIGN KEY (`asignacion_id`) REFERENCES `asignaciones` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `ajustes_asignaciones`
--


--
-- Table structure for table `ajustes_deducciones`
--

CREATE TABLE `ajustes_deducciones` (
  `deduccion_id` int(11) NOT NULL,
  `ajuste_id` int(11) NOT NULL,
  KEY `fk_deducciones_empleados_deducciones1` (`deduccion_id`),
  KEY `fk_deducciones_empleados_ajustes1` (`ajuste_id`),
  CONSTRAINT `fk_deducciones_empleados_ajustes1` FOREIGN KEY (`ajuste_id`) REFERENCES `ajustes` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
  CONSTRAINT `fk_deducciones_empleados_deducciones1` FOREIGN KEY (`deduccion_id`) REFERENCES `deducciones` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `ajustes_deducciones`
--


--
-- Table structure for table `asignaciones`
--

CREATE TABLE `asignaciones` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `DESCRIPCION` varchar(60) CHARACTER SET utf8 COLLATE utf8_spanish_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `asignaciones`
--

INSERT INTO `asignaciones` (`id`, `DESCRIPCION`) VALUES (1,'Prima por Reconocimiento'),(2,'Prima por Hogar'),(3,'Prima por Antigüedad'),(4,'Prima por Transporte'),(5,'Prima por Hijos'),(6,'Prima de Nivelación y Eficiencia Profesional'),(7,'Bono Nocturno'),(8,'Recargo Domingos y Dias Feriados');

--
-- Table structure for table `ausencias`
--

CREATE TABLE `ausencias` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `TIPO` varchar(45) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Remunerada , No Remunerada',
  `FECHA` date NOT NULL,
  `JUSTIFICACION` text COLLATE utf8_unicode_ci,
  `empleado_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_ausencias_empleados1` (`empleado_id`),
  CONSTRAINT `fk_ausencias_empleados1` FOREIGN KEY (`empleado_id`) REFERENCES `empleados` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `ausencias`
--


--
-- Table structure for table `cargos`
--

CREATE TABLE `cargos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `NOMBRE` varchar(45) CHARACTER SET utf8 COLLATE utf8_spanish_ci NOT NULL,
  `DESCRIPCION` varchar(45) CHARACTER SET utf8 COLLATE utf8_spanish_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `cargos`
--


--
-- Table structure for table `cestatickets`
--

CREATE TABLE `cestatickets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `FECHA_INI` date NOT NULL,
  `FECHA_FIN` date NOT NULL,
  `FECHA_ELA` datetime NOT NULL,
  `VALOR_DIARIO` decimal(19,5) NOT NULL COMMENT '50% - UNIDAD TRIBUTARIA',
  `SUELDO_MINIMO` decimal(19,5) NOT NULL,
  `BLOQUEAR` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `cestatickets`
--


--
-- Table structure for table `comerciales`
--

CREATE TABLE `comerciales` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `CANTIDAD` decimal(19,5) NOT NULL,
  `FECHA` date NOT NULL,
  `empleado_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_comerciales_empleados1` (`empleado_id`),
  CONSTRAINT `fk_comerciales_empleados1` FOREIGN KEY (`empleado_id`) REFERENCES `empleados` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `comerciales`
--


--
-- Table structure for table `contratos`
--

CREATE TABLE `contratos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `FECHA_INI` date NOT NULL,
  `FECHA_FIN` date DEFAULT NULL,
  `MODALIDAD` varchar(45) CHARACTER SET utf8 COLLATE utf8_spanish_ci NOT NULL COMMENT 'Fijo , Contratado , Eventuales',
  `departamento_id` int(11) NOT NULL,
  `cargo_id` int(11) NOT NULL,
  `empleado_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_asignaciones_departamentos1` (`departamento_id`),
  KEY `fk_asignaciones_cargos1` (`cargo_id`),
  KEY `fk_asignaciones_empleados1` (`empleado_id`),
  CONSTRAINT `fk_asignaciones_cargos1` FOREIGN KEY (`cargo_id`) REFERENCES `cargos` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_asignaciones_departamentos1` FOREIGN KEY (`departamento_id`) REFERENCES `departamentos` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_asignaciones_empleados1` FOREIGN KEY (`empleado_id`) REFERENCES `empleados` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `contratos`
--


--
-- Table structure for table `deducciones`
--

CREATE TABLE `deducciones` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `DESCRIPCION` varchar(60) CHARACTER SET utf8 COLLATE utf8_spanish_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `deducciones`
--

INSERT INTO `deducciones` (`id`, `DESCRIPCION`) VALUES (1,'S.S.O (4%)'),(2,'Régimen Prestacional de Empleo (0.50%)'),(3,'Fondo de Ahorro Obligatorio de Vivienda (FAOV) (1%)'),(4,'Fondo de Pensiones (3%)'),(5,'Caja de Ahorros'),(6,'Préstamo Caja de Ahorros'),(7,'Deducciones por Créditos Comerciales'),(8,'Deducciones por Tribunales'),(9,'Retención del Impuesto Sobre la Renta'),(10,'Ley de Vivienda y Habitat (1%)');

--
-- Table structure for table `departamentos`
--

CREATE TABLE `departamentos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `NOMBRE` varchar(60) CHARACTER SET utf8 COLLATE utf8_spanish_ci NOT NULL,
  `programa_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_departamentos_programas1` (`programa_id`),
  CONSTRAINT `fk_departamentos_programas1` FOREIGN KEY (`programa_id`) REFERENCES `programas` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `departamentos`
--


--
-- Table structure for table `detalle_cestatickets`
--

CREATE TABLE `detalle_cestatickets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `TOTAL` decimal(19,5) NOT NULL,
  `DIAS_ADICIONALES` int(11) NOT NULL,
  `DIAS_DESCONTAR` int(11) NOT NULL,
  `DIAS_LABORADOS` int(11) NOT NULL,
  `CARGO` varchar(45) COLLATE utf8_spanish_ci NOT NULL,
  `DEPARTAMENTO` varchar(45) COLLATE utf8_spanish_ci NOT NULL,
  `MODALIDAD` varchar(45) COLLATE utf8_spanish_ci NOT NULL,
  `empleado_id` int(11) NOT NULL,
  `cestaticket_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_detalle_cestatickets_cestatickets1` (`cestaticket_id`),
  KEY `fk_detalle_cestatickets_empleados1` (`empleado_id`),
  CONSTRAINT `fk_detalle_cestatickets_cestatickets1` FOREIGN KEY (`cestaticket_id`) REFERENCES `cestatickets` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
  CONSTRAINT `fk_detalle_cestatickets_empleados1` FOREIGN KEY (`empleado_id`) REFERENCES `empleados` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;

--
-- Dumping data for table `detalle_cestatickets`
--


--
-- Table structure for table `detalle_eventualidades`
--

CREATE TABLE `detalle_eventualidades` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `FECHA` date NOT NULL,
  `VALOR` decimal(19,5) NOT NULL,
  `empleado_id` int(11) NOT NULL,
  `eventualidad_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_detalle_eventualidades_empleados1` (`empleado_id`),
  KEY `fk_detalle_eventualidades_eventualidades1` (`eventualidad_id`),
  CONSTRAINT `fk_detalle_eventualidades_empleados1` FOREIGN KEY (`empleado_id`) REFERENCES `empleados` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
  CONSTRAINT `fk_detalle_eventualidades_eventualidades1` FOREIGN KEY (`eventualidad_id`) REFERENCES `eventualidades` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;

--
-- Dumping data for table `detalle_eventualidades`
--


--
-- Table structure for table `detalle_recibos`
--

CREATE TABLE `detalle_recibos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `CONCEPTO` varchar(13) COLLATE utf8_unicode_ci NOT NULL,
  `NOMBRE` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  `MONTO` decimal(19,5) NOT NULL,
  `recibo_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_detalle_recibos_recibos1` (`recibo_id`),
  CONSTRAINT `fk_detalle_recibos_recibos1` FOREIGN KEY (`recibo_id`) REFERENCES `recibos` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `detalle_recibos`
--


--
-- Table structure for table `empleados`
--

CREATE TABLE `empleados` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `NACIONALIDAD` varchar(15) COLLATE utf8_spanish_ci NOT NULL,
  `CEDULA` varchar(15) COLLATE utf8_spanish_ci NOT NULL,
  `SEXO` varchar(10) COLLATE utf8_spanish_ci NOT NULL,
  `NOMBRE` varchar(45) COLLATE utf8_spanish_ci NOT NULL,
  `APELLIDO` varchar(45) COLLATE utf8_spanish_ci NOT NULL,
  `FECHANAC` date NOT NULL,
  `INGRESO` date NOT NULL COMMENT 'FECHA DE INGRESO',
  `SALIDA` date DEFAULT NULL COMMENT 'Fecha de Salida de la empresa (Despido o otro)',
  `TELEFONO` varchar(15) COLLATE utf8_spanish_ci DEFAULT NULL,
  `CELULAR` varchar(15) COLLATE utf8_spanish_ci DEFAULT NULL,
  `DIRECCION` varchar(50) COLLATE utf8_spanish_ci DEFAULT NULL,
  `ESTADO` varchar(25) COLLATE utf8_spanish_ci DEFAULT NULL,
  `CIUDAD` varchar(20) COLLATE utf8_spanish_ci DEFAULT NULL,
  `MUNICIPIO` varchar(25) COLLATE utf8_spanish_ci DEFAULT NULL,
  `EMAIL` varchar(30) COLLATE utf8_spanish_ci DEFAULT NULL,
  `EDOCIVIL` varchar(15) COLLATE utf8_spanish_ci DEFAULT NULL COMMENT 'SOLTERO\nCASADO\nVIUDO\nDIVORCIADO\nCONCUBINATO\n',
  `ALFABETA` varchar(2) COLLATE utf8_spanish_ci DEFAULT NULL COMMENT 'SABE LEER?',
  `PRIMARIA` varchar(50) COLLATE utf8_spanish_ci DEFAULT NULL COMMENT 'DONDE ESTUDIO PRIMARIA',
  `SECUNDARIA` varchar(50) COLLATE utf8_spanish_ci DEFAULT NULL COMMENT 'DONDE ESTUDIO SCUNDARIA',
  `SUPERIOR` varchar(50) COLLATE utf8_spanish_ci DEFAULT NULL COMMENT 'DONDE CURSO ESTUDIOS UNIVERSITARIOS',
  `SANGRE` varchar(4) COLLATE utf8_spanish_ci DEFAULT NULL COMMENT 'O-\nO+\nA-\nA+\nB-\nB+\nAB-\nAB+',
  `PESO` int(11) DEFAULT NULL COMMENT 'EN KILOGRAMOS SIN DECIMALES',
  `EMFERMEDADES` varchar(100) COLLATE utf8_spanish_ci DEFAULT NULL,
  `OPERACIONES` varchar(100) COLLATE utf8_spanish_ci DEFAULT NULL,
  `ALERGICO` varchar(100) COLLATE utf8_spanish_ci DEFAULT NULL,
  `ESTATURA` int(11) DEFAULT NULL COMMENT 'ESTATURA EN CM',
  `COMPLEXION` varchar(10) COLLATE utf8_spanish_ci DEFAULT NULL COMMENT 'PEQUENA\nMEDIANA\nGRANDE',
  `TCAMISA` varchar(4) COLLATE utf8_spanish_ci DEFAULT NULL COMMENT 'TALLA CAMISA',
  `TPANTALOM` int(11) DEFAULT NULL COMMENT 'TALLA PANTALON',
  `TCALZADO` int(11) DEFAULT NULL COMMENT 'TALLA ZAPATO',
  `DISCAPACIDAD` varchar(45) COLLATE utf8_spanish_ci DEFAULT NULL,
  `NOMEMERGENCIA` varchar(45) COLLATE utf8_spanish_ci DEFAULT NULL,
  `TELEMERGECIA` varchar(11) COLLATE utf8_spanish_ci DEFAULT NULL,
  `BANCO` varchar(30) COLLATE utf8_spanish_ci DEFAULT NULL,
  `NCUENTA` varchar(30) COLLATE utf8_spanish_ci DEFAULT NULL,
  `TPAGO` varchar(10) COLLATE utf8_spanish_ci DEFAULT NULL,
  `grupo_id` int(11) NOT NULL,
  `localizacion_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_empleados_grupos1` (`grupo_id`),
  KEY `fk_empleados_localizaciones1` (`localizacion_id`),
  CONSTRAINT `fk_empleados_grupos1` FOREIGN KEY (`grupo_id`) REFERENCES `grupos` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_empleados_localizaciones1` FOREIGN KEY (`localizacion_id`) REFERENCES `localizaciones` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;

--
-- Dumping data for table `empleados`
--


--
-- Table structure for table `eventualidades`
--

CREATE TABLE `eventualidades` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `NOMBRE` varchar(60) COLLATE utf8_spanish_ci NOT NULL,
  `TIPO` varchar(45) COLLATE utf8_spanish_ci NOT NULL COMMENT 'Asignacion o Deduccion',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;

--
-- Dumping data for table `eventualidades`
--


--
-- Table structure for table `experiencias`
--

CREATE TABLE `experiencias` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ORGANISMO` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
  `CARGO` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
  `FECHA_INI` date NOT NULL,
  `FECHA_FIN` date NOT NULL,
  `OBSERVACIONES` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL,
  `empleado_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_experiencias_empleados1` (`empleado_id`),
  CONSTRAINT `fk_experiencias_empleados1` FOREIGN KEY (`empleado_id`) REFERENCES `empleados` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `experiencias`
--


--
-- Table structure for table `familiares`
--

CREATE TABLE `familiares` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `NOMBRE` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  `PARENTESCO` varchar(45) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Hijo, Hija, Padre, Madre, Hermano, Hermana',
  `DISCAPACIDAD` varchar(2) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No' COMMENT 'Si o No',
  `INSTRUCCION` varchar(45) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Ninguna',
  `FECHA` date NOT NULL,
  `FECHA_EFEC` date NOT NULL COMMENT 'Fecha en la que se hace efectivo para el sistema',
  `empleado_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_familiares_empleados1` (`empleado_id`),
  CONSTRAINT `fk_familiares_empleados1` FOREIGN KEY (`empleado_id`) REFERENCES `empleados` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `familiares`
--


--
-- Table structure for table `feriados`
--

CREATE TABLE `feriados` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `FECHA` date NOT NULL,
  `DESCRIPCION` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `feriados`
--


--
-- Table structure for table `grupos`
--

CREATE TABLE `grupos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `NOMBRE` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `grupos`
--

INSERT INTO `grupos` (`id`, `NOMBRE`) VALUES (1,'Empleado'),(2,'Obrero');

--
-- Table structure for table `historiales`
--

CREATE TABLE `historiales` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `SUELDO_BASE` decimal(19,5) NOT NULL,
  `FECHA_INI` date NOT NULL COMMENT 'Inicio ',
  `FECHA_FIN` date DEFAULT NULL COMMENT 'Fin',
  `FECHA_RET` date DEFAULT NULL COMMENT 'Fecha desde donde se va a pagar el sueldo retroactivo',
  `cargo_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_historiales_cargos1` (`cargo_id`),
  CONSTRAINT `fk_historiales_cargos1` FOREIGN KEY (`cargo_id`) REFERENCES `cargos` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `historiales`
--


--
-- Table structure for table `horas_extras`
--

CREATE TABLE `horas_extras` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `TIPO` varchar(45) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Nocturno, Domingos y Feriados',
  `FECHA` date NOT NULL,
  `COMENTARIO` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
  `empleado_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_horasextras_empleados1` (`empleado_id`),
  CONSTRAINT `fk_horasextras_empleados1` FOREIGN KEY (`empleado_id`) REFERENCES `empleados` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `horas_extras`
--


--
-- Table structure for table `islr`
--

CREATE TABLE `islr` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `PORCENTAJE` decimal(19,5) NOT NULL,
  `FECHA` date NOT NULL,
  `empleado_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_islr_empleados1` (`empleado_id`),
  CONSTRAINT `fk_islr_empleados1` FOREIGN KEY (`empleado_id`) REFERENCES `empleados` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `islr`
--


--
-- Table structure for table `localizaciones`
--

CREATE TABLE `localizaciones` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `departamento_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_localizaciones_departamentos1` (`departamento_id`),
  CONSTRAINT `fk_localizaciones_departamentos1` FOREIGN KEY (`departamento_id`) REFERENCES `departamentos` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;

--
-- Dumping data for table `localizaciones`
--


--
-- Table structure for table `nominas`
--

CREATE TABLE `nominas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `FECHA_INI` date NOT NULL,
  `FECHA_FIN` date NOT NULL,
  `QUINCENA` varchar(45) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Primera Quincena , Segunda',
  `FECHA_ELA` datetime NOT NULL COMMENT 'Fecha de Elaboracion de la nomina',
  `SUELDO_MINIMO` decimal(19,5) NOT NULL,
  `BLOQUEAR` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `nominas`
--


--
-- Table structure for table `prestamos`
--

CREATE TABLE `prestamos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `CANTIDAD` decimal(19,5) NOT NULL,
  `FECHA` date NOT NULL,
  `empleado_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_prestamos_empleados1` (`empleado_id`),
  CONSTRAINT `fk_prestamos_empleados1` FOREIGN KEY (`empleado_id`) REFERENCES `empleados` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `prestamos`
--


--
-- Table structure for table `programas`
--

CREATE TABLE `programas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `CODIGO` int(11) NOT NULL,
  `NOMBRE` varchar(45) COLLATE utf8_spanish_ci NOT NULL,
  `TIPO` varchar(45) COLLATE utf8_spanish_ci NOT NULL COMMENT 'Actividad  /  Proyecto',
  `NUMERO` int(11) NOT NULL COMMENT 'Numero de la Actividad o Proyecto',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;

--
-- Dumping data for table `programas`
--


--
-- Table structure for table `recibos`
--

CREATE TABLE `recibos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `CARGO` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
  `DEPARTAMENTO` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
  `MODALIDAD` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
  `SUELDO_BASE` decimal(19,5) DEFAULT NULL,
  `DIAS_LABORADOS` int(11) DEFAULT NULL,
  `nomina_id` int(11) NOT NULL,
  `empleado_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_recibos_nominas1` (`nomina_id`),
  KEY `fk_recibos_empleados1` (`empleado_id`),
  CONSTRAINT `fk_recibos_empleados1` FOREIGN KEY (`empleado_id`) REFERENCES `empleados` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
  CONSTRAINT `fk_recibos_nominas1` FOREIGN KEY (`nomina_id`) REFERENCES `nominas` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `recibos`
--


--
-- Table structure for table `titulos`
--

CREATE TABLE `titulos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `TITULO` varchar(45) COLLATE utf8_unicode_ci NOT NULL COMMENT 'T.S.U , Profesional Universitario , Post-Grado , Maestria , Doctorado',
  `ESPECIALIDAD` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
  `INSTITUCION` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  `FECHA` date NOT NULL,
  `empleado_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_titulos_empleados1` (`empleado_id`),
  CONSTRAINT `fk_titulos_empleados1` FOREIGN KEY (`empleado_id`) REFERENCES `empleados` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `titulos`
--


--
-- Table structure for table `tribunales`
--

CREATE TABLE `tribunales` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `CANTIDAD` decimal(19,5) NOT NULL,
  `FECHA` date NOT NULL,
  `empleado_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_tribunales_empleados1` (`empleado_id`),
  CONSTRAINT `fk_tribunales_empleados1` FOREIGN KEY (`empleado_id`) REFERENCES `empleados` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `tribunales`
--


--
-- Dumping events for database 'innov936_RHH'
--

--
-- Dumping routines for database 'innov936_RHH'
--


