-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 14-01-2026 a las 16:16:27
-- Versión del servidor: 12.0.2-MariaDB
-- Versión de PHP: 8.2.12

START TRANSACTION;



--
-- Base de datos: `llavesctgi`
--

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `ambiente`
--

CREATE TABLE `ambiente` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `Ambien_Nombre` varchar(100) NOT NULL,
  `Ambien_Capacidad` varchar(100) NOT NULL,
  `Ambien_Foto` varchar(100) NOT NULL,
  `Ambien_Observaciones` varchar(100) NOT NULL,
  `Ambien_Estado` tinyint(4) NOT NULL,
  `Tipo_A_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `ambiente`
--

INSERT INTO `ambiente` (`id`, `Ambien_Nombre`, `Ambien_Capacidad`, `Ambien_Foto`, `Ambien_Observaciones`, `Ambien_Estado`, `Tipo_A_id`, `created_at`, `updated_at`) VALUES
(1, 'Ambiente 1', '43', 'ambiente-1.jpg', 'qui sequi temporibus', 1, 3, '2026-01-14 19:36:45', '2026-01-14 20:12:30'),
(2, 'Ambiente 2', '28', 'ambiente-2.jpg', 'illo quibusdam debitis', 1, 2, '2026-01-14 19:36:45', '2026-01-14 20:12:33'),
(3, 'Ambiente 3', '12', 'ambiente-3.jpg', 'labore officiis quas', 0, 2, '2026-01-14 19:36:45', '2026-01-14 19:40:38'),
(4, 'Ambiente 4', '19', 'ambiente-4.jpg', 'maxime et aliquid', 0, 1, '2026-01-14 19:36:45', '2026-01-14 19:38:52'),
(5, 'Ambiente 5', '22', 'ambiente-5.jpg', 'expedita necessitatibus ad', 0, 1, '2026-01-14 19:36:45', '2026-01-14 19:39:53'),
(6, 'Ambiente 6', '48', 'ambiente-6.jpg', 'omnis veritatis totam', 0, 1, '2026-01-14 19:36:45', '2026-01-14 19:38:50'),
(7, 'Ambiente 7', '71', 'ambiente-7.jpg', 'minus est nemo', 0, 3, '2026-01-14 19:36:45', '2026-01-14 19:39:45'),
(8, 'Ambiente 8', '60', 'ambiente-8.jpg', 'illo voluptatum assumenda', 0, 2, '2026-01-14 19:36:45', '2026-01-14 19:39:48'),
(9, 'Ambiente 9', '49', 'ambiente-9.jpg', 'occaecati beatae et', 0, 3, '2026-01-14 19:36:45', '2026-01-14 19:39:14'),
(10, 'Ambiente 10', '76', 'ambiente-10.jpg', 'quam doloremque molestiae', 0, 3, '2026-01-14 19:36:45', '2026-01-14 19:39:18');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(255) NOT NULL,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `instructor`
--

CREATE TABLE `instructor` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `Instruc_Nombres` varchar(100) NOT NULL,
  `Instruc_Apellidos` varchar(100) NOT NULL,
  `Instruc_Documento` varchar(11) NOT NULL,
  `Instruc_EmailInstitucional` varchar(200) NOT NULL,
  `Instruc_EmailAlternativo` varchar(200) NOT NULL,
  `Instruc_Celular` varchar(100) NOT NULL,
  `Instruc_Foto` varchar(255) NOT NULL,
  `Instruc_Estado` tinyint(4) NOT NULL,
  `Tipo_vinculacion_id` bigint(20) UNSIGNED NOT NULL,
  `area_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `instructor`
--

INSERT INTO `instructor` (`id`, `Instruc_Nombres`, `Instruc_Apellidos`, `Instruc_Documento`, `Instruc_EmailInstitucional`, `Instruc_EmailAlternativo`, `Instruc_Celular`, `Instruc_Foto`, `Instruc_Estado`, `Tipo_vinculacion_id`, `area_id`, `created_at`, `updated_at`) VALUES
(1, 'Randall', 'Bayer', '61678278255', 'randallbayer1@sena.edu.co', 'alexandre.hansen@example.net', '3923420175', 'instructor-1.jpg', 0, 1, 3, '2026-01-14 19:36:45', '2026-01-14 19:36:45'),
(2, 'Enoch', 'Koepp', '18948889876', 'enochkoepp2@sena.edu.co', 'barrows.hilario@example.org', '3249903432', 'instructor-2.jpg', 0, 2, 3, '2026-01-14 19:36:45', '2026-01-14 19:36:45'),
(3, 'Karli', 'Blick', '55272757399', 'karliblick3@sena.edu.co', 'oconner.pierce@example.net', '3259001811', 'instructor-3.jpg', 0, 1, 3, '2026-01-14 19:36:45', '2026-01-14 19:36:45'),
(4, 'Chandler', 'Predovic', '24699377393', 'chandlerpredovic4@sena.edu.co', 'fahey.jeremy@example.net', '3784903482', 'instructor-4.jpg', 1, 2, 2, '2026-01-14 19:36:45', '2026-01-14 19:36:45'),
(5, 'Imogene', 'Jones', '08422364158', 'imogenejones5@sena.edu.co', 'pollich.rebeca@example.net', '3898235317', 'instructor-5.jpg', 1, 1, 1, '2026-01-14 19:36:45', '2026-01-14 19:36:45'),
(6, 'Adam', 'Rogahn', '90252981367', 'adamrogahn6@sena.edu.co', 'claire.reichel@example.org', '3215547471', 'instructor-6.jpg', 0, 1, 3, '2026-01-14 19:36:45', '2026-01-14 19:36:45'),
(7, 'Ansel', 'Hamill', '77093189453', 'anselhamill7@sena.edu.co', 'lebert@example.net', '3777418570', 'instructor-7.jpg', 1, 3, 1, '2026-01-14 19:36:45', '2026-01-14 19:36:45'),
(8, 'Gail', 'Monahan', '45205163152', 'gailmonahan8@sena.edu.co', 'auer.emely@example.org', '3451436875', 'instructor-8.jpg', 0, 1, 2, '2026-01-14 19:36:45', '2026-01-14 19:36:45'),
(9, 'Herminia', 'Champlin', '68553627822', 'herminiachamplin9@sena.edu.co', 'senger.arlie@example.org', '3552684778', 'instructor-9.jpg', 1, 3, 3, '2026-01-14 19:36:45', '2026-01-14 19:36:45'),
(10, 'Flavio', 'Langosh', '41646849426', 'flaviolangosh10@sena.edu.co', 'gmacejkovic@example.com', '3593075153', 'instructor-10.jpg', 1, 3, 2, '2026-01-14 19:36:45', '2026-01-14 19:36:45');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_reset_tokens_table', 1),
(3, '2019_08_19_000000_create_failed_jobs_table', 1),
(4, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(5, '2026_01_06_203412_create_ambiente_table', 1),
(6, '2026_01_06_205301_create_instructor_table', 1),
(7, '2026_01_06_210000_create_prestamo_table', 1);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `prestamo`
--

CREATE TABLE `prestamo` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `instructor_id` bigint(20) UNSIGNED NOT NULL,
  `ambiente_id` bigint(20) UNSIGNED NOT NULL,
  `observacion` varchar(255) DEFAULT NULL,
  `estado` tinyint(4) NOT NULL,
  `fecha_prestamo` datetime NOT NULL,
  `fecha_devolucion` datetime DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `prestamo`
--

INSERT INTO `prestamo` (`id`, `instructor_id`, `ambiente_id`, `observacion`, `estado`, `fecha_prestamo`, `fecha_devolucion`, `created_at`, `updated_at`) VALUES
(1, 1, 6, NULL, 0, '2026-01-14 09:54:02', '2026-01-14 14:38:50', '2026-01-14 14:54:02', '2026-01-14 19:38:50'),
(2, 6, 7, NULL, 0, '2026-01-10 01:20:59', '2026-01-14 14:39:45', '2026-01-10 06:20:59', '2026-01-14 19:39:45'),
(3, 10, 5, NULL, 0, '2026-01-08 05:11:15', '2026-01-14 14:39:53', '2026-01-08 10:11:15', '2026-01-14 19:39:53'),
(4, 5, 2, NULL, 0, '2026-01-12 22:54:30', '2026-01-14 14:39:12', '2026-01-13 03:54:30', '2026-01-14 19:39:12'),
(5, 7, 3, NULL, 0, '2026-01-09 07:51:51', '2026-01-14 14:39:51', '2026-01-09 12:51:51', '2026-01-14 19:39:51'),
(6, 3, 4, NULL, 0, '2026-01-14 02:11:50', '2026-01-14 14:38:52', '2026-01-14 07:11:50', '2026-01-14 19:38:52'),
(7, 2, 10, NULL, 0, '2026-01-11 20:22:09', '2026-01-14 14:39:18', '2026-01-12 01:22:09', '2026-01-14 19:39:18'),
(8, 4, 9, NULL, 0, '2026-01-12 19:49:55', '2026-01-14 14:39:14', '2026-01-13 00:49:55', '2026-01-14 19:39:14'),
(9, 8, 8, NULL, 0, '2026-01-09 10:22:07', '2026-01-14 14:39:48', '2026-01-09 15:22:07', '2026-01-14 19:39:48'),
(10, 9, 1, NULL, 0, '2026-01-10 17:33:01', '2026-01-14 14:39:24', '2026-01-10 22:33:01', '2026-01-14 19:39:24'),
(11, 6, 5, NULL, 0, '2026-01-14 14:36:59', '2026-01-14 14:37:52', '2026-01-14 19:36:59', '2026-01-14 19:37:52'),
(12, 6, 9, NULL, 0, '2026-01-14 14:37:02', '2026-01-14 14:37:31', '2026-01-14 19:37:02', '2026-01-14 19:37:31'),
(13, 6, 9, NULL, 0, '2026-01-14 14:37:56', '2026-01-14 14:38:48', '2026-01-14 19:37:56', '2026-01-14 19:38:48'),
(14, 6, 5, NULL, 0, '2026-01-14 14:37:59', '2026-01-14 14:38:46', '2026-01-14 19:37:59', '2026-01-14 19:38:46'),
(15, 6, 1, NULL, 0, '2026-01-14 14:40:27', '2026-01-14 14:40:41', '2026-01-14 19:40:27', '2026-01-14 19:40:41'),
(16, 6, 2, NULL, 0, '2026-01-14 14:40:31', '2026-01-14 14:40:39', '2026-01-14 19:40:31', '2026-01-14 19:40:39'),
(17, 6, 3, NULL, 0, '2026-01-14 14:40:34', '2026-01-14 14:40:38', '2026-01-14 19:40:34', '2026-01-14 19:40:38'),
(18, 6, 1, NULL, 1, '2026-01-14 15:12:30', NULL, '2026-01-14 20:12:30', '2026-01-14 20:12:30'),
(19, 6, 2, NULL, 1, '2026-01-14 15:12:33', NULL, '2026-01-14 20:12:33', '2026-01-14 20:12:33');

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `ambiente`
--
ALTER TABLE `ambiente`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Indices de la tabla `instructor`
--
ALTER TABLE `instructor`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `prestamo`
--
ALTER TABLE `prestamo`
  ADD PRIMARY KEY (`id`),
  ADD KEY `prestamo_instructor_id_foreign` (`instructor_id`),
  ADD KEY `prestamo_ambiente_id_foreign` (`ambiente_id`);

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `ambiente`
--
ALTER TABLE `ambiente`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT de la tabla `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `instructor`
--
ALTER TABLE `instructor`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT de la tabla `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT de la tabla `prestamo`
--
ALTER TABLE `prestamo`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- Restricciones para tablas volcadas
--

--
-- Filtros para la tabla `prestamo`
--
ALTER TABLE `prestamo`
  ADD CONSTRAINT `prestamo_ambiente_id_foreign` FOREIGN KEY (`ambiente_id`) REFERENCES `ambiente` (`id`),
  ADD CONSTRAINT `prestamo_instructor_id_foreign` FOREIGN KEY (`instructor_id`) REFERENCES `instructor` (`id`);
COMMIT;

