/*
 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: 24/01/2023 09:45:38
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for empleados_accesos
-- ----------------------------
DROP TABLE IF EXISTS `empleados_accesos`;
CREATE TABLE `empleados_accesos`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `empleado_id` int UNSIGNED NOT NULL,
  `empleado_jornada_laboral_id` int UNSIGNED NULL DEFAULT NULL,
  `zk_acceso_id` int UNSIGNED NOT NULL,
  `fecha_hora_acceso` datetime(0) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `created_at` datetime(0) NOT NULL,
  `updated_at` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `fk_empleados_accesos_zkacces1_idx`(`zk_acceso_id`) USING BTREE,
  INDEX `fk_empleados_accesos_empleados1_idx`(`empleado_id`) USING BTREE,
  INDEX `fk_empleados_accesos_empleados_jornadas_laborales1_idx`(`empleado_jornada_laboral_id`) USING BTREE,
  CONSTRAINT `fk_empleados_accesos_empleados1` FOREIGN KEY (`empleado_id`) REFERENCES `empleados` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_empleados_accesos_empleados_jornadas_laborales1` FOREIGN KEY (`empleado_jornada_laboral_id`) REFERENCES `empleados_jornadas_laborales` (`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;
