/*
 Navicat Premium Data Transfer

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

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

 Date: 23/04/2024 11:35:04
*/


-- ----------------------------
-- Table structure for areas
-- ----------------------------
CREATE TABLE `areas`  (
  `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,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of areas
-- ----------------------------
INSERT INTO `areas` VALUES (1, 'AGA', '2024-04-16 14:31:44', '2024-04-16 21:00:53');

-- ----------------------------
-- Table structure for ausencias
-- ----------------------------
CREATE TABLE `ausencias`  (
  `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,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ausencias
-- ----------------------------
INSERT INTO `ausencias` VALUES (1, 'PRUBA', '2024-04-16 19:34:01', '2024-04-16 19:34:01');

-- ----------------------------
-- 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,
  `tipo` enum('Administrativo','Cesante') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `celular` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `correo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `direccion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT 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 = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of empleados
-- ----------------------------
INSERT INTO `empleados` VALUES (1, 'FREDDY WALTER', 'HUAYNAPATA', 'UCHARICO', '73744393', '', '967444616', 'freddy.hu099@gmail.com', 'JR.  31 DE MARZO', 'FSA', '2024-04-16 14:31:25', '2024-04-23 13:08:09');
INSERT INTO `empleados` VALUES (2, 'EDGAR DAVID', 'ESCOBAR', 'GINEZ', '532523523', 'Administrativo', '956960013', 'soto@gmail.com', 'Av. Colombia', 'storage/foto/1713816985_532523523.png', '2024-04-16 19:34:54', '2024-04-22 20:16:25');
INSERT INTO `empleados` VALUES (3, 'ROSARIO ROXANA', 'DE LA RIVA', 'VALLE', '7347563', 'Administrativo', '956960013', 'soto@gmail.com', 'Av. Colombia', 'storage/foto/1713807230_7347563.png', '2024-04-16 19:35:24', '2024-04-22 17:33:50');
INSERT INTO `empleados` VALUES (4, 'ROSALINDA', 'HUAYNAPATA', 'UCHARICO', '73744394', 'Administrativo', '956960013', 'soto@gmail.com', 'JR. 31 DE MARZO S/N', NULL, '2024-04-17 21:07:28', '2024-04-17 21:07:28');

-- ----------------------------
-- 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, 'UGEL YUNGUYO', 'DFSD', 'FSDF', 'DSFDS', 'FDSF', 'storage/logo/1713296056_1.png', 'DSF', 'DSFDS', 'FSD', 'DSFSD', 'FSDF', '2024-04-16 14:31:03', '2024-04-16 19:34:16');

-- ----------------------------
-- 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 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 = 13 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_01_23_170639_create_entidades_table', 1);
INSERT INTO `migrations` VALUES (6, '2024_01_23_171233_create_empleados_table', 1);
INSERT INTO `migrations` VALUES (7, '2024_04_08_171905_create_areas_table', 1);
INSERT INTO `migrations` VALUES (8, '2024_04_10_172202_create_oficinas_table', 1);
INSERT INTO `migrations` VALUES (9, '2024_04_10_214332_create_solicitantes_table', 1);
INSERT INTO `migrations` VALUES (10, '2024_04_11_171234_create_users_table', 1);
INSERT INTO `migrations` VALUES (11, '2024_04_15_161214_create_ausencias_table', 1);
INSERT INTO `migrations` VALUES (12, '2024_04_15_172239_create_vacaciones_table', 1);

-- ----------------------------
-- 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,
  `area_id` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `oficinas_area_id_foreign`(`area_id` ASC) USING BTREE,
  CONSTRAINT `oficinas_area_id_foreign` FOREIGN KEY (`area_id`) REFERENCES `areas` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of oficinas
-- ----------------------------
INSERT INTO `oficinas` VALUES (1, 'INFORMATICA', 1, '2024-04-16 14:32:00', '2024-04-16 14:32:03');
INSERT INTO `oficinas` VALUES (2, 'TRAMITE DOCUMENTARIO', 1, '2024-04-16 19:33:35', '2024-04-16 19:33:35');
INSERT INTO `oficinas` VALUES (3, 'RECURSOS HUMANOS', 1, '2024-04-16 19:33:45', '2024-04-16 19:33:45');

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

-- ----------------------------
-- Table structure for solicitantes
-- ----------------------------
CREATE TABLE `solicitantes`  (
  `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,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `direccion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of solicitantes
-- ----------------------------
INSERT INTO `solicitantes` VALUES (1, 'CARLOS ALBERTO', 'MAMANI', 'QUISPE', '012125414', '956960013', 'soto@gmail.com', NULL, '2024-04-22 22:21:15', 'AV. COLOMBIAFSDF');
INSERT INTO `solicitantes` VALUES (2, 'MARY LUZ', 'HUAYNAPATA', 'UCHARICO', '73744395', '98745412', 'soto@gmail.com', NULL, '2024-04-17 21:26:08', 'JR, PUNO');
INSERT INTO `solicitantes` VALUES (3, 'FREDDY WALTER', 'HUAYNAPATA', 'UCHARICO', '73744393', '98745412', 'soto@gmail.com', NULL, NULL, 'JR. 31 DE MARZO S/N');
INSERT INTO `solicitantes` VALUES (4, 'ROSALINDA', 'HUAYNAPATA', 'UCHARICO', '73744394', NULL, NULL, NULL, NULL, 'JR. 31 DE MARZO S/N');

-- ----------------------------
-- Table structure for vacaciones
-- ----------------------------
CREATE TABLE `vacaciones`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `solicitante_id` bigint UNSIGNED NOT NULL,
  `oficina_id` bigint UNSIGNED NULL DEFAULT NULL,
  `ausencia_id` bigint UNSIGNED NULL DEFAULT NULL,
  `num_expediente` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `asunto_expediente` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `folios` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `fecha_inicio` date NULL DEFAULT NULL,
  `fecha_fin` date NULL DEFAULT NULL,
  `cantidad` int NULL DEFAULT NULL,
  `path_doc_1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `path_doc_2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `estado` enum('PENDIENTE','APROBADO','RECHAZADO') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `delete` enum('YES','NO') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `anio` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `folios2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `vacaciones_solicitante_id_foreign`(`solicitante_id` ASC) USING BTREE,
  INDEX `vacaciones_oficina_id_foreign`(`oficina_id` ASC) USING BTREE,
  INDEX `vacaciones_ausencia_id_foreign`(`ausencia_id` ASC) USING BTREE,
  CONSTRAINT `vacaciones_ausencia_id_foreign` FOREIGN KEY (`ausencia_id`) REFERENCES `ausencias` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `vacaciones_oficina_id_foreign` FOREIGN KEY (`oficina_id`) REFERENCES `oficinas` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `vacaciones_solicitante_id_foreign` FOREIGN KEY (`solicitante_id`) REFERENCES `solicitantes` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of vacaciones
-- ----------------------------
INSERT INTO `vacaciones` VALUES (1, 1, 3, 1, '54687', 'SOLICITO VACACIONES', '03', '2024-04-09', '2024-04-18', 20, 'storage/doc1/1713298022_vacaciones_doc1_012125414_54687.pdf', 'storage/doc2/1713307052_vacaciones_doc2_1_1.pdf', 'APROBADO', 'NO', '2024-04-16 20:07:02', '2024-04-16 22:37:32', '2024', '1');
INSERT INTO `vacaciones` VALUES (2, 1, 2, 1, '523523', 'SOLICITO LICENCIA A CUENTA DE VACACIONES', '01', '2024-04-16', '2024-04-23', 5, 'storage/doc1/1713308208_vacaciones_doc1_012125414_523523.pdf', 'storage/doc2/1713308332_vacaciones_doc2_2_1.pdf', 'APROBADO', 'NO', '2024-04-16 22:56:48', '2024-04-16 22:58:52', '2024', '02');
INSERT INTO `vacaciones` VALUES (3, 3, 1, NULL, '54654', 'SOLICITO LICENCIA A CUENTA DE VACACIONES', '03', NULL, NULL, NULL, 'storage/doc1/1713389786_vacaciones_doc1_73744393_54654.pdf', NULL, 'PENDIENTE', 'NO', '2024-04-17 21:36:26', '2024-04-17 21:36:26', '2024', NULL);

