/*
 Navicat Premium Data Transfer

 Source Server         : LOCALHOST
 Source Server Type    : MySQL
 Source Server Version : 100424
 Source Host           : localhost:3306
 Source Schema         : mexibus_erp

 Target Server Type    : MySQL
 Target Server Version : 100424
 File Encoding         : 65001

 Date: 18/01/2023 16:13:27
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for empleados_incapacidades
-- ----------------------------
DROP TABLE IF EXISTS `empleados_incapacidades`;
CREATE TABLE `empleados_incapacidades`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `empleado_id` int UNSIGNED NOT NULL,
  `fecha_inicio` date NOT NULL,
  `fecha_termino` date NOT NULL,
  `tipo_paga` tinyint(1) NOT NULL COMMENT '-1 sin paga\n1 paga normal\n2 paga doble',
  `comentario` tinytext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `comentario_rechazo` tinytext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `comentario_cancelacion` tinytext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `fecha_validacion` date NULL DEFAULT NULL,
  `fecha_cancelacion` date NULL DEFAULT NULL,
  `documento_url` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `status` tinyint(1) NOT NULL COMMENT '-1. Eliminado\n1.- Solicitado\n2.- Aprobado \n3.- Rechazado\n4.- Cancelado',
  `created_at` datetime(0) NOT NULL,
  `updated_at` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `fk_empleados_incapacidades_empleados1_idx`(`empleado_id`) USING BTREE,
  CONSTRAINT `fk_empleados_incapacidades_empleados1` FOREIGN KEY (`empleado_id`) REFERENCES `empleados` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
