/*
 Navicat Premium Data Transfer

 Source Server         : local
 Source Server Type    : MySQL
 Source Server Version : 100432 (10.4.32-MariaDB)
 Source Host           : localhost:3306
 Source Schema         : siadi_ucayali

 Target Server Type    : MySQL
 Target Server Version : 100432 (10.4.32-MariaDB)
 File Encoding         : 65001

 Date: 19/03/2025 21:46:46
*/


-- ----------------------------
-- Table structure for archivadores_campos
-- ----------------------------
CREATE TABLE `archivadores_campos`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `campo_nombre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `campo_tipo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `archivador_id` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `archivadores_campos_archivador_id_foreign`(`archivador_id` ASC) USING BTREE,
  CONSTRAINT `archivadores_campos_archivador_id_foreign` FOREIGN KEY (`archivador_id`) REFERENCES `archivadors` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of archivadores_campos
-- ----------------------------

-- ----------------------------
-- Table structure for archivadors
-- ----------------------------
CREATE TABLE `archivadors`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `nombre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `carpeta_id` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `archivadors_carpeta_id_foreign`(`carpeta_id` ASC) USING BTREE,
  CONSTRAINT `archivadors_carpeta_id_foreign` FOREIGN KEY (`carpeta_id`) REFERENCES `carpetas` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of archivadors
-- ----------------------------

-- ----------------------------
-- Table structure for carpetas
-- ----------------------------
CREATE TABLE `carpetas`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `nombre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `anio` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `oficina_id` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `carpetas_oficina_id_foreign`(`oficina_id` ASC) USING BTREE,
  CONSTRAINT `carpetas_oficina_id_foreign` FOREIGN KEY (`oficina_id`) REFERENCES `oficinas` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of carpetas
-- ----------------------------

-- ----------------------------
-- Table structure for compartidos
-- ----------------------------
CREATE TABLE `compartidos`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `usuario_id` bigint UNSIGNED NOT NULL,
  `documento_id` bigint UNSIGNED NOT NULL,
  `fecha_limite` date NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `compartidos_usuario_id_foreign`(`usuario_id` ASC) USING BTREE,
  INDEX `compartidos_documento_id_foreign`(`documento_id` ASC) USING BTREE,
  CONSTRAINT `compartidos_documento_id_foreign` FOREIGN KEY (`documento_id`) REFERENCES `documentos` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
  CONSTRAINT `compartidos_usuario_id_foreign` FOREIGN KEY (`usuario_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of compartidos
-- ----------------------------

-- ----------------------------
-- Table structure for defunciones
-- ----------------------------
CREATE TABLE `defunciones`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `numero_acta` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `fecha_defuncion` date NOT NULL,
  `dni_defuncion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nombres_defuncion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `distrito_defuncion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `provincia_defuncion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `departamento_defuncion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `path_documento` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `centro_poblado` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of defunciones
-- ----------------------------

-- ----------------------------
-- Table structure for documentos
-- ----------------------------
CREATE TABLE `documentos`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `tipo_archivador` enum('Informes Emitidos','Informes Recibidos','Memorándums Emitidos','Memorándums Recibidos','Oficios','Cartas','Resolución de Gerencia Municipal','Resolución de Alcaldía','Ordenanza Municipal','Decretos de Alcaldía','Directivas','Comprobantes de Pago','Expedientes','Licencias de Construcción Emitidas','Parámetros Urbanísticos','Ordenes de Compra','Ordenes de Servicio','Adjudicaciones Simplificadas','Contratos de Locación de Servicios','Contratos de Servicio','Alquiler de Vehículos','Recibos de Ingreso','Convenios','Opiniones Legales','Proyectos','Inventario Patrimonio') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `oficina_id` bigint UNSIGNED NOT NULL,
  `oficina_id_actual` bigint UNSIGNED NULL DEFAULT NULL,
  `numero_documento` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `fecha_documento` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `numero_folios` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `descripcion_documento` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `color_archivador` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `numero_archivador` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `path_documento` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `anio_documento` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `numero_tomo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `documentos_oficina_id_foreign`(`oficina_id` ASC) USING BTREE,
  INDEX `documentos_oficina_id_actual_foreign`(`oficina_id_actual` ASC) USING BTREE,
  CONSTRAINT `documentos_oficina_id_actual_foreign` FOREIGN KEY (`oficina_id_actual`) REFERENCES `oficinas` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `documentos_oficina_id_foreign` FOREIGN KEY (`oficina_id`) REFERENCES `oficinas` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 38 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of documentos
-- ----------------------------

-- ----------------------------
-- Table structure for empleados
-- ----------------------------
CREATE TABLE `empleados`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `nombre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `paterno` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `materno` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `documento` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `celular` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `correo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `direccion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `path_foto` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of empleados
-- ----------------------------
INSERT INTO `empleados` VALUES (1, 'FREDDY WALTER', 'HUAYNAPATA', 'UCHARICO', '73744393', '9852354512', 'ue308@gmail.com', 'JR.  31 DE MARZO', 'DSF', '2024-08-01 10:48:03', '2024-08-01 15:50:15');

-- ----------------------------
-- Table structure for entidades
-- ----------------------------
CREATE TABLE `entidades`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `nombre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `direccion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `correo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `telefono` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `ruc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `path_logo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `path_anexos` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `path_oficios` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `path_reportes` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `representante` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nombre_anio` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of entidades
-- ----------------------------
INSERT INTO `entidades` VALUES (1, 'Municipalidad Provincial de Ucayali', 'Jr. Mariscal Castilla esquina Calle Amazonas. Contamana - Loreto - Ucayali - Contamana - Perú', 'imagen@muniucayali.gob.pe', '958052498', '20147142197', 'storage/logo/1742437577_1.png', 'SDF', 'FDSF', 'DFSD', 'DSFS', 'SDF', '2024-08-01 10:47:38', '2025-03-19 21:27:42');

-- ----------------------------
-- Table structure for failed_jobs
-- ----------------------------
CREATE TABLE `failed_jobs`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `failed_jobs_uuid_unique`(`uuid` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of failed_jobs
-- ----------------------------

-- ----------------------------
-- Table structure for informes
-- ----------------------------
CREATE TABLE `informes`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `numero` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `anio` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `folios` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tipo` enum('Emitidos','Recibidos') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `fecha` date NOT NULL,
  `path_documento` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `oficina_id` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `informes_oficina_id_foreign`(`oficina_id` ASC) USING BTREE,
  CONSTRAINT `informes_oficina_id_foreign` FOREIGN KEY (`oficina_id`) REFERENCES `oficinas` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of informes
-- ----------------------------

-- ----------------------------
-- Table structure for libros_defunciones
-- ----------------------------
CREATE TABLE `libros_defunciones`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `numero_certificado` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `fecha_certificado` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `dni_defuncion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nombres_defuncion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `distrito_defuncion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `provincia_defuncion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `departamento_defuncion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `path_documento` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `centro_poblado` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of libros_defunciones
-- ----------------------------

-- ----------------------------
-- Table structure for libros_matrimonios
-- ----------------------------
CREATE TABLE `libros_matrimonios`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `numero_acta` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `fecha_acta` date NOT NULL,
  `fecha_nacimiento_esposo` date NOT NULL,
  `fecha_nacimiento_esposa` date NOT NULL,
  `dni_esposo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `dni_esposa` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nombres_esposo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nombres_esposa` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `lugar_matrimonio` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `direccion_esposo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `direccion_esposa` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `distrito_conyuges` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `provincia_conyuges` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `departamento_conyuges` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `path_documento` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `centro_poblado` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of libros_matrimonios
-- ----------------------------

-- ----------------------------
-- Table structure for libros_nacimientos
-- ----------------------------
CREATE TABLE `libros_nacimientos`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `path_certificado` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `fecha_expediente` date NOT NULL,
  `dni_nacido` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nombres_nacido` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `lugar_nacimiento` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `dni_padre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nombres_padre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `dni_madre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nombres_madre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `direccion_padre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `direccion_madre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `distrito_padres` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `provincia_padres` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `departamento_padres` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `path_documento` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `centro_poblado` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of libros_nacimientos
-- ----------------------------

-- ----------------------------
-- Table structure for matrimonios
-- ----------------------------
CREATE TABLE `matrimonios`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `numero_acta` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `fecha_matrimonio` date NOT NULL,
  `fecha_nacimiento_esposo` date NOT NULL,
  `fecha_nacimiento_esposa` date NOT NULL,
  `dni_esposo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `dni_esposa` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nombres_esposo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nombres_esposa` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `lugar_matrimonio` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `direccion_esposo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `direccion_esposa` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `distrito_conyuges` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `provincia_conyuges` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `departamento_conyuges` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `path_documento` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `centro_poblado` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of matrimonios
-- ----------------------------

-- ----------------------------
-- Table structure for migrations
-- ----------------------------
CREATE TABLE `migrations`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of migrations
-- ----------------------------
INSERT INTO `migrations` VALUES (1, '2014_10_12_100000_create_password_reset_tokens_table', 1);
INSERT INTO `migrations` VALUES (2, '2014_10_12_100000_create_password_resets_table', 1);
INSERT INTO `migrations` VALUES (3, '2019_08_19_000000_create_failed_jobs_table', 1);
INSERT INTO `migrations` VALUES (4, '2019_12_14_000001_create_personal_access_tokens_table', 1);
INSERT INTO `migrations` VALUES (5, '2024_06_20_223708_create_oficinas_table', 1);
INSERT INTO `migrations` VALUES (6, '2024_06_20_225337_create_empleados_table', 1);
INSERT INTO `migrations` VALUES (7, '2024_06_21_201910_create_permission_tables', 1);
INSERT INTO `migrations` VALUES (8, '2024_06_25_230050_create_carpetas_table', 1);
INSERT INTO `migrations` VALUES (9, '2024_06_26_165211_create_archivadors_table', 1);
INSERT INTO `migrations` VALUES (10, '2024_06_27_020720_create_archivadores_campos_table', 1);
INSERT INTO `migrations` VALUES (11, '2024_06_29_221813_create_oficios_table', 1);
INSERT INTO `migrations` VALUES (12, '2024_07_09_014506_create_informes_table', 1);
INSERT INTO `migrations` VALUES (13, '2024_07_22_160043_create_documentos_table', 1);
INSERT INTO `migrations` VALUES (14, '2024_07_23_033219_create_tipos_archivadores_table', 1);
INSERT INTO `migrations` VALUES (15, '2024_07_23_144548_create_nacimientos_table', 1);
INSERT INTO `migrations` VALUES (16, '2024_07_23_192925_create_matrimonios_table', 1);
INSERT INTO `migrations` VALUES (17, '2024_07_23_211350_create_defunciones_table', 1);
INSERT INTO `migrations` VALUES (18, '2024_07_24_005542_create_libros_nacimientos_table', 1);
INSERT INTO `migrations` VALUES (19, '2024_07_24_025227_create_libros_matrimonios_table', 1);
INSERT INTO `migrations` VALUES (20, '2024_07_24_031844_create_libros_defunciones_table', 1);
INSERT INTO `migrations` VALUES (21, '2024_07_30_015241_create_entidades_table', 1);
INSERT INTO `migrations` VALUES (22, '2024_07_31_000000_create_users_table', 1);
INSERT INTO `migrations` VALUES (23, '2024_08_01_195809_create_visualizaciones_table', 2);
INSERT INTO `migrations` VALUES (24, '2024_08_04_221353_create_compartidos_table', 3);
INSERT INTO `migrations` VALUES (25, '2024_08_19_105143_create_resoluciones_directorales_table', 4);

-- ----------------------------
-- Table structure for model_has_permissions
-- ----------------------------
CREATE TABLE `model_has_permissions`  (
  `permission_id` bigint UNSIGNED NOT NULL,
  `model_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint UNSIGNED NOT NULL,
  PRIMARY KEY (`permission_id`, `model_id`, `model_type`) USING BTREE,
  INDEX `model_has_permissions_model_id_model_type_index`(`model_id` ASC, `model_type` ASC) USING BTREE,
  CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of model_has_permissions
-- ----------------------------

-- ----------------------------
-- Table structure for model_has_roles
-- ----------------------------
CREATE TABLE `model_has_roles`  (
  `role_id` bigint UNSIGNED NOT NULL,
  `model_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint UNSIGNED NOT NULL,
  PRIMARY KEY (`role_id`, `model_id`, `model_type`) USING BTREE,
  INDEX `model_has_roles_model_id_model_type_index`(`model_id` ASC, `model_type` ASC) USING BTREE,
  CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of model_has_roles
-- ----------------------------
INSERT INTO `model_has_roles` VALUES (1, 'App\\Models\\User', 1);

-- ----------------------------
-- Table structure for nacimientos
-- ----------------------------
CREATE TABLE `nacimientos`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `tipo` enum('Acta de Nacimiento','Libro de Nacimiento') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `numero_acta` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `fecha_nacimiento` date NOT NULL,
  `dni_nacido` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nombres_nacido` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `lugar_nacimiento` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `dni_padre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nombres_padre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `dni_madre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nombres_madre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `direccion_padres` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `distrito_padres` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `provincia_padres` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `departamento_padres` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `path_documento` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `centro_poblado` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of nacimientos
-- ----------------------------

-- ----------------------------
-- Table structure for oficinas
-- ----------------------------
CREATE TABLE `oficinas`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `nombre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `tipo` enum('Normal','Archivo') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Normal',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of oficinas
-- ----------------------------
INSERT INTO `oficinas` VALUES (1, 'ALCADIA', '2024-08-01 10:48:22', '2024-08-01 10:48:24', 'Normal');

-- ----------------------------
-- Table structure for oficios
-- ----------------------------
CREATE TABLE `oficios`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `numero` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `anio` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `asunto` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `fecha` date NOT NULL,
  `path_documento` date NOT NULL,
  `tipo` enum('Emitidos','Recibidos') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `archivador_id` bigint UNSIGNED NOT NULL,
  `oficina_id` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `oficios_archivador_id_foreign`(`archivador_id` ASC) USING BTREE,
  INDEX `oficios_oficina_id_foreign`(`oficina_id` ASC) USING BTREE,
  CONSTRAINT `oficios_archivador_id_foreign` FOREIGN KEY (`archivador_id`) REFERENCES `archivadors` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `oficios_oficina_id_foreign` FOREIGN KEY (`oficina_id`) REFERENCES `oficinas` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of password_resets
-- ----------------------------

-- ----------------------------
-- Table structure for permissions
-- ----------------------------
CREATE TABLE `permissions`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `permissions_name_guard_name_unique`(`name` ASC, `guard_name` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 82 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of permissions
-- ----------------------------
INSERT INTO `permissions` VALUES (35, 'Informes Emitidos', 'web', '2024-07-07 19:41:41', '2024-07-25 19:41:41');
INSERT INTO `permissions` VALUES (36, 'Informes Recibidos', 'web', '2024-07-08 19:42:01', '2024-07-25 19:42:01');
INSERT INTO `permissions` VALUES (37, 'Memorándums Emitidos', 'web', '2024-07-09 19:42:38', '2024-07-25 19:42:38');
INSERT INTO `permissions` VALUES (38, 'Memorándums Recibidos', 'web', '2024-07-10 19:42:56', '2024-07-25 19:42:56');
INSERT INTO `permissions` VALUES (39, 'Oficios', 'web', '2024-07-11 19:43:08', '2024-07-25 19:43:08');
INSERT INTO `permissions` VALUES (40, 'Cartas', 'web', '2024-07-12 19:43:20', '2024-07-25 19:43:20');
INSERT INTO `permissions` VALUES (41, 'Resolución de Gerencia Municipal', 'web', '2024-07-13 19:43:49', '2024-07-25 19:43:49');
INSERT INTO `permissions` VALUES (42, 'Resolución de Alcaldía', 'web', '2024-07-14 19:44:22', '2024-07-25 19:44:22');
INSERT INTO `permissions` VALUES (43, 'Resolución Directoral', 'web', '2024-07-15 19:44:22', '2024-07-25 19:44:22');
INSERT INTO `permissions` VALUES (44, 'Ordenanza Municipal', 'web', '2024-07-16 19:46:39', '2024-07-25 19:46:39');
INSERT INTO `permissions` VALUES (45, 'Decretos de Alcaldía', 'web', '2024-07-17 19:47:31', '2024-07-25 19:47:31');
INSERT INTO `permissions` VALUES (46, 'Directivas', 'web', '2024-07-18 19:47:53', '2024-07-25 19:47:53');
INSERT INTO `permissions` VALUES (47, 'Comprobantes de Pago', 'web', '2024-07-19 19:48:26', '2024-07-25 19:48:26');
INSERT INTO `permissions` VALUES (48, 'Expedientes', 'web', '2024-07-20 19:48:42', '2024-07-25 19:48:42');
INSERT INTO `permissions` VALUES (49, 'Licencias de Construcción Emitidas', 'web', '2024-07-21 19:49:12', '2024-07-25 19:49:12');
INSERT INTO `permissions` VALUES (50, 'Parámetros Urbanísticos', 'web', '2024-07-22 19:51:02', '2024-07-25 19:51:02');
INSERT INTO `permissions` VALUES (51, 'Ordenes de Compra', 'web', '2024-07-23 19:51:19', '2024-07-25 19:51:19');
INSERT INTO `permissions` VALUES (52, 'Ordenes de Servicio', 'web', '2024-07-24 19:51:33', '2024-07-25 19:51:33');
INSERT INTO `permissions` VALUES (53, 'Adjudicaciones Simplificadas', 'web', '2024-07-25 19:51:58', '2024-07-25 19:51:58');
INSERT INTO `permissions` VALUES (54, 'Contratos de Locación de Servicios', 'web', '2024-07-26 19:53:30', '2024-07-25 19:53:30');
INSERT INTO `permissions` VALUES (55, 'Contratos de Servicio', 'web', '2024-07-27 19:53:57', '2024-07-25 19:53:57');
INSERT INTO `permissions` VALUES (56, 'Alquiler de Vehículos', 'web', '2024-07-28 19:54:15', '2024-07-25 19:54:15');
INSERT INTO `permissions` VALUES (57, 'Recibos de Ingreso', 'web', '2024-07-29 19:54:33', '2024-07-25 19:54:33');
INSERT INTO `permissions` VALUES (58, 'Convenios', 'web', '2024-07-30 19:54:48', '2024-07-25 19:54:48');
INSERT INTO `permissions` VALUES (59, 'Opiniones Legales', 'web', '2024-07-31 19:55:06', '2024-07-25 19:55:06');
INSERT INTO `permissions` VALUES (60, 'Proyectos', 'web', '2024-08-01 19:55:17', '2024-07-25 19:55:17');
INSERT INTO `permissions` VALUES (61, 'Inventario Patrimonio', 'web', '2024-08-02 19:55:32', '2024-07-25 19:55:32');
INSERT INTO `permissions` VALUES (62, 'Buscar Documentos', 'web', '2024-08-03 15:55:40', '2024-08-01 15:55:40');
INSERT INTO `permissions` VALUES (63, 'Buscar Actas y Libros', 'web', '2024-08-04 15:55:53', '2024-08-01 15:55:53');
INSERT INTO `permissions` VALUES (64, 'Oficinas', 'web', '2024-08-05 15:56:09', '2024-08-01 15:56:09');
INSERT INTO `permissions` VALUES (65, 'Empleados', 'web', '2024-08-06 15:56:21', '2024-08-01 15:56:21');
INSERT INTO `permissions` VALUES (66, 'Cuentas', 'web', '2024-08-07 15:56:29', '2024-08-01 15:56:29');
INSERT INTO `permissions` VALUES (67, 'Roles', 'web', '2024-08-08 15:56:35', '2024-08-01 15:56:35');
INSERT INTO `permissions` VALUES (68, 'Permisos', 'web', '2024-08-09 15:56:41', '2024-08-01 15:56:41');
INSERT INTO `permissions` VALUES (69, 'Entidad', 'web', '2024-08-10 15:56:48', '2024-08-01 15:56:48');
INSERT INTO `permissions` VALUES (70, 'MultiOficinas', 'web', '2024-08-11 17:16:02', '2024-08-01 17:16:02');
INSERT INTO `permissions` VALUES (71, 'Agregar Documentos', 'web', '2024-08-12 19:48:26', '2024-08-01 19:48:26');
INSERT INTO `permissions` VALUES (72, 'Editar Documentos', 'web', '2024-08-13 19:48:36', '2024-08-01 19:48:36');
INSERT INTO `permissions` VALUES (73, 'Eliminar Documentos', 'web', '2024-08-14 15:59:07', '2024-08-01 15:59:07');
INSERT INTO `permissions` VALUES (74, 'Internar Documentos', 'web', '2024-08-15 17:24:58', '2024-08-01 17:24:58');
INSERT INTO `permissions` VALUES (75, 'Compartir Documentos', 'web', '2024-08-16 21:38:24', '2024-08-04 21:38:24');
INSERT INTO `permissions` VALUES (76, 'Visualizadores', 'web', '2024-08-17 20:02:04', '2024-08-01 20:02:04');
INSERT INTO `permissions` VALUES (77, 'Editar Empleados', 'web', '2024-08-18 22:54:54', '2024-08-01 22:54:54');
INSERT INTO `permissions` VALUES (78, 'Eliminar Empleados', 'web', '2024-08-19 22:54:43', '2024-08-01 22:54:43');
INSERT INTO `permissions` VALUES (79, 'Compartidos', 'web', '2024-08-20 22:45:36', '2024-08-04 22:45:36');
INSERT INTO `permissions` VALUES (80, 'Editar Visualizador', 'web', '2024-08-21 19:10:13', '2024-08-04 19:10:13');
INSERT INTO `permissions` VALUES (81, 'Eliminar Visualizador', 'web', '2024-08-22 19:10:21', '2024-08-04 19:10:21');

-- ----------------------------
-- Records of personal_access_tokens
-- ----------------------------

-- ----------------------------
-- Table structure for resoluciones_directorales
-- ----------------------------
CREATE TABLE `resoluciones_directorales`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `numero_rd` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `anio` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `fecha_res` date NOT NULL,
  `administrado` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `motivo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `concepto` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `observacion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `path_documento` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `usuario_up` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `fecha_up` datetime NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of resoluciones_directorales
-- ----------------------------

-- ----------------------------
-- Table structure for role_has_permissions
-- ----------------------------
CREATE TABLE `role_has_permissions`  (
  `permission_id` bigint UNSIGNED NOT NULL,
  `role_id` bigint UNSIGNED NOT NULL,
  PRIMARY KEY (`permission_id`, `role_id`) USING BTREE,
  INDEX `role_has_permissions_role_id_foreign`(`role_id` ASC) USING BTREE,
  CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
  CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of role_has_permissions
-- ----------------------------
INSERT INTO `role_has_permissions` VALUES (35, 1);
INSERT INTO `role_has_permissions` VALUES (36, 1);
INSERT INTO `role_has_permissions` VALUES (37, 1);
INSERT INTO `role_has_permissions` VALUES (38, 1);
INSERT INTO `role_has_permissions` VALUES (39, 1);
INSERT INTO `role_has_permissions` VALUES (40, 1);
INSERT INTO `role_has_permissions` VALUES (41, 1);
INSERT INTO `role_has_permissions` VALUES (42, 1);
INSERT INTO `role_has_permissions` VALUES (43, 1);
INSERT INTO `role_has_permissions` VALUES (44, 1);
INSERT INTO `role_has_permissions` VALUES (45, 1);
INSERT INTO `role_has_permissions` VALUES (46, 1);
INSERT INTO `role_has_permissions` VALUES (47, 1);
INSERT INTO `role_has_permissions` VALUES (48, 1);
INSERT INTO `role_has_permissions` VALUES (49, 1);
INSERT INTO `role_has_permissions` VALUES (50, 1);
INSERT INTO `role_has_permissions` VALUES (51, 1);
INSERT INTO `role_has_permissions` VALUES (52, 1);
INSERT INTO `role_has_permissions` VALUES (53, 1);
INSERT INTO `role_has_permissions` VALUES (54, 1);
INSERT INTO `role_has_permissions` VALUES (55, 1);
INSERT INTO `role_has_permissions` VALUES (56, 1);
INSERT INTO `role_has_permissions` VALUES (57, 1);
INSERT INTO `role_has_permissions` VALUES (58, 1);
INSERT INTO `role_has_permissions` VALUES (59, 1);
INSERT INTO `role_has_permissions` VALUES (60, 1);
INSERT INTO `role_has_permissions` VALUES (61, 1);
INSERT INTO `role_has_permissions` VALUES (62, 1);
INSERT INTO `role_has_permissions` VALUES (63, 1);
INSERT INTO `role_has_permissions` VALUES (64, 1);
INSERT INTO `role_has_permissions` VALUES (65, 1);
INSERT INTO `role_has_permissions` VALUES (66, 1);
INSERT INTO `role_has_permissions` VALUES (67, 1);
INSERT INTO `role_has_permissions` VALUES (68, 1);
INSERT INTO `role_has_permissions` VALUES (69, 1);
INSERT INTO `role_has_permissions` VALUES (71, 1);
INSERT INTO `role_has_permissions` VALUES (72, 1);
INSERT INTO `role_has_permissions` VALUES (73, 1);
INSERT INTO `role_has_permissions` VALUES (74, 1);
INSERT INTO `role_has_permissions` VALUES (75, 1);
INSERT INTO `role_has_permissions` VALUES (76, 1);
INSERT INTO `role_has_permissions` VALUES (77, 1);
INSERT INTO `role_has_permissions` VALUES (78, 1);
INSERT INTO `role_has_permissions` VALUES (79, 1);
INSERT INTO `role_has_permissions` VALUES (80, 1);
INSERT INTO `role_has_permissions` VALUES (81, 1);

-- ----------------------------
-- Table structure for roles
-- ----------------------------
CREATE TABLE `roles`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `roles_name_guard_name_unique`(`name` ASC, `guard_name` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of roles
-- ----------------------------
INSERT INTO `roles` VALUES (1, 'Administrador', 'web', '2024-08-01 10:53:17', '2024-08-01 10:53:20');

-- ----------------------------
-- Table structure for tipos_archivadores
-- ----------------------------
CREATE TABLE `tipos_archivadores`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for visualizaciones
-- ----------------------------
CREATE TABLE `visualizaciones`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `fecha_inicio` date NULL DEFAULT NULL,
  `fecha_fin` date NULL DEFAULT NULL,
  `fecha_limite` date NULL DEFAULT NULL,
  `usuario_id` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `visualizaciones_usuario_id_foreign`(`usuario_id` ASC) USING BTREE,
  CONSTRAINT `visualizaciones_usuario_id_foreign` FOREIGN KEY (`usuario_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of visualizaciones
-- ----------------------------

