-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 23-01-2026 a las 12:30:22
-- Versión del servidor: 8.0.44-0ubuntu0.24.04.2
-- Versión de PHP: 8.3.30

START TRANSACTION;



--
-- Base de datos: `all-panels`
--

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

--
-- Estructura de tabla para la tabla `channels`
--

CREATE TABLE `channels` (
  `id` bigint UNSIGNED NOT NULL,
  `embyserver_id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `logo` text COLLATE utf8mb4_unicode_ci,
  `url` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `content_requests`
--

CREATE TABLE `content_requests` (
  `id` bigint UNSIGNED NOT NULL,
  `type` enum('intern','public') COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint UNSIGNED DEFAULT NULL,
  `platform` enum('plex','emby','jellyfin') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `request_type` enum('movie','serie') COLLATE utf8mb4_unicode_ci NOT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `poster` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `season_serie` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `chapter_serie` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` enum('waiting','in_progress','closed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'waiting',
  `comment` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `credits`
--

CREATE TABLE `credits` (
  `id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `qty` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `user_parent_id` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `customers`
--

CREATE TABLE `customers` (
  `id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `password` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('active','inactive') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',
  `plex_user_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `plex_user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `plex_user_token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `invited_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `duration_id` bigint UNSIGNED NOT NULL,
  `date_from` date DEFAULT NULL,
  `date_to` date DEFAULT NULL,
  `last_expiration_notification_sent_at` date DEFAULT NULL,
  `server_id` int NOT NULL,
  `screens` int NOT NULL DEFAULT '4',
  `proxy_id` int DEFAULT NULL,
  `pin` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `telegram_user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `observation` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `package_id` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `data_rows`
--

CREATE TABLE `data_rows` (
  `id` int UNSIGNED NOT NULL,
  `data_type_id` int UNSIGNED NOT NULL,
  `field` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `display_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `browse` tinyint(1) NOT NULL DEFAULT '1',
  `read` tinyint(1) NOT NULL DEFAULT '1',
  `edit` tinyint(1) NOT NULL DEFAULT '1',
  `add` tinyint(1) NOT NULL DEFAULT '1',
  `delete` tinyint(1) NOT NULL DEFAULT '1',
  `details` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `order` int NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `data_rows` (`id`, `data_type_id`, `field`, `type`, `display_name`, `required`, `browse`, `read`, `edit`, `add`, `delete`, `details`, `order`) VALUES
(1, 1, 'id', 'number', 'ID', 1, 0, 0, 0, 0, 0, '{}', 1),
(2, 1, 'name', 'text', 'Name', 1, 1, 1, 1, 1, 1, '{}', 2),
(3, 1, 'email', 'text', 'Email', 1, 1, 1, 1, 1, 1, '{}', 3),
(4, 1, 'password', 'password', 'Password', 1, 0, 0, 1, 1, 0, '{}', 4),
(5, 1, 'remember_token', 'text', 'Remember Token', 0, 0, 0, 0, 0, 0, '{}', 5),
(6, 1, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 0, 0, 0, '{}', 6),
(7, 1, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 8),
(8, 1, 'avatar', 'image', 'Avatar', 0, 1, 1, 1, 1, 1, '{}', 9),
(9, 1, 'user_belongsto_role_relationship', 'relationship', 'Role', 1, 1, 1, 1, 1, 0, '{\"scope\":\"filterrole\",\"model\":\"App\\\\Models\\\\Role\",\"table\":\"roles\",\"type\":\"belongsTo\",\"column\":\"role_id\",\"key\":\"id\",\"label\":\"display_name\",\"pivot_table\":\"roles\",\"pivot\":\"0\",\"taggable\":\"0\"}', 11),
(10, 1, 'user_belongstomany_role_relationship', 'relationship', 'Roles', 0, 0, 0, 0, 0, 0, '{\"model\":\"TCG\\\\Voyager\\\\Models\\\\Role\",\"table\":\"roles\",\"type\":\"belongsToMany\",\"column\":\"id\",\"key\":\"id\",\"label\":\"display_name\",\"pivot_table\":\"user_roles\",\"pivot\":\"1\",\"taggable\":\"0\"}', 12),
(11, 1, 'settings', 'hidden', 'Settings', 0, 0, 0, 0, 0, 0, '{}', 15),
(12, 2, 'id', 'number', 'ID', 1, 0, 0, 0, 0, 0, NULL, 1),
(13, 2, 'name', 'text', 'Name', 1, 1, 1, 1, 1, 1, NULL, 2),
(14, 2, 'created_at', 'timestamp', 'Created At', 0, 0, 0, 0, 0, 0, NULL, 3),
(15, 2, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, NULL, 4),
(16, 3, 'id', 'number', 'ID', 1, 0, 0, 0, 0, 0, '{}', 1),
(17, 3, 'name', 'text', 'Name', 1, 1, 1, 1, 1, 1, '{}', 2),
(18, 3, 'created_at', 'timestamp', 'Created At', 0, 0, 0, 0, 0, 0, '{}', 3),
(19, 3, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 4),
(20, 3, 'display_name', 'text', 'Display Name', 1, 1, 1, 1, 1, 1, '{}', 5),
(21, 1, 'role_id', 'text', 'Role', 0, 1, 1, 1, 1, 1, '{}', 10),
(22, 4, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(23, 4, 'user_id', 'text', 'User Id', 1, 1, 1, 1, 1, 1, '{}', 3),
(24, 4, 'qty', 'text', 'Cantidad', 1, 1, 1, 1, 1, 1, '{}', 4),
(25, 4, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 0, 0, 0, '{}', 5),
(26, 4, 'updated_at', 'timestamp', 'Updated At', 0, 1, 1, 0, 0, 0, '{}', 6),
(27, 4, 'credit_hasone_user_relationship', 'relationship', 'Vendedor', 1, 1, 1, 1, 1, 1, '{\"scope\":\"user\",\"model\":\"App\\\\Models\\\\User\",\"table\":\"users\",\"type\":\"belongsTo\",\"column\":\"user_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"credits\",\"pivot\":\"0\",\"taggable\":\"0\"}', 2),
(28, 5, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(29, 5, 'name', 'text', 'Nombre', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este Campo es Obligatorio\"}}}', 2),
(30, 5, 'months', 'text', 'Cantidad de Meses', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este Campo es Obligatorio\"}}}', 3),
(31, 5, 'created_at', 'timestamp', 'Creado', 0, 1, 1, 0, 0, 0, '{}', 8),
(32, 5, 'updated_at', 'timestamp', 'Actualizado', 0, 1, 1, 0, 0, 0, '{}', 9),
(33, 6, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(34, 6, 'user_id', 'text', 'User Id', 1, 0, 0, 0, 0, 0, '{}', 2),
(35, 6, 'name', 'text', 'Nombre', 0, 1, 1, 1, 1, 1, '{}', 5),
(36, 6, 'phone', 'text', 'Telefono', 0, 0, 1, 1, 1, 1, '{}', 7),
(37, 6, 'email', 'text', 'Correo', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required|email|unique:customers\",\"messages\":{\"required\":\"The email field is required\",\"email\":\"The email must be a valid email address\",\"unique\":\"Ya este correo existe registrado, por favor ingrese otro\"}}}', 8),
(38, 6, 'password', 'text', 'Clave', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required|min:10|regex:\\/^(?=.*[a-z])(?=.*[A-Z])(?=.*\\\\d)(?=.*[^a-zA-Z\\\\d]).+$\\/\",\"messages\":{\"required\":\"The :attribute field is required.\",\"min\":\"The :attribute must be at least :min characters.\",\"regex\":\"The :attribute must contain at least one lowercase letter, one uppercase letter, and one number.\"}}}', 9),
(39, 6, 'status', 'select_dropdown', 'Estatus', 1, 1, 1, 1, 0, 1, '{\"default\":\"active\",\"options\":{\"active\":\"Activo\",\"inactive\":\"Inactivo\"}}', 13),
(40, 6, 'plex_user_id', 'text', 'Plex User Id', 0, 0, 0, 0, 0, 0, '{}', 14),
(41, 6, 'created_at', 'timestamp', 'Creado', 0, 0, 1, 0, 0, 0, '{}', 18),
(42, 6, 'updated_at', 'timestamp', 'Actualizado', 0, 0, 1, 0, 0, 0, '{}', 22),
(43, 1, 'email_verified_at', 'timestamp', 'Email Verified At', 0, 0, 0, 0, 0, 0, '{}', 7),
(44, 1, 'total_credits', 'text', 'Creditos Totales', 1, 1, 1, 0, 0, 0, '{}', 14),
(45, 1, 'status', 'select_dropdown', 'Estado', 1, 1, 1, 1, 1, 1, '{\"default\":\"active\",\"options\":{\"active\":\"Activo\",\"inactive\":\"Inactivo\"}}', 17),
(58, 6, 'plex_user_name', 'text', 'Plex User Name', 0, 1, 1, 0, 0, 0, '{}', 15),
(59, 6, 'plex_user_token', 'text', 'Plex User Token', 0, 0, 1, 0, 0, 0, '{}', 16),
(60, 6, 'invited_id', 'text', 'Invited Id', 0, 0, 1, 0, 0, 0, '{}', 17),
(61, 6, 'customer_belongsto_duration_relationship', 'relationship', 'Duracion', 1, 1, 1, 1, 1, 1, '{\"scope\":\"onlyplex\",\"model\":\"App\\\\Models\\\\Duration\",\"table\":\"durations\",\"type\":\"belongsTo\",\"column\":\"duration_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"credits\",\"pivot\":\"0\",\"taggable\":\"0\"}', 10),
(62, 6, 'duration_id', 'text', 'Duration Id', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este Campo es Obligatorio\"}}}', 6),
(63, 6, 'date_from', 'date', 'Fecha Desde', 0, 0, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este Campo es Obligatorio\"}}}', 11),
(64, 6, 'date_to', 'date', 'Fecha Hasta', 0, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este Campo es Obligatorio\"}}}', 12),
(65, 8, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(66, 8, 'name', 'text', 'Nombre', 1, 1, 1, 0, 0, 1, '{}', 5),
(67, 8, 'url', 'text', 'Username or Email', 1, 1, 1, 1, 1, 1, '{}', 2),
(68, 8, 'token', 'text', 'Password', 1, 0, 1, 1, 1, 1, '{}', 3),
(69, 8, 'is_demo', 'checkbox', 'Es Demo', 1, 1, 1, 1, 1, 1, '{\"on\":\"Si\",\"off\":\"No\",\"checked\":false}', 6),
(70, 8, 'status', 'checkbox', 'Estado', 1, 1, 1, 1, 1, 1, '{\"on\":\"Activo\",\"off\":\"Inactivo\",\"checked\":true}', 7),
(71, 8, 'created_at', 'timestamp', 'Creado', 0, 1, 1, 0, 0, 0, '{}', 8),
(72, 8, 'updated_at', 'timestamp', 'Actualizado', 0, 1, 1, 0, 0, 0, '{}', 9),
(73, 6, 'customer_belongsto_server_relationship', 'relationship', 'Servidor', 1, 1, 1, 1, 1, 1, '{\"scope\":\"Server\",\"model\":\"App\\\\Models\\\\Server\",\"table\":\"servers\",\"type\":\"belongsTo\",\"column\":\"server_id\",\"key\":\"id\",\"label\":\"name_with_slots\",\"pivot_table\":\"credits\",\"pivot\":\"0\",\"taggable\":\"0\"}', 3),
(74, 6, 'server_id', 'text', 'Server Id', 1, 0, 1, 1, 1, 0, '{\"label\":\"name_with_slots\"}', 20),
(75, 9, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(76, 9, 'server_id', 'text', 'Server Id', 1, 1, 1, 1, 1, 1, '{\"label\":\"name_with_slots\"}', 2),
(77, 9, 'email', 'text', 'Email', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required|email|unique:demos\",\"messages\":{\"required\":\"Este Campo es Obligatorio\",\"email\":\"Ingresa un Correo Valido\",\"unique\":\"El correo ya exste en los Demos\"}}}', 3),
(78, 9, 'password', 'text', 'Clave', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required|min:10|regex:\\/^(?=.*[a-z])(?=.*[A-Z])(?=.*\\\\d)(?=.*[^a-zA-Z\\\\d]).+$\\/\",\"messages\":{\"required\":\"The :attribute field is required.\",\"min\":\"The :attribute must be at least :min characters.\",\"regex\":\"The :attribute must contain at least one lowercase letter, one uppercase letter, and one number.\"}}}', 4),
(79, 9, 'hours', 'select_dropdown', 'Horas', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este Campo es Obligatorio\"}},\"default\":\"1\",\"options\":{\"1\":\"1\"}}', 7),
(80, 9, 'start_date', 'text', 'Fecha Desde', 1, 0, 1, 0, 0, 0, '{}', 8),
(81, 9, 'end_date', 'text', 'Fecha Hasta', 1, 1, 1, 0, 0, 0, '{}', 9),
(82, 9, 'created_at', 'timestamp', 'Creado', 0, 0, 0, 0, 0, 0, '{}', 10),
(83, 9, 'updated_at', 'timestamp', 'Actualizado', 0, 0, 0, 0, 0, 0, '{}', 12),
(84, 9, 'demo_belongsto_server_relationship', 'relationship', 'Servidor', 1, 1, 1, 1, 1, 1, '{\"scope\":\"serverdemo\",\"model\":\"App\\\\Models\\\\Server\",\"table\":\"servers\",\"type\":\"belongsTo\",\"column\":\"server_id\",\"key\":\"id\",\"label\":\"name_with_slots\",\"pivot_table\":\"credits\",\"pivot\":\"0\",\"taggable\":\"0\"}', 5),
(85, 9, 'plex_user_name', 'text', 'Plex User Name', 0, 1, 1, 0, 0, 0, '{}', 11),
(86, 9, 'invited_id', 'text', 'Invited Id', 0, 0, 1, 0, 0, 0, '{}', 13),
(87, 9, 'plex_user_token', 'text', 'Plex User Token', 0, 0, 1, 0, 0, 0, '{}', 14),
(88, 8, 'accounts_count', 'text', 'Cantidad de Cuentas (Plex)', 0, 1, 1, 1, 1, 0, '{}', 10),
(89, 9, 'user_id', 'text', 'User Id', 0, 0, 0, 0, 0, 0, '{}', 15),
(90, 1, 'parent_user_id', 'text', 'Parent User Id', 0, 0, 0, 0, 0, 0, '{}', 19),
(91, 4, 'user_parent_id', 'text', 'User Parent Id', 0, 0, 0, 0, 0, 0, '{}', 6),
(92, 4, 'credit_belongsto_user_relationship', 'relationship', 'Usuario Padre', 0, 1, 1, 0, 0, 0, '{\"model\":\"App\\\\Models\\\\User\",\"table\":\"users\",\"type\":\"belongsTo\",\"column\":\"user_parent_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"credits\",\"pivot\":\"0\",\"taggable\":\"0\"}', 7),
(93, 6, 'customer_belongsto_user_relationship', 'relationship', 'Creador', 0, 1, 1, 0, 0, 0, '{\"model\":\"App\\\\Models\\\\User\",\"table\":\"users\",\"type\":\"belongsTo\",\"column\":\"user_id\",\"key\":\"id\",\"label\":\"name_email_creator\",\"pivot_table\":\"credits\",\"pivot\":\"0\",\"taggable\":\"0\"}', 23),
(94, 8, 'user_id', 'text', 'User Id', 0, 0, 0, 0, 0, 0, '{}', 11),
(95, 1, 'user_belongsto_user_relationship', 'relationship', 'Usuario Creador', 0, 1, 1, 0, 0, 0, '{\"model\":\"App\\\\Models\\\\User\",\"table\":\"users\",\"type\":\"belongsTo\",\"column\":\"parent_user_id\",\"key\":\"id\",\"label\":\"name_email_creator\",\"pivot_table\":\"credits\",\"pivot\":\"0\",\"taggable\":\"0\"}', 18),
(96, 8, 'limit_accounts', 'number', 'Cantidad Limite de Cuentas', 0, 1, 1, 1, 1, 1, '{}', 12),
(97, 1, 'user_belongstomany_server_relationship', 'relationship', 'Servidores Asigandos', 0, 1, 1, 1, 1, 1, '{\"scope\":\"Server\",\"model\":\"App\\\\Models\\\\Server\",\"table\":\"servers\",\"type\":\"belongsToMany\",\"column\":\"id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"user_servers\",\"pivot\":\"1\",\"taggable\":\"0\"}', 20),
(98, 6, 'screens', 'select_dropdown', 'Pantallas', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este Campo es Obligatorio\"}},\"default\":\"4\",\"options\":{\"1\":\"1\",\"2\":\"2\",\"3\":\"3\",\"4\":\"4\"}}', 19),
(99, 11, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(100, 11, 'name', 'text', 'Nombre', 1, 1, 1, 1, 1, 1, '{\"validations\":{\"rules\":\"required\",\"messages\":{\"required\":\"Este campo es Requerido\"}}}', 2),
(101, 11, 'type', 'select_dropdown', 'Valido Para', 1, 1, 1, 1, 1, 1, '{\"default\":\"all\",\"options\":{\"all\":\"Ambos\",\"account\":\"Cuenta\",\"demo\":\"Demo\"},\"validations\":{\"rules\":\"required\",\"messages\":{\"required\":\"Este campo es obligatorio!!\"}}}', 3),
(102, 11, 'created_at', 'timestamp', 'Creado', 0, 1, 0, 0, 0, 0, '{}', 4),
(103, 11, 'updated_at', 'timestamp', 'Actualizado', 0, 0, 1, 0, 0, 0, '{}', 5),
(104, 13, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(105, 13, 'ip', 'text', 'Ip', 1, 1, 1, 1, 1, 1, '{\"validations\":{\"rules\":\"required\",\"messages\":{\"required\":\"Este campo es Requerido\"}}}', 2),
(106, 13, 'port', 'text', 'Puerto', 1, 1, 1, 1, 1, 1, '{\"validations\":{\"rules\":\"required\",\"messages\":{\"required\":\"Este campo es Requerido\"}}}', 3),
(107, 13, 'created_at', 'timestamp', 'Creado', 0, 1, 0, 0, 0, 0, '{}', 4),
(108, 13, 'updated_at', 'timestamp', 'Actualizado', 0, 0, 1, 0, 0, 0, '{}', 5),
(109, 6, 'customer_belongsto_proxy_relationship', 'relationship', 'Direccion Ip', 0, 0, 0, 0, 0, 0, '{\"model\":\"App\\\\Models\\\\Proxy\",\"table\":\"proxies\",\"type\":\"belongsTo\",\"column\":\"proxy_id\",\"key\":\"id\",\"label\":\"ip\",\"pivot_table\":\"credits\",\"pivot\":\"0\",\"taggable\":\"0\"}', 25),
(110, 6, 'proxy_id', 'text', 'Proxy Id', 0, 0, 0, 0, 0, 0, '{}', 21),
(111, 6, 'pin', 'text', 'Pin', 0, 1, 1, 0, 0, 0, '{}', 24),
(112, 8, 'is_plex_pass', 'checkbox', 'Con Plex Pass', 1, 1, 1, 1, 1, 1, '{\"on\":\"Si\",\"off\":\"No\",\"checked\":false}', 13),
(113, 8, 'local_name', 'text', 'Nombre Local', 0, 1, 1, 1, 1, 1, '{}', 4),
(114, 5, 'amount', 'number', 'Monto en Creditos', 0, 1, 1, 1, 1, 1, '{}', 6),
(115, 6, 'telegram_user_name', 'text', 'Nombre de Usuario en Telegram', 0, 0, 0, 0, 0, 0, '{}', 26),
(116, 14, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(117, 14, 'server_id', 'text', 'Servidor', 1, 1, 1, 1, 1, 1, '{}', 3),
(118, 14, 'name', 'text', 'Nombre', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rules\":\"required\",\"messages\":{\"required\":\"Este Campo es Obligatorio\"}}}', 2),
(119, 14, 'libraries', 'text', 'Libraries', 1, 0, 0, 1, 1, 0, '{}', 5),
(120, 14, 'created_at', 'timestamp', 'Creado', 0, 1, 1, 0, 0, 0, '{}', 6),
(121, 14, 'updated_at', 'timestamp', 'Actualizado', 0, 1, 1, 0, 0, 0, '{}', 7),
(122, 14, 'package_belongsto_server_relationship', 'relationship', 'Servidor', 1, 1, 1, 1, 1, 1, '{\"scope\":\"server\",\"model\":\"App\\\\Models\\\\Server\",\"table\":\"servers\",\"type\":\"belongsTo\",\"column\":\"server_id\",\"key\":\"id\",\"label\":\"name_and_local_name\",\"pivot_table\":\"credits\",\"pivot\":\"0\",\"taggable\":\"0\"}', 4),
(124, 6, 'observation', 'text', 'Observation', 0, 0, 0, 0, 0, 0, '{}', 27),
(125, 6, 'package_id', 'select_dropdown', 'Paquetes', 0, 1, 1, 1, 1, 0, '{}', 4),
(126, 9, 'package_id', 'select_dropdown', 'Paquete', 0, 1, 1, 1, 1, 1, '{}', 6),
(127, 5, 'service', 'select_dropdown', 'Servicio', 1, 1, 1, 1, 1, 1, '{\"default\":\"all\",\"options\":{\"plex\":\"Plex\",\"jellyfin\":\"Jellyfin\",\"emby\":\"Emby\",\"all\":\"Todas\"}}', 4),
(128, 17, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(129, 17, 'name', 'text', 'Nombre', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este Campo es Obligatorio\"}}}', 2),
(130, 17, 'host', 'text', 'Host', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este Campo es Obligatorio\"}}}', 3),
(131, 17, 'port', 'text', 'Puerto', 0, 1, 1, 1, 1, 1, '{}', 4),
(132, 17, 'api_key', 'text', 'Api Key', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este Campo es Obligatorio\"}}}', 5),
(133, 17, 'created_at', 'timestamp', 'Creado', 0, 1, 1, 0, 0, 0, '{}', 6),
(134, 17, 'updated_at', 'timestamp', 'Actualziado', 0, 0, 1, 0, 0, 0, '{}', 7),
(135, 18, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(136, 18, 'name', 'text', 'Nombre', 1, 1, 1, 1, 1, 1, '{\"validatios\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este campo es obligatorio\"}}}', 3),
(137, 18, 'jellyfinserver_id', 'text', 'Jellyfinserver Id', 1, 1, 1, 1, 1, 1, '{}', 2),
(138, 18, 'libraries', 'select_dropdown', 'Librerias', 1, 0, 0, 1, 1, 1, '{\"validatios\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este campo es obligatorio\"}}}', 5),
(139, 18, 'created_at', 'timestamp', 'Creado', 0, 1, 1, 0, 0, 0, '{}', 6),
(140, 18, 'updated_at', 'timestamp', 'Actualizado', 0, 0, 0, 0, 0, 0, '{}', 7),
(141, 18, 'jellyfinpackage_belongsto_jellyfinserver_relationship', 'relationship', 'Servidor', 1, 1, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\JellyfinServer\",\"table\":\"jellyfinservers\",\"type\":\"belongsTo\",\"column\":\"jellyfinserver_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"credits\",\"pivot\":\"0\",\"taggable\":\"0\"}', 4),
(142, 19, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(143, 19, 'jellyfinserver_id', 'text', 'Jellyfinserver Id', 1, 1, 1, 1, 1, 1, '{}', 2),
(144, 19, 'duration_id', 'select_dropdown', 'Duracion', 1, 1, 1, 1, 1, 1, '{\"validations\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este campo es obligatorio\"}}}', 6),
(145, 19, 'jellyfinpackage_id', 'select_dropdown', 'Paquete', 0, 1, 1, 1, 1, 1, '{}', 4),
(146, 19, 'name', 'text', 'Nombre de Usuario', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required|unique:jellyfincustomers\",\"messages\":{\"required\":\"Campo Obligatorio\",\"unique\":\"este mombre de usuario ya existe!!\"}}}', 7),
(147, 19, 'email', 'text', 'Email', 0, 1, 1, 1, 1, 1, '{\"validations\":{\"rule\":\"email\",\"messages\":{\"email\":\"Debes escribir el correo correctamente\"}}}', 9),
(148, 19, 'password', 'text', 'Password', 1, 1, 1, 1, 1, 1, '{\"validations\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este campo es obligatorio\"}}}', 8),
(149, 19, 'phone', 'text', 'Telefono', 0, 0, 1, 1, 1, 1, '{}', 10),
(150, 19, 'comment', 'text_area', 'Comentario', 0, 1, 1, 1, 1, 0, '{}', 13),
(151, 19, 'date_to', 'date', 'Fecha Hasta', 1, 1, 1, 1, 1, 1, '{\"validations\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este campo es obligatorio\"}}}', 12),
(152, 19, 'created_at', 'timestamp', 'Creado', 0, 1, 1, 0, 0, 0, '{}', 17),
(153, 19, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 18),
(154, 19, 'jellyfincustomer_belongsto_jellyfinserver_relationship', 'relationship', 'Servidor', 1, 1, 1, 1, 1, 1, '{\"scope\":\"bystatus\",\"model\":\"App\\\\Models\\\\JellyfinServer\",\"table\":\"jellyfinservers\",\"type\":\"belongsTo\",\"column\":\"jellyfinserver_id\",\"key\":\"id\",\"label\":\"real_name\",\"pivot_table\":\"credits\",\"pivot\":\"0\",\"taggable\":\"0\"}', 3),
(156, 20, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(157, 20, 'jellyfinserver_id', 'text', 'Jellyfinserver Id', 1, 1, 1, 1, 1, 1, '{}', 2),
(159, 20, 'jellyfinpackage_id', 'select_dropdown', 'Paquete', 0, 1, 1, 1, 1, 1, '{}', 4),
(160, 20, 'name', 'text', 'Nombre de Usuario', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required|unique:jellyfindemos\",\"messages\":{\"required\":\"Campo Obligatorio\",\"unique\":\"este mombre de usuario ya existe!!\"}}}', 5),
(161, 20, 'email', 'text', 'Email', 0, 1, 1, 1, 1, 1, '{\"validations\":{\"rule\":\"email\",\"messages\":{\"email\":\"Ingresa un correo valido\"}}}', 7),
(162, 20, 'password', 'text', 'Password', 1, 0, 1, 1, 1, 1, '{\"validations\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este campo es Requerido\"}}}', 6),
(165, 20, 'date_to', 'date', 'Fecha Hasta', 1, 1, 1, 0, 0, 0, '{\"validations\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este campo es Requerido\"}}}', 9),
(166, 20, 'user_id', 'text', 'User Id', 1, 0, 0, 0, 0, 0, '{}', 10),
(167, 20, 'created_at', 'timestamp', 'Creado', 0, 1, 1, 0, 0, 0, '{}', 12),
(168, 20, 'updated_at', 'timestamp', 'Updated At', 0, 0, 1, 0, 0, 0, '{}', 14),
(169, 20, 'hours', 'select_dropdown', 'Horas', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este Campo es Obligatorio\"}},\"default\":\"1\",\"options\":{\"1\":\"1\"}}', 8),
(170, 20, 'jellyfindemo_belongsto_jellyfinserver_relationship', 'relationship', 'Servidor', 1, 1, 1, 1, 1, 1, '{\"scope\":\"bystatus\",\"model\":\"App\\\\Models\\\\JellyfinServer\",\"table\":\"jellyfinservers\",\"type\":\"belongsTo\",\"column\":\"jellyfinserver_id\",\"key\":\"id\",\"label\":\"real_name\",\"pivot_table\":\"credits\",\"pivot\":\"0\",\"taggable\":\"0\"}', 3),
(171, 19, 'user_id', 'text', 'User Id', 1, 0, 0, 0, 0, 0, '{}', 14),
(172, 19, 'screens', 'select_dropdown', 'Pantallas', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este Campo es Obligatorio\"}},\"default\":\"4\",\"options\":{\"1\":\"1\",\"2\":\"2\",\"3\":\"3\",\"4\":\"4\"}}', 11),
(173, 19, 'json_data', 'text', 'Json Data', 0, 0, 1, 0, 0, 0, '{}', 19),
(175, 20, 'json_data', 'text', 'Json Data', 0, 0, 1, 0, 0, 0, '{}', 13),
(176, 5, 'screens', 'text', 'Pantallas', 0, 1, 1, 1, 1, 1, '{}', 5),
(177, 17, 'status', 'checkbox', 'Estatus', 1, 1, 1, 1, 1, 1, '{\"on\":\"Activo\",\"off\":\"Inactivo\",\"checked\":true}', 8),
(178, 19, 'status', 'checkbox', 'Estatus', 1, 1, 1, 0, 0, 0, '{\"on\":\"Activo\",\"off\":\"Inactivo\",\"checked\":true}', 15),
(179, 19, 'jellyfincustomer_belongsto_user_relationship', 'relationship', 'Creador', 0, 1, 1, 0, 0, 0, '{\"model\":\"App\\\\Models\\\\User\",\"table\":\"users\",\"type\":\"belongsTo\",\"column\":\"user_id\",\"key\":\"id\",\"label\":\"name_email_creator\",\"pivot_table\":\"credits\",\"pivot\":\"0\",\"taggable\":\"0\"}', 16),
(180, 20, 'jellyfindemo_belongsto_user_relationship', 'relationship', 'Creador', 0, 1, 1, 0, 0, 0, '{\"model\":\"App\\\\Models\\\\User\",\"table\":\"users\",\"type\":\"belongsTo\",\"column\":\"user_id\",\"key\":\"id\",\"label\":\"name_email_creator\",\"pivot_table\":\"credits\",\"pivot\":\"0\",\"taggable\":\"0\"}', 11),
(181, 1, 'aditional_info', 'text_area', 'Informacion Adicional', 0, 0, 1, 1, 1, 1, '{}', 16),
(182, 17, 'with_live_tv', 'checkbox', 'TV en vivo', 1, 1, 1, 1, 1, 1, '{\"on\":\"Si\",\"off\":\"No\",\"checked\":false}', 9),
(183, 5, 'aditional_credits_for_live_tv', 'number', 'Creditos Adicionales con tv en vivo \"Aplica para Jellyfin y Emby\"', 1, 1, 1, 1, 1, 1, '{}', 7),
(184, 1, 'service', 'select_multiple', 'Servicios Asociados', 0, 1, 1, 1, 1, 1, '{\"default\":\"all\",\"options\":{\"plex\":\"Plex\",\"jellyfin\":\"Jellyfin\",\"emby\":\"Emby\"}}', 13),
(185, 1, 'prefix', 'text', 'Prefijo', 0, 1, 1, 1, 1, 1, '{}', 17),
(186, 17, 'is_dead', 'checkbox', 'Servidor Caido?', 1, 1, 1, 1, 1, 1, '{\"on\":\"Si\",\"off\":\"No\",\"checked\":false}', 10),
(187, 8, 'library_section_for_remove', 'text', 'Library Section For Remove', 0, 0, 1, 0, 0, 0, '{}', 14),
(188, 8, 'last_token_update', 'text', 'Last Token Update', 0, 0, 1, 0, 0, 0, '{}', 15),
(189, 8, 'json_data', 'text', 'Json Data', 0, 0, 1, 0, 0, 0, '{}', 16),
(190, 8, 'is_dead', 'checkbox', 'Servidor Caido?', 1, 1, 1, 1, 1, 1, '{\"on\":\"Si\",\"off\":\"No\",\"checked\":false}', 17),
(191, 21, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(192, 21, 'name', 'text', 'Nombre', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este Campo es Obligatorio\"}}}', 2),
(193, 21, 'host', 'text', 'Host', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este Campo es Obligatorio\"}}}', 3),
(194, 21, 'port', 'text', 'Puerto', 0, 1, 1, 1, 1, 1, '{}', 4),
(195, 21, 'api_key', 'text', 'Api Key', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este Campo es Obligatorio\"}}}', 5),
(196, 21, 'status', 'checkbox', 'Estatus', 1, 1, 1, 1, 1, 1, '{\"on\":\"Activo\",\"off\":\"Inactivo\",\"checked\":true}', 6),
(197, 21, 'with_live_tv', 'checkbox', 'Con Tv en Vivo', 1, 1, 1, 1, 1, 1, '{\"on\":\"Si\",\"off\":\"No\",\"checked\":false}', 7),
(198, 21, 'is_dead', 'checkbox', 'Servidor Caido?', 1, 1, 1, 1, 1, 1, '{\"on\":\"Si\",\"off\":\"No\",\"checked\":false}', 9),
(199, 21, 'created_at', 'timestamp', 'Creado', 0, 1, 1, 0, 0, 0, '{}', 10),
(200, 21, 'updated_at', 'timestamp', 'Actualizado', 0, 1, 1, 0, 0, 0, '{}', 11),
(201, 22, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(202, 22, 'name', 'text', 'Nombre', 1, 1, 1, 1, 1, 1, '{\"validatios\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este campo es obligatorio\"}}}', 3),
(203, 22, 'embyserver_id', 'text', 'Embyserver Id', 1, 1, 1, 1, 1, 1, '{}', 2),
(204, 22, 'libraries', 'select_dropdown', 'Librerias', 1, 0, 0, 1, 1, 0, '{\"validatios\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este campo es obligatorio\"}}}', 5),
(205, 22, 'created_at', 'timestamp', 'Creado', 0, 1, 1, 0, 0, 0, '{}', 6),
(206, 22, 'updated_at', 'timestamp', 'Actualizado', 0, 1, 1, 0, 0, 0, '{}', 7),
(207, 22, 'embypackage_belongsto_embyserver_relationship', 'relationship', 'Servidor', 1, 1, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\EmbyServer\",\"table\":\"embyservers\",\"type\":\"belongsTo\",\"column\":\"embyserver_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"credits\",\"pivot\":\"0\",\"taggable\":\"0\"}', 4),
(208, 23, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(209, 23, 'embyserver_id', 'text', 'Embyserver Id', 1, 1, 1, 1, 1, 1, '{}', 2),
(210, 23, 'embypackage_id', 'select_dropdown', 'Paquete', 0, 1, 1, 1, 1, 1, '{}', 4),
(211, 23, 'name', 'text', 'Nombre de Usuario', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required|unique:jellyfindemos\",\"messages\":{\"required\":\"Campo Obligatorio\",\"unique\":\"este mombre de usuario ya existe!!\"}}}', 5),
(212, 23, 'email', 'text', 'Email', 0, 1, 1, 1, 1, 1, '{}', 7),
(213, 23, 'password', 'text', 'Password', 1, 1, 1, 1, 1, 1, '{\"validations\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este campo es Requerido\"}}}', 6),
(214, 23, 'hours', 'select_dropdown', 'Horas', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este Campo es Obligatorio\"}},\"default\":\"1\",\"options\":{\"1\":\"1\"}}', 8),
(215, 23, 'date_to', 'date', 'Fecha Hasta', 1, 1, 1, 0, 0, 0, '{\"validations\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este campo es Requerido\"}}}', 9),
(216, 23, 'user_id', 'text', 'User Id', 1, 0, 0, 0, 0, 0, '{}', 10),
(217, 23, 'json_data', 'text', 'Json Data', 0, 0, 1, 0, 0, 0, '{}', 11),
(218, 23, 'created_at', 'timestamp', 'Creado', 0, 1, 1, 0, 0, 0, '{}', 13),
(219, 23, 'updated_at', 'timestamp', 'Actualizado', 0, 1, 1, 0, 0, 0, '{}', 14),
(220, 23, 'embydemo_belongsto_embyserver_relationship', 'relationship', 'Servidor', 1, 1, 1, 1, 1, 1, '{\"scope\":\"serverdemo\",\"model\":\"App\\\\Models\\\\EmbyServer\",\"table\":\"embyservers\",\"type\":\"belongsTo\",\"column\":\"embyserver_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"credits\",\"pivot\":\"0\",\"taggable\":\"0\"}', 3),
(221, 23, 'embydemo_belongsto_user_relationship', 'relationship', 'Creador', 0, 1, 1, 0, 0, 0, '{\"model\":\"App\\\\Models\\\\User\",\"table\":\"users\",\"type\":\"belongsTo\",\"column\":\"user_id\",\"key\":\"id\",\"label\":\"name_email_creator\",\"pivot_table\":\"credits\",\"pivot\":\"0\",\"taggable\":\"0\"}', 12),
(222, 24, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(223, 24, 'embyserver_id', 'text', 'Embyserver Id', 1, 1, 1, 1, 1, 1, '{}', 2),
(224, 24, 'duration_id', 'select_dropdown', 'Duracion', 1, 1, 1, 1, 1, 1, '{\"validations\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este campo es obligatorio\"}}}', 6),
(225, 24, 'embypackage_id', 'select_dropdown', 'Paquete', 0, 1, 1, 1, 1, 1, '{}', 4),
(226, 24, 'name', 'text', 'Nombre de Usuario', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required|unique:jellyfincustomers\",\"messages\":{\"required\":\"Campo Obligatorio\",\"unique\":\"este mombre de usuario ya existe!!\"}}}', 7),
(227, 24, 'email', 'text', 'Email', 0, 0, 1, 1, 1, 1, '{}', 9),
(228, 24, 'password', 'text', 'Password', 1, 1, 1, 1, 1, 1, '{\"validations\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este campo es obligatorio\"}}}', 8),
(229, 24, 'phone', 'text', 'Telefono', 0, 0, 1, 1, 1, 1, '{}', 10),
(230, 24, 'comment', 'text_area', 'Comentario', 0, 1, 1, 1, 1, 1, '{}', 14),
(231, 24, 'date_to', 'text', 'Fecha Hasta', 1, 1, 1, 1, 1, 1, '{\"validations\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este campo es obligatorio\"}}}', 12),
(232, 24, 'user_id', 'text', 'User Id', 1, 0, 0, 0, 0, 0, '{}', 13),
(233, 24, 'screens', 'select_dropdown', 'Pantallas', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este Campo es Obligatorio\"}},\"default\":\"4\",\"options\":{\"1\":\"1\",\"2\":\"2\",\"3\":\"3\",\"4\":\"4\"}}', 11),
(234, 24, 'status', 'checkbox', 'Estatus', 1, 1, 1, 1, 1, 1, '{\"on\":\"Activo\",\"off\":\"Inactivo\",\"checked\":true}', 15),
(235, 24, 'json_data', 'text', 'Json Data', 0, 0, 1, 0, 0, 0, '{}', 17),
(236, 24, 'created_at', 'timestamp', 'Creado', 0, 1, 1, 0, 0, 0, '{}', 18),
(237, 24, 'updated_at', 'timestamp', 'Actualizado', 0, 1, 1, 0, 0, 0, '{}', 19),
(238, 24, 'embycustomer_belongsto_embyserver_relationship', 'relationship', 'Servidor', 1, 1, 1, 1, 1, 1, '{\"scope\":\"server\",\"model\":\"App\\\\Models\\\\EmbyServer\",\"table\":\"embyservers\",\"type\":\"belongsTo\",\"column\":\"embyserver_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"credits\",\"pivot\":\"0\",\"taggable\":\"0\"}', 3),
(240, 24, 'embycustomer_belongsto_user_relationship', 'relationship', 'Creador', 0, 1, 1, 0, 0, 0, '{\"model\":\"App\\\\Models\\\\User\",\"table\":\"users\",\"type\":\"belongsTo\",\"column\":\"user_id\",\"key\":\"id\",\"label\":\"name_email_creator\",\"pivot_table\":\"credits\",\"pivot\":\"0\",\"taggable\":\"0\"}', 16),
(241, 25, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(242, 25, 'title', 'text', 'Titulo', 1, 1, 1, 1, 1, 1, '{\"validations\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este campo es Requerido\"}}}', 2),
(243, 25, 'poster', 'multiple_images', 'Imagen', 0, 1, 1, 1, 1, 1, '{}', 3),
(244, 25, 'content', 'text_area', 'Contenido', 1, 1, 1, 1, 1, 1, '{\"validations\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este campo es Requerido\"}}}', 4),
(245, 25, 'button_link_action', 'text', 'Link del Boton', 0, 1, 1, 1, 1, 1, '{}', 5),
(246, 25, 'date_to', 'date', 'Fecha Limite', 1, 1, 1, 1, 1, 1, '{\"validations\":{\"rule\":\"required\",\"messages\":{\"required\":\"Este campo es Requerido\"}}}', 6),
(247, 25, 'reads', 'text', 'Leido por', 0, 0, 1, 0, 0, 0, '{}', 7),
(248, 25, 'is_active', 'checkbox', 'Activo?', 1, 1, 1, 1, 1, 1, '{\"on\":\"Activo\",\"off\":\"Inactivo\",\"checked\":true}', 8),
(249, 25, 'created_at', 'timestamp', 'Creado', 0, 1, 1, 0, 0, 0, '{}', 10),
(250, 25, 'updated_at', 'timestamp', 'Actualizado', 0, 1, 1, 0, 0, 0, '{}', 11),
(251, 25, 'each_hours', 'number', 'Mostrar Cada Cuantas horas', 0, 1, 1, 1, 1, 1, '{}', 9),
(252, 21, 'is_demo', 'checkbox', 'Activo para Demos', 1, 1, 1, 1, 1, 1, '{\"on\":\"Si\",\"off\":\"No\",\"checked\":false}', 8),
(253, 24, 'with_transcode', 'checkbox', 'Transcodificacion', 1, 1, 1, 1, 1, 1, '{\"on\":\"Si\",\"off\":\"No\",\"checked\":true}', 10),
(254, 21, 'custom_config', 'checkbox', 'Configuración Personalizada', 0, 0, 1, 1, 1, 1, '{\"on\":\"Si\",\"off\":\"No\"}', 12),
(255, 21, 'json_custom_config', 'hidden', 'JSON Config', 0, 0, 0, 1, 1, 1, '\"\"', 13),
(256, 6, 'last_expiration_notification_sent_at', 'text', 'Last Expiration Notification Sent At', 0, 0, 0, 0, 0, 1, '{}', 17),
(257, 24, 'last_expiration_notification_sent_at', 'timestamp', 'Last Expiration Notification Sent At', 0, 1, 1, 1, 1, 1, '{}', 18);

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

--
-- Estructura de tabla para la tabla `data_types`
--

CREATE TABLE `data_types` (
  `id` int UNSIGNED NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `slug` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `display_name_singular` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `display_name_plural` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `model_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `policy_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `controller` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `generate_permissions` tinyint(1) NOT NULL DEFAULT '0',
  `server_side` tinyint NOT NULL DEFAULT '0',
  `details` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `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 `data_types`
--

INSERT INTO `data_types` (`id`, `name`, `slug`, `display_name_singular`, `display_name_plural`, `icon`, `model_name`, `policy_name`, `controller`, `description`, `generate_permissions`, `server_side`, `details`, `created_at`, `updated_at`) VALUES
(1, 'users', 'users', 'User', 'Users', 'voyager-person', 'App\\Models\\User', 'TCG\\Voyager\\Policies\\UserPolicy', 'App\\Http\\Controllers\\Voyager\\UserController', NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"desc\",\"default_search_key\":null,\"scope\":\"user\"}', '2023-07-30 22:59:57', '2025-12-02 18:27:58'),
(2, 'menus', 'menus', 'Menu', 'Menus', 'voyager-list', 'TCG\\Voyager\\Models\\Menu', NULL, '', '', 1, 0, NULL, '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(3, 'roles', 'roles', 'Role', 'Roles', 'voyager-lock', 'App\\Models\\Role', NULL, 'TCG\\Voyager\\Http\\Controllers\\VoyagerRoleController', NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"desc\",\"default_search_key\":null,\"scope\":null}', '2023-07-30 22:59:57', '2023-09-12 16:38:47'),
(4, 'credits', 'credits', 'Credito', 'Creditos', 'voyager-dollar', 'App\\Models\\Credit', NULL, 'App\\Http\\Controllers\\Voyager\\CreditController', NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":\"byUser\"}', '2023-07-31 00:03:14', '2023-09-12 18:58:11'),
(5, 'durations', 'durations', 'Duracion', 'Duraciones', 'voyager-alarm-clock', 'App\\Models\\Duration', NULL, NULL, NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":null}', '2023-07-31 00:11:11', '2025-08-18 14:20:45'),
(6, 'customers', 'customers', 'Cliente', 'Clientes', 'voyager-people', 'App\\Models\\Customer', NULL, 'App\\Http\\Controllers\\Voyager\\CustomerController', NULL, 1, 1, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":\"byUser\"}', '2023-07-31 00:13:46', '2026-01-23 15:55:23'),
(8, 'servers', 'servers', 'Servidor', 'Servidores', 'voyager-laptop', 'App\\Models\\Server', NULL, 'App\\Http\\Controllers\\Voyager\\ServerController', NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":\"serverByUser\"}', '2023-08-12 18:21:43', '2025-07-05 19:11:47'),
(9, 'demos', 'demos', 'Cuenta Demo', 'Cuentas Demos', 'voyager-bell', 'App\\Models\\Demo', NULL, 'App\\Http\\Controllers\\Voyager\\DemoController', NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":\"byUser\"}', '2023-09-01 16:46:11', '2025-07-18 14:12:48'),
(11, 'domains', 'domains', 'Dominio', 'Dominios', 'voyager-font', 'App\\Models\\Domain', NULL, NULL, NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":null}', '2023-11-04 19:03:42', '2023-11-04 20:07:43'),
(13, 'proxies', 'proxies', 'Proxy', 'Proxys', 'voyager-window-list', 'App\\Models\\Proxy', NULL, NULL, NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":null}', '2023-11-04 19:05:14', '2023-11-04 20:07:51'),
(14, 'packages', 'packages', 'Paquete', 'Paquetes', 'voyager-logbook', 'App\\Models\\Package', NULL, 'App\\Http\\Controllers\\Voyager\\PackageController', NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":\"byUser\"}', '2024-02-05 13:24:03', '2024-04-15 21:02:39'),
(17, 'jellyfinservers', 'jellyfinservers', 'Servidor JellyFin', 'Servidores JellyFin', 'voyager-laptop', 'App\\Models\\JellyfinServer', NULL, 'App\\Http\\Controllers\\Voyager\\JellyfinServerController', NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":null}', '2024-02-19 17:49:30', '2025-07-05 17:47:37'),
(18, 'jellyfinpackages', 'jellyfinpackages', 'Paquete JellyFin', 'Paquetes Jellyfin', 'voyager-logbook', 'App\\Models\\JellyfinPackage', NULL, 'App\\Http\\Controllers\\Voyager\\JellyfinPackageController', NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":null}', '2024-02-19 18:30:36', '2024-02-20 13:30:06'),
(19, 'jellyfincustomers', 'jellyfincustomers', 'Cliente Jellyfin', 'Clientes Jellyfin', 'voyager-people', 'App\\Models\\JellyfinCustomer', NULL, 'App\\Http\\Controllers\\Voyager\\JellyfinCustomerController', NULL, 1, 1, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":\"byUser\"}', '2024-02-19 18:50:50', '2026-01-23 16:09:15'),
(20, 'jellyfindemos', 'jellyfindemos', 'Demo Jellyfin', 'Demos Jellyfin', 'voyager-bell', 'App\\Models\\JellyfinDemo', NULL, 'App\\Http\\Controllers\\Voyager\\JellyfinDemoController', NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":\"byUser\"}', '2024-02-19 19:12:45', '2025-07-18 14:13:19'),
(21, 'embyservers', 'embyservers', 'Servidor Emby', 'Servidores Emby', 'voyager-laptop', 'App\\Models\\EmbyServer', NULL, 'App\\Http\\Controllers\\Voyager\\EmbyServerController', NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":null}', '2025-07-15 13:42:31', '2025-08-20 20:32:12'),
(22, 'embypackages', 'embypackages', 'Paquete Emby', 'Paquetes Emby', 'voyager-logbook', 'App\\Models\\EmbyPackage', NULL, 'App\\Http\\Controllers\\Voyager\\EmbyPackageController', NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":null}', '2025-07-15 13:49:22', '2025-07-15 14:06:08'),
(23, 'embydemos', 'embydemos', 'Demo Emby', 'Demos Emby', 'voyager-bell', 'App\\Models\\EmbyDemo', NULL, 'App\\Http\\Controllers\\Voyager\\EmbyDemoController', NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":\"byUser\"}', '2025-07-15 14:39:41', '2025-08-21 00:54:59'),
(24, 'embycustomers', 'embycustomers', 'Cliente Emby', 'Clientes Emby', 'voyager-people', 'App\\Models\\EmbyCustomer', NULL, 'App\\Http\\Controllers\\Voyager\\EmbyCustomerController', NULL, 1, 1, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":\"byUser\"}', '2025-07-15 15:38:40', '2026-01-23 16:09:07'),
(25, 'notifications', 'notifications', 'Notificacion', 'Notificaciones', 'voyager-mail', 'App\\Models\\Notification', NULL, 'App\\Http\\Controllers\\Voyager\\NotificationController', NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":null}', '2025-07-26 18:47:20', '2025-08-05 15:17:02');

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

--
-- Estructura de tabla para la tabla `demos`
--

CREATE TABLE `demos` (
  `id` bigint UNSIGNED NOT NULL,
  `server_id` bigint UNSIGNED NOT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `hours` int NOT NULL,
  `start_date` datetime NOT NULL,
  `end_date` datetime NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `plex_user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `invited_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `plex_user_token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `package_id` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `domains`
--

CREATE TABLE `domains` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` enum('account','demo','all') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'all',
  `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 `domains`
--

INSERT INTO `domains` (`id`, `name`, `type`, `created_at`, `updated_at`) VALUES
(16, 'gmail.com', 'all', '2023-12-06 18:54:25', '2023-12-06 18:54:25'),
(17, 'hotmail.com', 'all', '2023-12-06 18:54:30', '2023-12-06 18:54:30'),
(18, 'outlook.com', 'all', '2024-03-11 20:23:22', '2024-03-11 20:23:22'),
(19, 'yahoo.com', 'all', '2024-03-11 20:23:30', '2024-03-11 20:23:30');

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

--
-- Estructura de tabla para la tabla `durations`
--

CREATE TABLE `durations` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `months` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `amount` int DEFAULT NULL,
  `service` enum('plex','jellyfin','emby','all') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'all',
  `screens` int DEFAULT NULL,
  `aditional_credits_for_live_tv` double(8,2) NOT NULL DEFAULT '0.00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `durations` (`id`, `name`, `months`, `created_at`, `updated_at`, `amount`, `service`, `screens`, `aditional_credits_for_live_tv`) VALUES
(2, '1 Mes', 1, '2023-07-31 01:51:15', '2025-02-05 19:00:32', NULL, 'all', NULL, 0.00),
(3, '2 Meses', 2, '2023-07-31 23:14:00', '2023-08-08 15:51:19', NULL, 'all', NULL, 0.00),
(4, '3 Meses', 3, '2023-08-08 15:51:27', '2023-08-08 15:51:27', NULL, 'all', NULL, 0.00),
(5, '4 Meses', 4, '2023-08-08 15:51:33', '2023-08-08 15:51:33', NULL, 'all', NULL, 0.00),
(6, '5 Meses', 5, '2023-08-08 15:51:41', '2023-08-08 15:51:41', NULL, 'all', NULL, 0.00),
(7, '6 Meses', 6, '2023-08-08 15:51:47', '2023-08-08 15:51:47', NULL, 'all', NULL, 0.00),
(8, '7 Meses', 7, '2023-08-08 15:51:56', '2023-08-08 15:51:56', NULL, 'all', NULL, 0.00),
(9, '8 Meses', 8, '2023-08-08 15:52:02', '2023-08-08 15:52:02', NULL, 'all', NULL, 0.00),
(10, '9 Meses', 9, '2023-08-08 15:52:11', '2023-08-08 15:52:11', NULL, 'all', NULL, 0.00),
(11, '10 Meses', 10, '2023-08-08 15:52:22', '2023-08-08 15:52:22', NULL, 'all', NULL, 0.00),
(12, '11 Meses', 11, '2023-08-08 15:52:29', '2023-08-08 15:52:29', NULL, 'all', NULL, 0.00),
(13, '12 Meses', 12, '2023-08-08 15:52:36', '2025-02-05 19:38:16', NULL, 'all', NULL, 0.00);

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

--
-- Estructura de tabla para la tabla `embycustomers`
--

CREATE TABLE `embycustomers` (
  `id` bigint UNSIGNED NOT NULL,
  `embyserver_id` int NOT NULL,
  `duration_id` int NOT NULL,
  `embypackage_id` int DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `comment` text COLLATE utf8mb4_unicode_ci,
  `date_to` date NOT NULL,
  `user_id` int NOT NULL,
  `screens` int NOT NULL DEFAULT '1',
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `json_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `with_transcode` tinyint(1) NOT NULL DEFAULT '1',
  `last_expiration_notification_sent_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `embydemos`
--

CREATE TABLE `embydemos` (
  `id` bigint UNSIGNED NOT NULL,
  `embyserver_id` int NOT NULL,
  `embypackage_id` int DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `hours` int NOT NULL,
  `date_to` datetime NOT NULL,
  `user_id` int NOT NULL,
  `json_data` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `embypackages`
--

CREATE TABLE `embypackages` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `embyserver_id` bigint UNSIGNED NOT NULL,
  `libraries` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `embyservers`
--

CREATE TABLE `embyservers` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `host` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `port` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `api_key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `with_live_tv` tinyint(1) NOT NULL DEFAULT '0',
  `is_dead` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `is_demo` tinyint(1) NOT NULL DEFAULT '0',
  `custom_config` tinyint(1) NOT NULL DEFAULT '0',
  `json_custom_config` text COLLATE utf8mb4_unicode_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

CREATE TABLE `failed_jobs` (
  `id` bigint UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `jellyfincustomers`
--

CREATE TABLE `jellyfincustomers` (
  `id` bigint UNSIGNED NOT NULL,
  `jellyfinserver_id` int NOT NULL,
  `duration_id` int NOT NULL,
  `jellyfinpackage_id` int DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `comment` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `date_to` date NOT NULL,
  `user_id` int NOT NULL,
  `screens` int NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `json_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `status` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `jellyfindemos`
--

CREATE TABLE `jellyfindemos` (
  `id` bigint UNSIGNED NOT NULL,
  `jellyfinserver_id` int NOT NULL,
  `jellyfinpackage_id` int DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `hours` int NOT NULL,
  `date_to` datetime NOT NULL,
  `user_id` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `json_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `jellyfinpackages`
--

CREATE TABLE `jellyfinpackages` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `jellyfinserver_id` bigint UNSIGNED NOT NULL,
  `libraries` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `jellyfinservers`
--

CREATE TABLE `jellyfinservers` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `port` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `api_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `with_live_tv` tinyint(1) NOT NULL DEFAULT '0',
  `is_dead` tinyint(1) NOT NULL DEFAULT '0',
  `is_demo` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint UNSIGNED NOT NULL,
  `queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `attempts` tinyint UNSIGNED NOT NULL,
  `reserved_at` int UNSIGNED DEFAULT NULL,
  `available_at` int UNSIGNED NOT NULL,
  `created_at` int UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `menus`
--

CREATE TABLE `menus` (
  `id` int UNSIGNED NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci 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 `menus`
--

INSERT INTO `menus` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'admin', '2023-07-30 22:59:57', '2023-07-30 22:59:57');

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

--
-- Estructura de tabla para la tabla `menu_items`
--

CREATE TABLE `menu_items` (
  `id` int UNSIGNED NOT NULL,
  `menu_id` int UNSIGNED DEFAULT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `target` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '_self',
  `icon_class` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `color` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `parent_id` int DEFAULT NULL,
  `order` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `route` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `parameters` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `menu_items` (`id`, `menu_id`, `title`, `url`, `target`, `icon_class`, `color`, `parent_id`, `order`, `created_at`, `updated_at`, `route`, `parameters`) VALUES
(1, 1, 'Dashboard', '', '_self', 'voyager-activity', '#60e2d9', NULL, 1, '2023-07-30 22:59:57', '2026-01-17 22:48:10', 'voyager.dashboard', 'null'),
(2, 1, 'Media', '', '_self', 'voyager-images', NULL, NULL, 8, '2023-07-30 22:59:57', '2025-07-17 14:18:33', 'voyager.media.index', NULL),
(3, 1, 'Revendedores', '', '_self', 'voyager-person', '#43a7e5', NULL, 5, '2023-07-30 22:59:57', '2025-07-15 19:23:15', 'voyager.users.index', 'null'),
(4, 1, 'Roles', '', '_self', 'voyager-lock', NULL, NULL, 7, '2023-07-30 22:59:57', '2025-07-15 19:23:15', 'voyager.roles.index', NULL),
(5, 1, 'Tools', '', '_self', 'voyager-tools', NULL, NULL, 9, '2023-07-30 22:59:57', '2025-07-17 14:18:33', NULL, NULL),
(6, 1, 'Menu Builder', '', '_self', 'voyager-list', NULL, 5, 1, '2023-07-30 22:59:57', '2023-07-31 00:11:52', 'voyager.menus.index', NULL),
(7, 1, 'Database', '', '_self', 'voyager-data', NULL, 5, 2, '2023-07-30 22:59:57', '2023-07-31 00:11:52', 'voyager.database.index', NULL),
(8, 1, 'Compass', '', '_self', 'voyager-compass', NULL, 5, 3, '2023-07-30 22:59:57', '2023-07-31 00:11:52', 'voyager.compass.index', NULL),
(9, 1, 'BREAD', '', '_self', 'voyager-bread', NULL, 5, 4, '2023-07-30 22:59:57', '2023-07-31 00:11:52', 'voyager.bread.index', NULL),
(10, 1, 'Settings', '', '_self', 'voyager-settings', NULL, NULL, 10, '2023-07-30 22:59:57', '2025-07-17 14:18:33', 'voyager.settings.index', NULL),
(11, 1, 'Creditos', '', '_self', 'voyager-dollar', '#39be09', NULL, 6, '2023-07-31 00:03:14', '2025-07-15 19:23:15', 'voyager.credits.index', 'null'),
(12, 1, 'Duraciones', '', '_self', 'voyager-alarm-clock', '#f4870b', NULL, 13, '2023-07-31 00:11:11', '2025-07-17 14:18:33', 'voyager.durations.index', 'null'),
(13, 1, 'Lista de Clientes', '', '_self', 'voyager-people', '#e8d46d', 20, 2, '2023-07-31 00:13:46', '2024-03-09 01:23:21', 'voyager.customers.index', 'null'),
(15, 1, 'Servidores', '', '_self', 'voyager-laptop', '#e8d46d', 20, 5, '2023-08-12 18:21:43', '2024-03-09 01:25:14', 'voyager.servers.index', 'null'),
(16, 1, 'Demos Activas', '', '_self', 'voyager-bell', '#e8d46d', 20, 4, '2023-09-01 16:46:11', '2024-03-09 01:25:14', 'voyager.demos.index', 'null'),
(17, 1, 'Dominios', '', '_self', 'voyager-font', '#a9f39b', NULL, 11, '2023-11-04 19:03:42', '2025-07-17 14:18:33', 'voyager.domains.index', 'null'),
(18, 1, 'Proxys', '', '_self', 'voyager-window-list', '#5f70ec', NULL, 12, '2023-11-04 19:05:14', '2025-07-17 14:18:33', 'voyager.proxies.index', 'null'),
(19, 1, 'Paquetes', '', '_self', 'voyager-logbook', '#e8d46d', 20, 6, '2024-02-05 13:24:04', '2024-03-09 01:25:14', 'voyager.packages.index', 'null'),
(20, 1, 'Plex', '#plex-menu', '_self', 'voyager-play', '#e8d46d', NULL, 2, '2024-02-19 17:28:10', '2026-01-17 22:49:36', NULL, ''),
(21, 1, 'JellyFin', '#jellyfin-menu', '_self', 'voyager-play', '#8012ed', NULL, 3, '2024-02-19 17:29:42', '2025-05-28 19:37:06', NULL, ''),
(22, 1, 'Servidores JellyFin', '', '_self', 'voyager-laptop', '#8012ed', 21, 5, '2024-02-19 17:49:30', '2024-03-09 01:29:17', 'voyager.jellyfinservers.index', 'null'),
(23, 1, 'Paquetes Jellyfin', '', '_self', 'voyager-logbook', '#8012ed', 21, 6, '2024-02-19 18:30:36', '2024-03-09 01:29:17', 'voyager.jellyfinpackages.index', 'null'),
(24, 1, 'Lista de Clientes', '', '_self', 'voyager-people', '#8012ed', 21, 2, '2024-02-19 18:50:50', '2024-03-09 01:28:17', 'voyager.jellyfincustomers.index', 'null'),
(25, 1, 'Demos Activas', '', '_self', 'voyager-bell', '#8012ed', 21, 4, '2024-02-19 19:12:45', '2024-03-09 01:29:17', 'voyager.jellyfindemos.index', 'null'),
(26, 1, 'Nuevo Cliente', '', '_self', 'voyager-new', '#e8d46d', 20, 1, '2024-03-09 01:23:14', '2024-03-09 01:24:28', 'voyager.customers.create', 'null'),
(27, 1, 'Nueva Demo', '', '_self', 'voyager-new', '#e8d46d', 20, 3, '2024-03-09 01:25:06', '2024-03-09 01:25:32', 'voyager.demos.create', 'null'),
(28, 1, 'Nuevo Cliente', '', '_self', 'voyager-new', '#8012ed', 21, 1, '2024-03-09 01:27:30', '2024-03-09 01:28:07', 'voyager.jellyfincustomers.create', 'null'),
(29, 1, 'Nueva Demo', '', '_self', 'voyager-new', '#7612ed', 21, 3, '2024-03-09 01:29:10', '2024-03-09 01:29:17', 'voyager.jellyfindemos.create', NULL),
(30, 1, 'Servidores', '', '_self', 'voyager-laptop', '#4caf50', 34, 5, '2025-07-15 13:42:31', '2025-07-17 14:18:33', 'voyager.embyservers.index', 'null'),
(31, 1, 'Paquetes Emby', '', '_self', 'voyager-logbook', '#4caf50', 34, 6, '2025-07-15 13:49:22', '2025-07-17 14:18:33', 'voyager.embypackages.index', 'null'),
(32, 1, 'Demos Activos', '', '_self', 'voyager-bell', '#4caf50', 34, 4, '2025-07-15 14:39:41', '2025-07-17 14:18:33', 'voyager.embydemos.index', 'null'),
(33, 1, 'Lista de Clientes', '', '_self', 'voyager-people', '#4caf50', 34, 2, '2025-07-15 15:38:40', '2025-07-17 14:16:47', 'voyager.embycustomers.index', 'null'),
(34, 1, 'Emby', '#emby-menu', '_self', 'voyager-play', '#4caf50', NULL, 4, '2025-07-15 19:22:23', '2026-01-17 22:49:42', NULL, ''),
(35, 1, 'Nuevo Cliente', '', '_self', 'voyager-new', '#4caf50', 34, 1, '2025-07-17 14:15:26', '2025-07-17 14:54:33', 'voyager.embycustomers.create', 'null'),
(36, 1, 'Nueva Demo', '', '_self', 'voyager-new', '#4baf50', 34, 3, '2025-07-17 14:17:54', '2025-07-17 14:18:33', 'voyager.embydemos.create', 'null'),
(37, 1, 'Notificaciones', '', '_self', 'voyager-mail', NULL, NULL, 14, '2025-07-26 18:47:20', '2025-07-26 18:47:20', 'voyager.notifications.index', NULL),
(38, 1, 'Categorías de Tickets', 'admin/ticket-categories', '_self', 'voyager-list', NULL, NULL, 15, '2026-01-19 18:17:59', '2026-01-19 18:17:59', NULL, NULL);

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

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

CREATE TABLE `migrations` (
  `id` int UNSIGNED NOT NULL,
  `migration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int 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_resets_table', 1),
(3, '2016_01_01_000000_add_voyager_user_fields', 1),
(4, '2016_01_01_000000_create_data_types_table', 1),
(5, '2016_05_19_173453_create_menu_table', 1),
(6, '2016_10_21_190000_create_roles_table', 1),
(7, '2016_10_21_190000_create_settings_table', 1),
(8, '2016_11_30_135954_create_permission_table', 1),
(9, '2016_11_30_141208_create_permission_role_table', 1),
(10, '2016_12_26_201236_data_types__add__server_side', 1),
(11, '2017_01_13_000000_add_route_to_menu_items_table', 1),
(12, '2017_01_14_005015_create_translations_table', 1),
(13, '2017_01_15_000000_make_table_name_nullable_in_permissions_table', 1),
(14, '2017_03_06_000000_add_controller_to_data_types_table', 1),
(15, '2017_04_21_000000_add_order_to_data_rows_table', 1),
(16, '2017_07_05_210000_add_policyname_to_data_types_table', 1),
(17, '2017_08_05_000000_add_group_to_settings_table', 1),
(18, '2017_11_26_013050_add_user_role_relationship', 1),
(19, '2017_11_26_015000_create_user_roles_table', 1),
(20, '2018_03_11_000000_add_user_settings', 1),
(21, '2018_03_14_000000_add_details_to_data_types_table', 1),
(22, '2018_03_16_000000_make_settings_value_nullable', 1),
(23, '2019_08_19_000000_create_failed_jobs_table', 1),
(24, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(25, '2023_07_30_194702_add_fields_in_user_table', 2),
(26, '2023_07_30_194744_create_credits_table', 2),
(27, '2023_07_30_194804_create_durations_table', 2),
(28, '2023_07_30_194821_create_customers_table', 2),
(29, '2023_07_30_194840_create_purchases_table', 2),
(30, '2023_07_30_220328_add_field_in_customers_table', 3),
(31, '2023_08_07_142516_add_user_name_and_token_in_customers_table', 4),
(32, '2023_08_07_153907_add_invited_id_field_in_customer', 5),
(33, '2023_08_07_203238_add_more_fields_in_customers_table', 6),
(34, '2023_08_12_131539_create_servers_table', 7),
(35, '2023_08_12_141720_add_server_id_in_customer_table', 8),
(37, '2023_09_01_123502_create_demos_table', 9),
(38, '2023_08_30_144103_add_accounts_count_field_in_server_table', 10),
(39, '2023_09_01_160405_add_fields_in_demos_table', 11),
(40, '2023_09_05_185418_add_user_id_in_demos_table', 12),
(41, '2023_09_12_125655_add_parent_user_field_in_users_table', 13),
(42, '2023_09_12_144707_add_user_id_field_in_credits_table', 14),
(43, '2023_10_02_071119_add_user_id_in_servers_table', 15),
(44, '2023_10_22_175246_add_limit_accounts_field_in_servers_table', 16),
(45, '2023_10_22_184424_create_table_user_servers', 17),
(46, '2023_10_22_201807_add_screens_field_in_customer_table', 18),
(48, '2023_10_22_205120_create_sessions_table', 19),
(49, '2023_11_03_154855_add_ip_field_in_customers_table', 20),
(50, '2023_11_03_155852_add_ip_field_in_demos_table', 21),
(51, '2023_11_04_103429_create_proxies_table', 22),
(52, '2023_11_04_103442_create_domains_table', 22),
(53, '2023_11_04_145547_add_domain_id_field_in_customers_table', 22),
(54, '2023_11_04_160303_add_proxy_id_field_in_customers_table', 23),
(55, '2023_11_06_174624_add_is_plex_pass_field_in_servers_table', 24),
(56, '2023_11_06_174650_add_pin_field_in_csutomers_table', 24),
(57, '2023_11_09_191754_add_local_name_field_in_servers_table', 25),
(58, '2023_11_09_192328_remove_nullable_false_in_name_in_customers_table', 26),
(59, '2023_11_24_151416_create_server_libraries_table', 27),
(60, '2023_12_06_085225_create_movements_table', 28),
(61, '2023_12_06_125617_create_movements_table', 29),
(62, '2023_12_06_140020_add_server_field_in_movements_table', 29),
(63, '2023_12_08_100443_add_amount_field_in_durations_table', 30),
(64, '2024_01_08_141501_add_telegram_user_name_field_in_customers_table', 31),
(65, '2024_01_08_151823_add_library_secion_for_remove_field_in_servers_table', 31),
(66, '2024_02_04_095603_add_observation_field_in_customers_table', 32),
(67, '2024_02_05_090600_create_packages_table', 33),
(68, '2024_02_05_091651_add_package_id_field_in_customerstable', 33),
(69, '2024_02_05_140417_add_package_id_field_in_demos_table', 34),
(70, '2024_02_19_132424_create_jellyfin_servers_table', 35),
(71, '2024_02_19_134156_add_type_service_field_in_durations_table', 36),
(72, '2024_02_19_141906_create_jellyfin_packages', 37),
(79, '2024_02_19_143945_create_jellyfin_customers_table', 38),
(80, '2024_02_19_150958_craete_jellyfin_demos_table', 38),
(82, '2024_02_20_095851_add_json_data_field_in_jellyfin_customers_table', 39),
(83, '2024_02_20_155802_add_json_data_field_in_jellyfin_demos_table', 40),
(84, '2024_02_28_201848_add_last_update_token_field_in_servers_table', 41),
(85, '2024_02_28_202218_add_json_data_field_in_servers_table', 42),
(86, '2024_04_15_183416_add_parent_user_id_field_in_movements_table', 43),
(87, '2024_05_20_155059_add_screen_field_in_durations_table', 44),
(88, '2024_08_29_101053_add_status_field_in_jellyfin_servers_table', 45),
(89, '2024_08_29_101805_add_status_field_in_jellyfin_customers_table', 46),
(90, '2024_11_11_135640_add_adtional_info_in_user_table', 47),
(91, '2025_02_03_084341_add_with_live_tv_field_in_jellyfinservers_table', 48),
(92, '2025_02_03_085421_add_aditional_credits_for_live_tv_in_durations_table', 48),
(93, '2025_05_28_152535_add_field_user_services_in_users_table', 49),
(94, '2025_07_03_174224_add_prefix_field_in_users_table', 50),
(95, '2025_07_05_134041_add_server_die_fiel_in_jellyfin_servers_table', 51),
(96, '2025_07_05_140800_add_is_dead_field_in_servers_table', 52),
(97, '2025_07_14_104517_create_emby_servers_table', 53),
(98, '2025_07_14_104538_create_emby_packages_table', 53),
(99, '2025_07_14_104552_create_emby_customers_table', 53),
(100, '2025_07_14_104606_create_emby_demos_table', 53),
(101, '2025_07_17_105951_update_service_enum_in_users_table', 54),
(102, '2025_07_26_143537_create_notifications_table', 55),
(103, '2025_08_04_174010_change_poster_column_in_notifications_table', 56),
(104, '2025_08_05_111323_add_each_hours_field_in_notifications_table', 57),
(105, '2025_08_20_162416_add_is_demo_in_emby_servers_table', 58),
(106, '2025_08_22_100000_create_channels_table', 59),
(107, '2025_10_03_080455_create_jobs_table', 60),
(108, '2025_12_02_140443_change_service_to_text_in_users_table', 61),
(109, '2025_10_31_141847_add_is_demo_field_in_jellyfin_servers_table', 62),
(111, '2026_01_07_133542_add_with_transcode_to_embycustomers_table', 63),
(112, '2026_01_09_123823_add_last_expiration_notification_sent_at_to_customers_table', 64),
(113, '2026_01_15_132505_add_last_expiration_notification_sent_at_to_embycustomers_table', 65),
(114, '2026_01_16_202647_add_custom_config_to_embyservers_table', 66),
(115, '2026_01_16_203642_add_bread_rows_for_embyservers_custom_config', 67),
(116, '2026_01_19_130202_create_tickets_tables', 67),
(117, '2026_01_19_140926_create_ticket_categories_table', 68),
(118, '2026_01_19_140937_add_ticket_category_id_to_tickets_table', 68),
(119, '2026_01_19_141720_add_ticket_categories_to_menu', 69),
(120, '2026_01_19_201921_create_content_requests_table', 70),
(121, '2026_01_21_124657_hide_last_expiration_notification_sent_at_from_customers_bread', 71),
(122, '2026_01_21_125333_hide_ip_address_from_customers_bread', 72);

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

--
-- Estructura de tabla para la tabla `movements`
--

CREATE TABLE `movements` (
  `id` bigint UNSIGNED NOT NULL,
  `user` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `customer` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `credits` int NOT NULL,
  `movement_time` datetime NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `server` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `parent_user_id` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `movements` (`id`, `user`, `customer`, `description`, `credits`, `movement_time`, `created_at`, `updated_at`, `server`, `parent_user_id`) VALUES
(1, 'Carlos Vargas (admin)', 'NToKptWX1Blt@hotmail.com', 'Eliminando Cliente', 0, '2026-01-23 12:29:39', '2026-01-23 16:29:39', '2026-01-23 16:29:39', 'PlexMow2 - Server 001', 33);

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

--
-- Estructura de tabla para la tabla `notifications`
--

CREATE TABLE `notifications` (
  `id` bigint UNSIGNED NOT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `poster` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `content` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `button_link_action` text COLLATE utf8mb4_unicode_ci,
  `date_to` date NOT NULL,
  `reads` text COLLATE utf8mb4_unicode_ci,
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `each_hours` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `packages`
--

CREATE TABLE `packages` (
  `id` bigint UNSIGNED NOT NULL,
  `server_id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `libraries` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `password_resets`
--

CREATE TABLE `password_resets` (
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `permissions`
--

CREATE TABLE `permissions` (
  `id` bigint UNSIGNED NOT NULL,
  `key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `table_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci 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 `permissions`
--

INSERT INTO `permissions` (`id`, `key`, `table_name`, `created_at`, `updated_at`) VALUES
(1, 'browse_admin', NULL, '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(2, 'browse_bread', NULL, '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(3, 'browse_database', NULL, '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(4, 'browse_media', NULL, '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(5, 'browse_compass', NULL, '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(6, 'browse_menus', 'menus', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(7, 'read_menus', 'menus', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(8, 'edit_menus', 'menus', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(9, 'add_menus', 'menus', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(10, 'delete_menus', 'menus', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(11, 'browse_roles', 'roles', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(12, 'read_roles', 'roles', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(13, 'edit_roles', 'roles', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(14, 'add_roles', 'roles', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(15, 'delete_roles', 'roles', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(16, 'browse_users', 'users', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(17, 'read_users', 'users', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(18, 'edit_users', 'users', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(19, 'add_users', 'users', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(20, 'delete_users', 'users', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(21, 'browse_settings', 'settings', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(22, 'read_settings', 'settings', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(23, 'edit_settings', 'settings', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(24, 'add_settings', 'settings', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(25, 'delete_settings', 'settings', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(26, 'browse_credits', 'credits', '2023-07-31 00:03:14', '2023-07-31 00:03:14'),
(27, 'read_credits', 'credits', '2023-07-31 00:03:14', '2023-07-31 00:03:14'),
(28, 'edit_credits', 'credits', '2023-07-31 00:03:14', '2023-07-31 00:03:14'),
(29, 'add_credits', 'credits', '2023-07-31 00:03:14', '2023-07-31 00:03:14'),
(30, 'delete_credits', 'credits', '2023-07-31 00:03:14', '2023-07-31 00:03:14'),
(31, 'browse_durations', 'durations', '2023-07-31 00:11:11', '2023-07-31 00:11:11'),
(32, 'read_durations', 'durations', '2023-07-31 00:11:11', '2023-07-31 00:11:11'),
(33, 'edit_durations', 'durations', '2023-07-31 00:11:11', '2023-07-31 00:11:11'),
(34, 'add_durations', 'durations', '2023-07-31 00:11:11', '2023-07-31 00:11:11'),
(35, 'delete_durations', 'durations', '2023-07-31 00:11:11', '2023-07-31 00:11:11'),
(36, 'browse_customers', 'customers', '2023-07-31 00:13:46', '2023-07-31 00:13:46'),
(37, 'read_customers', 'customers', '2023-07-31 00:13:46', '2023-07-31 00:13:46'),
(38, 'edit_customers', 'customers', '2023-07-31 00:13:46', '2023-07-31 00:13:46'),
(39, 'add_customers', 'customers', '2023-07-31 00:13:46', '2023-07-31 00:13:46'),
(40, 'delete_customers', 'customers', '2023-07-31 00:13:46', '2023-07-31 00:13:46'),
(46, 'browse_servers', 'servers', '2023-08-12 18:21:43', '2023-08-12 18:21:43'),
(47, 'read_servers', 'servers', '2023-08-12 18:21:43', '2023-08-12 18:21:43'),
(48, 'edit_servers', 'servers', '2023-08-12 18:21:43', '2023-08-12 18:21:43'),
(49, 'add_servers', 'servers', '2023-08-12 18:21:43', '2023-08-12 18:21:43'),
(50, 'delete_servers', 'servers', '2023-08-12 18:21:43', '2023-08-12 18:21:43'),
(51, 'browse_demos', 'demos', '2023-09-01 16:46:11', '2023-09-01 16:46:11'),
(52, 'read_demos', 'demos', '2023-09-01 16:46:11', '2023-09-01 16:46:11'),
(53, 'edit_demos', 'demos', '2023-09-01 16:46:11', '2023-09-01 16:46:11'),
(54, 'add_demos', 'demos', '2023-09-01 16:46:11', '2023-09-01 16:46:11'),
(55, 'delete_demos', 'demos', '2023-09-01 16:46:11', '2023-09-01 16:46:11'),
(56, 'browse_domains', 'domains', '2023-11-04 19:03:42', '2023-11-04 19:03:42'),
(57, 'read_domains', 'domains', '2023-11-04 19:03:42', '2023-11-04 19:03:42'),
(58, 'edit_domains', 'domains', '2023-11-04 19:03:42', '2023-11-04 19:03:42'),
(59, 'add_domains', 'domains', '2023-11-04 19:03:42', '2023-11-04 19:03:42'),
(60, 'delete_domains', 'domains', '2023-11-04 19:03:42', '2023-11-04 19:03:42'),
(61, 'browse_proxies', 'proxies', '2023-11-04 19:05:14', '2023-11-04 19:05:14'),
(62, 'read_proxies', 'proxies', '2023-11-04 19:05:14', '2023-11-04 19:05:14'),
(63, 'edit_proxies', 'proxies', '2023-11-04 19:05:14', '2023-11-04 19:05:14'),
(64, 'add_proxies', 'proxies', '2023-11-04 19:05:14', '2023-11-04 19:05:14'),
(65, 'delete_proxies', 'proxies', '2023-11-04 19:05:14', '2023-11-04 19:05:14'),
(66, 'browse_packages', 'packages', '2024-02-05 13:24:03', '2024-02-05 13:24:03'),
(67, 'read_packages', 'packages', '2024-02-05 13:24:03', '2024-02-05 13:24:03'),
(68, 'edit_packages', 'packages', '2024-02-05 13:24:03', '2024-02-05 13:24:03'),
(69, 'add_packages', 'packages', '2024-02-05 13:24:03', '2024-02-05 13:24:03'),
(70, 'delete_packages', 'packages', '2024-02-05 13:24:03', '2024-02-05 13:24:03'),
(71, 'browse_jellyfinservers', 'jellyfinservers', '2024-02-19 17:49:30', '2024-02-19 17:49:30'),
(72, 'read_jellyfinservers', 'jellyfinservers', '2024-02-19 17:49:30', '2024-02-19 17:49:30'),
(73, 'edit_jellyfinservers', 'jellyfinservers', '2024-02-19 17:49:30', '2024-02-19 17:49:30'),
(74, 'add_jellyfinservers', 'jellyfinservers', '2024-02-19 17:49:30', '2024-02-19 17:49:30'),
(75, 'delete_jellyfinservers', 'jellyfinservers', '2024-02-19 17:49:30', '2024-02-19 17:49:30'),
(76, 'browse_jellyfinpackages', 'jellyfinpackages', '2024-02-19 18:30:36', '2024-02-19 18:30:36'),
(77, 'read_jellyfinpackages', 'jellyfinpackages', '2024-02-19 18:30:36', '2024-02-19 18:30:36'),
(78, 'edit_jellyfinpackages', 'jellyfinpackages', '2024-02-19 18:30:36', '2024-02-19 18:30:36'),
(79, 'add_jellyfinpackages', 'jellyfinpackages', '2024-02-19 18:30:36', '2024-02-19 18:30:36'),
(80, 'delete_jellyfinpackages', 'jellyfinpackages', '2024-02-19 18:30:36', '2024-02-19 18:30:36'),
(81, 'browse_jellyfincustomers', 'jellyfincustomers', '2024-02-19 18:50:50', '2024-02-19 18:50:50'),
(82, 'read_jellyfincustomers', 'jellyfincustomers', '2024-02-19 18:50:50', '2024-02-19 18:50:50'),
(83, 'edit_jellyfincustomers', 'jellyfincustomers', '2024-02-19 18:50:50', '2024-02-19 18:50:50'),
(84, 'add_jellyfincustomers', 'jellyfincustomers', '2024-02-19 18:50:50', '2024-02-19 18:50:50'),
(85, 'delete_jellyfincustomers', 'jellyfincustomers', '2024-02-19 18:50:50', '2024-02-19 18:50:50'),
(86, 'browse_jellyfindemos', 'jellyfindemos', '2024-02-19 19:12:45', '2024-02-19 19:12:45'),
(87, 'read_jellyfindemos', 'jellyfindemos', '2024-02-19 19:12:45', '2024-02-19 19:12:45'),
(88, 'edit_jellyfindemos', 'jellyfindemos', '2024-02-19 19:12:45', '2024-02-19 19:12:45'),
(89, 'add_jellyfindemos', 'jellyfindemos', '2024-02-19 19:12:45', '2024-02-19 19:12:45'),
(90, 'delete_jellyfindemos', 'jellyfindemos', '2024-02-19 19:12:45', '2024-02-19 19:12:45'),
(91, 'browse_embyservers', 'embyservers', '2025-07-15 13:42:31', '2025-07-15 13:42:31'),
(92, 'read_embyservers', 'embyservers', '2025-07-15 13:42:31', '2025-07-15 13:42:31'),
(93, 'edit_embyservers', 'embyservers', '2025-07-15 13:42:31', '2025-07-15 13:42:31'),
(94, 'add_embyservers', 'embyservers', '2025-07-15 13:42:31', '2025-07-15 13:42:31'),
(95, 'delete_embyservers', 'embyservers', '2025-07-15 13:42:31', '2025-07-15 13:42:31'),
(96, 'browse_embypackages', 'embypackages', '2025-07-15 13:49:22', '2025-07-15 13:49:22'),
(97, 'read_embypackages', 'embypackages', '2025-07-15 13:49:22', '2025-07-15 13:49:22'),
(98, 'edit_embypackages', 'embypackages', '2025-07-15 13:49:22', '2025-07-15 13:49:22'),
(99, 'add_embypackages', 'embypackages', '2025-07-15 13:49:22', '2025-07-15 13:49:22'),
(100, 'delete_embypackages', 'embypackages', '2025-07-15 13:49:22', '2025-07-15 13:49:22'),
(101, 'browse_embydemos', 'embydemos', '2025-07-15 14:39:41', '2025-07-15 14:39:41'),
(102, 'read_embydemos', 'embydemos', '2025-07-15 14:39:41', '2025-07-15 14:39:41'),
(103, 'edit_embydemos', 'embydemos', '2025-07-15 14:39:41', '2025-07-15 14:39:41'),
(104, 'add_embydemos', 'embydemos', '2025-07-15 14:39:41', '2025-07-15 14:39:41'),
(105, 'delete_embydemos', 'embydemos', '2025-07-15 14:39:41', '2025-07-15 14:39:41'),
(106, 'browse_embycustomers', 'embycustomers', '2025-07-15 15:38:40', '2025-07-15 15:38:40'),
(107, 'read_embycustomers', 'embycustomers', '2025-07-15 15:38:40', '2025-07-15 15:38:40'),
(108, 'edit_embycustomers', 'embycustomers', '2025-07-15 15:38:40', '2025-07-15 15:38:40'),
(109, 'add_embycustomers', 'embycustomers', '2025-07-15 15:38:40', '2025-07-15 15:38:40'),
(110, 'delete_embycustomers', 'embycustomers', '2025-07-15 15:38:40', '2025-07-15 15:38:40'),
(111, 'browse_notifications', 'notifications', '2025-07-26 18:47:20', '2025-07-26 18:47:20'),
(112, 'read_notifications', 'notifications', '2025-07-26 18:47:20', '2025-07-26 18:47:20'),
(113, 'edit_notifications', 'notifications', '2025-07-26 18:47:20', '2025-07-26 18:47:20'),
(114, 'add_notifications', 'notifications', '2025-07-26 18:47:20', '2025-07-26 18:47:20'),
(115, 'delete_notifications', 'notifications', '2025-07-26 18:47:20', '2025-07-26 18:47:20');

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

--
-- Estructura de tabla para la tabla `permission_role`
--

CREATE TABLE `permission_role` (
  `permission_id` bigint UNSIGNED NOT NULL,
  `role_id` bigint UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `permission_role` (`permission_id`, `role_id`) VALUES
(1, 1),
(1, 3),
(1, 4),
(1, 5),
(1, 6),
(2, 1),
(3, 1),
(4, 1),
(5, 1),
(6, 1),
(7, 1),
(8, 1),
(9, 1),
(10, 1),
(11, 1),
(12, 1),
(13, 1),
(14, 1),
(15, 1),
(16, 1),
(16, 3),
(16, 4),
(16, 6),
(17, 1),
(17, 3),
(17, 4),
(17, 6),
(18, 1),
(18, 3),
(18, 4),
(18, 6),
(19, 1),
(19, 3),
(19, 4),
(19, 6),
(20, 1),
(20, 3),
(20, 4),
(20, 6),
(21, 1),
(21, 4),
(22, 1),
(22, 4),
(23, 1),
(23, 4),
(24, 1),
(24, 4),
(25, 1),
(26, 1),
(26, 3),
(26, 4),
(26, 6),
(27, 1),
(27, 3),
(27, 4),
(27, 6),
(28, 1),
(29, 1),
(29, 3),
(29, 4),
(29, 6),
(30, 1),
(31, 1),
(31, 4),
(32, 1),
(32, 4),
(33, 1),
(33, 4),
(34, 1),
(34, 4),
(35, 1),
(35, 4),
(36, 1),
(36, 3),
(36, 4),
(36, 5),
(36, 6),
(37, 1),
(37, 3),
(37, 4),
(37, 5),
(37, 6),
(38, 1),
(38, 3),
(38, 4),
(38, 5),
(38, 6),
(39, 1),
(39, 3),
(39, 4),
(39, 5),
(39, 6),
(40, 1),
(40, 4),
(40, 6),
(46, 1),
(46, 4),
(46, 6),
(47, 1),
(47, 4),
(47, 6),
(48, 1),
(48, 4),
(48, 6),
(49, 1),
(49, 4),
(49, 6),
(50, 1),
(50, 4),
(50, 6),
(51, 1),
(51, 3),
(51, 4),
(51, 5),
(51, 6),
(52, 1),
(52, 3),
(52, 4),
(52, 5),
(52, 6),
(53, 1),
(53, 3),
(53, 4),
(53, 5),
(53, 6),
(54, 1),
(54, 3),
(54, 4),
(54, 5),
(54, 6),
(55, 1),
(55, 3),
(55, 4),
(55, 5),
(55, 6),
(56, 1),
(56, 4),
(57, 1),
(57, 4),
(58, 1),
(58, 4),
(59, 1),
(59, 4),
(60, 1),
(60, 4),
(61, 1),
(61, 4),
(62, 1),
(62, 4),
(63, 1),
(63, 4),
(64, 1),
(64, 4),
(65, 1),
(65, 4),
(66, 1),
(66, 4),
(67, 1),
(67, 4),
(68, 1),
(68, 4),
(69, 1),
(69, 4),
(70, 1),
(70, 4),
(71, 1),
(71, 4),
(72, 1),
(72, 4),
(73, 1),
(73, 4),
(74, 1),
(74, 4),
(75, 1),
(75, 4),
(76, 1),
(76, 4),
(77, 1),
(77, 4),
(78, 1),
(78, 4),
(79, 1),
(79, 4),
(80, 1),
(80, 4),
(81, 1),
(81, 3),
(81, 4),
(81, 5),
(82, 1),
(82, 3),
(82, 4),
(82, 5),
(83, 1),
(83, 3),
(83, 4),
(83, 5),
(84, 1),
(84, 3),
(84, 4),
(84, 5),
(85, 1),
(85, 3),
(85, 4),
(85, 5),
(86, 1),
(86, 3),
(86, 4),
(86, 5),
(87, 1),
(87, 3),
(87, 4),
(87, 5),
(88, 1),
(88, 3),
(88, 4),
(88, 5),
(89, 1),
(89, 3),
(89, 4),
(89, 5),
(90, 1),
(90, 3),
(90, 4),
(90, 5),
(91, 1),
(91, 4),
(92, 1),
(92, 4),
(93, 1),
(93, 4),
(94, 1),
(94, 4),
(95, 1),
(95, 4),
(96, 1),
(96, 4),
(97, 1),
(97, 4),
(98, 1),
(98, 4),
(99, 1),
(99, 4),
(100, 1),
(100, 4),
(101, 1),
(101, 3),
(101, 4),
(101, 5),
(102, 1),
(102, 3),
(102, 4),
(102, 5),
(103, 1),
(103, 3),
(103, 4),
(103, 5),
(104, 1),
(104, 3),
(104, 4),
(104, 5),
(105, 1),
(105, 3),
(105, 4),
(105, 5),
(106, 1),
(106, 3),
(106, 4),
(106, 5),
(107, 1),
(107, 3),
(107, 4),
(107, 5),
(108, 1),
(108, 3),
(108, 4),
(108, 5),
(109, 1),
(109, 3),
(109, 4),
(109, 5),
(110, 1),
(110, 3),
(110, 4),
(110, 5),
(111, 1),
(111, 4),
(112, 1),
(112, 4),
(113, 1),
(113, 4),
(114, 1),
(114, 4),
(115, 1),
(115, 4);

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

--
-- Estructura de tabla para la tabla `personal_access_tokens`
--

CREATE TABLE `personal_access_tokens` (
  `id` bigint UNSIGNED NOT NULL,
  `tokenable_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tokenable_id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `abilities` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `last_used_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `proxies`
--

CREATE TABLE `proxies` (
  `id` bigint UNSIGNED NOT NULL,
  `ip` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `port` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `roles`
--

CREATE TABLE `roles` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `display_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci 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 `roles`
--

INSERT INTO `roles` (`id`, `name`, `display_name`, `created_at`, `updated_at`) VALUES
(1, 'admin', 'Administrator', '2023-07-30 22:59:57', '2023-07-30 22:59:57'),
(3, 'Super Reseller', 'Super Vendedor', '2023-07-31 00:05:24', '2023-09-12 15:50:36'),
(4, 'general_admin', 'Administrador General', '2023-07-31 01:21:27', '2023-07-31 01:21:27'),
(5, 'Reseller', 'Vendedor', '2023-09-12 15:51:06', '2023-09-12 15:51:06'),
(6, 'Limited Admin', 'Administrador Limitado', '2023-10-02 10:56:59', '2023-10-02 10:57:32');

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

--
-- Estructura de tabla para la tabla `servers`
--

CREATE TABLE `servers` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_demo` tinyint(1) NOT NULL DEFAULT '0',
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `accounts_count` int DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `limit_accounts` int DEFAULT '0',
  `is_plex_pass` tinyint(1) NOT NULL DEFAULT '0',
  `local_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `library_section_for_remove` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `last_token_update` datetime DEFAULT NULL,
  `json_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `is_dead` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `server_libraries`
--

CREATE TABLE `server_libraries` (
  `id` bigint UNSIGNED NOT NULL,
  `server_id` bigint UNSIGNED NOT NULL,
  `library_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `sessions`
--

CREATE TABLE `sessions` (
  `id` bigint UNSIGNED NOT NULL,
  `server_id` int NOT NULL,
  `plex_user_id` int NOT NULL,
  `plex_session_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `settings`
--

CREATE TABLE `settings` (
  `id` int UNSIGNED NOT NULL,
  `key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `display_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `details` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `order` int NOT NULL DEFAULT '1',
  `group` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `settings` (`id`, `key`, `display_name`, `value`, `details`, `type`, `order`, `group`) VALUES
(1, 'site.title', 'Site Title', 'Site Title', '', 'text', 1, 'Site'),
(2, 'site.description', 'Site Description', 'Site Description', '', 'text', 2, 'Site'),
(3, 'site.logo', 'Site Logo', '', '', 'image', 3, 'Site'),
(4, 'site.google_analytics_tracking_id', 'Google Analytics Tracking ID', 'https://www.google.com', '', 'text', 4, 'Site'),
(5, 'admin.bg_image', 'Admin Background Image', 'settings/January2026/8wFX94pkW0LgLqrs2hx7.png', '', 'image', 5, 'Admin'),
(6, 'admin.title', 'Admin Title', 'StreamSync Panel', '', 'text', 1, 'Admin'),
(7, 'admin.description', 'Admin Description', 'Controla de manera optima tus servicios de Plex, Jellyfin y Emby', '', 'text', 2, 'Admin'),
(8, 'admin.loader', 'Admin Loader', '', '', 'image', 3, 'Admin'),
(9, 'admin.icon_image', 'Admin Icon Image', '', '', 'image', 4, 'Admin'),
(10, 'admin.google_analytics_client_id', 'Google Analytics Client ID (used for admin dashboard)', '19455541', '', 'text', 1, 'Admin'),
(13, 'admin.credits_number', 'Whatsapp Para Solicitar Creditos', NULL, NULL, 'text', 8, 'Admin'),
(15, 'admin.dynamic_server', 'Servidor Dinamico', '0', '', 'checkbox', 1, 'Admin'),
(16, 'admin.iphone_for_all', 'Convertir a Iphone Para Todos', '0', '', 'checkbox', 1, 'Admin'),
(17, 'admin.show_only_server_local_name', 'Mostrar solo el nombre local en los servidores', '0', '', 'checkbox', 1, 'Admin'),
(18, 'admin.iphone_only_server', 'Mostrar Servidores Solo Para Convertir a Iphone', '0', '', 'checkbox', 1, 'Admin'),
(19, 'admin.server_for_alls', 'Mostrar Servidores Para Cuentas y Demos', '1', '', 'checkbox', 1, 'Admin'),
(20, 'admin.screen_message', 'Mensaje para mostrar cuando sobre pasen las pantallas Asignadas', NULL, '', 'text', 1, 'Admin'),
(21, 'admin.extra_options_limited', 'Opciones Extras Limitadas', '1', '', 'checkbox', 1, 'Admin'),
(22, 'admin.show_ip_address_all', 'Mostrar Ip Proxy A Todos Roles', '0', '', 'checkbox', 1, 'Admin'),
(23, 'admin.add_account_not_password_for_all', 'Agregar Cuentas Sin Clave Para Todos', '0', '', 'checkbox', 1, 'Admin'),
(24, 'admin.account_expiration_days', 'Dias de aviso, vencimiento de cuenta', '31', '', 'text', 1, 'Admin'),
(25, 'admin.active_proxies', 'Activar Uso de Proxy', '0', '', 'checkbox', 1, 'Admin'),
(26, 'admin.only_remove_libraries', 'Solo remover librerias al momento de quitar el Servicio', '0', '', 'checkbox', 1, 'Admin'),
(27, 'admin.days_of_grace', 'Dias de Gracia', '0', '', 'text', 1, 'Admin'),
(28, 'admin.register_without_password_always', 'Registrar Siempre Sin Clave', '0', '', 'checkbox', 1, 'Admin'),
(29, 'admin.ssl_force', 'Forzar Conexion Https', '0', '', 'checkbox', 1, 'Admin'),
(30, 'admin.limit_the_sessions', 'Limitar las Sessiones', '0', '', 'checkbox', 1, 'Admin'),
(31, 'admin.max_reseller_screen', 'Cantidad Maxima de Pantallas para Revendedores', '1', '', 'text', 1, 'Admin'),
(32, 'admin.onlyemaildomain', 'Generar Solo Nombre de Dominio', '0', '', 'checkbox', 1, 'Admin'),
(33, 'admin.demos_no_credit', 'Permitir Demos Sin Creditos', '1', '', 'checkbox', 1, 'Admin'),
(34, 'admin.aditional_credits_jellyfin_live_tv', 'Creditos Adicionales para tv en vivo (Solo Jellyfin)', '1', '', 'text', 1, 'Admin'),
(35, 'admin.prefix_by_resellers', 'Agregar Prefijos de Revendedores a Clientes', '0', '', 'checkbox', 1, 'Admin'),
(36, 'admin.enable_plex_monitor', 'Activar Monitor de Plex', '0', '', 'checkbox', 1, 'Admin'),
(37, 'admin.enable_super_reseller_create', 'Permitir que los super vendedores creen otros super vendedores', '0', '', 'checkbox', 1, 'Admin'),
(38, 'admin.enable_jellyfin_monitor', 'Activar Monitor de Jellyfin', '0', '', 'checkbox', 1, 'Admin'),
(40, 'admin.login_alignment', 'Alineación del Formulario de Login', 'center', '{\"default\":\"right\",\"options\":{\"center\":\"Centro\",\"left\":\"Izquierda\",\"right\":\"Derecha\"}}', 'select_dropdown', 1, 'Admin'),
(41, 'admin.login_style', 'Estilo del Formulario de Login', 'transparent', '{\"default\":\"default\",\"options\":{\"default\":\"Por Defecto\",\"transparent\":\"Transparente\"}}', 'select_dropdown', 1, 'Admin'),
(42, 'admin.enable_jellyfin_live_tv_credit_validation', 'Activar Validacion de Creditos para Servidores Jellyfin con TV en vivo', '0', '', 'checkbox', 1, 'Admin'),
(43, 'admin.enable_emby_monitor', 'Activar Monitor de Emby', '0', '', 'checkbox', 1, 'Admin'),
(63, 'landing.enable_landing_page', 'Activar Landing Page', '0', '', 'checkbox', 1, 'Landing'),
(64, 'landing.contact_email', 'Email de Contacto', 'wmcarlosv@gmail.com', '', 'text', 2, 'Landing'),
(65, 'landing.contact_whatsapp', 'Whatsapp de Contacto', '+584245093801', '', 'text', 3, 'Landing'),
(66, 'landing.contact_telegram', 'Telegram de Contacto', '@wmcarlosv', '', 'text', 4, 'Landing'),
(67, 'landing.plex_server', 'Servidor Plex', NULL, '{\"default\":\"default\",\"options\":{\"default\":\"Seleccione\"}}', 'select_dropdown', 5, 'Landing'),
(68, 'landing.jellyfin_server', 'Servidor Jellyfin', NULL, '{\"default\":\"default\",\"options\":{\"default\":\"Seleccione\"}}', 'select_dropdown', 6, 'Landing'),
(69, 'landing.emby_server', 'Servidor Emby', NULL, '{\"default\":\"default\",\"options\":{\"default\":\"Seleccione\"}}', 'select_dropdown', 7, 'Landing'),
(70, 'landing.brandName', 'Nombre de la Marca', 'STREAMING SRV', '', 'text', 10, 'Landing'),
(71, 'landing.title', 'Título de la Página', 'Servidores de Streaming | Plex, Emby & Jellyfin', '', 'text', 11, 'Landing'),
(72, 'landing.heroTitle', 'Título Principal (Hero)', 'Tu contenido, a tu manera. Totalmente optimizado.', '', 'text', 12, 'Landing'),
(73, 'landing.heroSubtitle', 'Subtítulo (Hero)', 'Disfruta de tus películas, series y música con la potencia y flexibilidad de servidores optimizados.', '', 'text_area', 13, 'Landing'),
(74, 'landing.heroCtaText', 'Texto del Botón Principal', 'Comienza Ahora', '', 'text', 14, 'Landing'),
(75, 'landing.contactTitle', 'Título de Contacto', '¿Tienes alguna pregunta?', '', 'text', 15, 'Landing'),
(76, 'landing.contactSubtitle', 'Subtítulo de Contacto', 'Estamos aquí para ayudarte. Rellena el formulario o contáctanos directamente.', '', 'text_area', 50, 'Landing'),
(77, 'landing.colors_primary', 'Color Primario (Botones)', '#e50914', '', 'color_picker', 16, 'Landing'),
(78, 'landing.colors_primary_hover', 'Color Primario (Hover)', '#f40612', '', 'color_picker', 51, 'Landing'),
(79, 'landing.colors_background_dark', 'Fondo Principal (Oscuro)', '#101010', '', 'color_picker', 52, 'Landing'),
(80, 'landing.colors_background_light', 'Fondo Secundario (Claro)', '#1c1c1c', '', 'color_picker', 53, 'Landing'),
(81, 'landing.colors_card_background', 'Fondo de Tarjetas', '#222222', '', 'color_picker', 54, 'Landing'),
(82, 'landing.colors_text_primary', 'Color de Texto Principal', '#ffffff', '', 'color_picker', 55, 'Landing'),
(83, 'landing.colors_text_secondary', 'Color de Texto Secundario', '#cccccc', '', 'color_picker', 56, 'Landing'),
(84, 'landing.colors_accent_plex', 'Color de Acento (Plex)', '#e5a00d', '', 'color_picker', 57, 'Landing'),
(85, 'landing.colors_accent_emby', 'Color de Acento (Emby)', '#14c5c8', '', 'color_picker', 58, 'Landing'),
(86, 'landing.colors_accent_jellyfin', 'Color de Acento (Jellyfin)', '#9405cc', '', 'color_picker', 59, 'Landing'),
(87, 'landing.hero_background_image', 'Imagen de Fondo (Sección Principal)', 'settings/July2025/lEEq0vAdKrmu8AcmiTEl.jpg', '', 'image', 15, 'Landing'),
(91, 'landing.platform_order', 'Orden de Secciones y Menu de las Plataformas', '[\"plex\",\"jellyfin\",\"emby\"]', '', 'text', 16, 'Landing'),
(92, 'landing.enable_contact_form', 'Habilitar Formulario de Contacto', '0', '', 'checkbox', 17, 'Landing'),
(93, 'landing.hero_button_link', 'Link boton Hero', '/admin/login', '', 'text', 18, 'Landing'),
(94, 'admin.enable_demos_jelly_and_emby', 'permitir demos en jellyfin y emby', '1', '', 'checkbox', 1, 'Admin'),
(95, 'site.enable_landing_page', 'Activar Landing Page', '0', '', 'checkbox', 5, 'Site'),
(96, 'site.contact_email', 'Email de Contacto', NULL, '', 'text', 6, 'Site'),
(97, 'site.contact_whatsapp', 'Whatsapp de Contacto', NULL, '', 'text', 7, 'Site'),
(98, 'site.contact_telegram', 'Telegram de Contacto', NULL, '', 'text', 8, 'Site'),
(99, 'site.plex_server', 'Servidor Plex', 'default', '{\"default\":\"default\",\"options\":{\"default\":\"Seleccione\"}}', 'select_dropdown', 9, 'Site'),
(100, 'site.jellyfin_server', 'Servidor Jellyfin', 'default', '{\"default\":\"default\",\"options\":{\"default\":\"Seleccione\"}}', 'select_dropdown', 10, 'Site'),
(101, 'site.emby_server', 'Servidor Emby', 'default', '{\"default\":\"default\",\"options\":{\"default\":\"Seleccione\"}}', 'select_dropdown', 11, 'Site'),
(102, 'emby.connect_email', 'Email de Emby Connect', 'wmcarlosv@gmail.com', '', 'text', 1, 'Emby'),
(103, 'emby.connect_password', 'Password de Emby Connect', 'Car2244los*', '', 'text', 2, 'Emby'),
(104, 'plex.days_before_expiration', 'Días previos al vencimiento (Plex)', '31', '', 'text', 1, 'Plex'),
(105, 'plex.expiration_message', 'Mensaje de aviso de vencimiento (Plex)', 'Hola {name}, tu suscripción de Plex en el servidor {server_name} vence el {date_to}. Tu plan actual es {package_name} ({duration_name}).', 'Variables disponibles: {name}, {email}, {date_to}, {server_name}, {package_name}, {duration_name}', 'text_area', 2, 'Plex'),
(106, 'emby.expiration_message', 'Mensaje de aviso de vencimiento (Emby)', 'Hola {name}, tu suscripción de Emby en el servidor {server_name} vence el {date_to}. Tu plan actual es {package_name} ({duration_name}).', 'Variables disponibles: {name}, {email}, {date_to}, {server_name}, {package_name}, {duration_name}', 'text_area', 3, 'Emby'),
(107, 'plex.copy_template', 'Plantilla de Copia (Plex)', '*Visita Nuestra Cartelera*\r\n{host}\r\n*Panel*: {admin_url}\r\n\r\n**PLEX PREMIUM**\r\nCorreo: {email}\r\nClave: {password}\r\nUsuario: {user}\r\nPantallas: {screens}\r\nFecha de Vencimiento: {date_to}\r\n{extra_info}', 'Variables: {host}, {admin_url}, {email}, {password}, {user}, {screens}, {date_to}, {pin}, {extra_info}, {invite_url}', 'text_area', 3, 'Plex'),
(108, 'emby.copy_template', 'Plantilla de Copia (Emby/Jellyfin)', '*Visita Nuestra Cartelera*\r\n{host}\r\n*Panel*: {admin_url}\r\n\r\n**EMBY/JELLYFIN PREMIUM**\r\nCorreo: {email}\r\nClave: {password}\r\nUsuario: {user}\r\nPantallas: {screens}\r\nFecha de Vencimiento: {date_to}\r\n{extra_info}', 'Variables: {host}, {admin_url}, {email}, {password}, {user}, {screens}, {date_to}, {extra_info}', 'text_area', 4, 'Emby'),
(109, 'admin.imdb_api_key', 'IMDB (OMDB) API Key', '9f175163', 'API Key para búsqueda de películas y series (http://www.omdbapi.com/)', 'text', 99, 'Admin'),
(110, 'admin.tmdb_api_key', 'TMDB API Key', '849aaf3e8025476fa049d6129a8a3e7e', 'API Key para búsqueda de contenido (https://www.themoviedb.org/)', 'text', 99, 'Admin'),
(111, 'site.in_maintenance', 'Sistema en Mantenimiento', '0', 'Si se activa, solo los Administradores podrán acceder.', 'checkbox', 100, 'Site'),
(112, 'admin.telegram_bot_token', 'Telegram Bot Token', '8457519982:AAEojrMl70RBC_x8YVsMeKBFhajonzuk--8', 'Token del Bot de Telegram para notificaciones', 'text', 96, 'Admin'),
(113, 'admin.telegram_channel_id', 'Telegram Channel ID', '@turecetaonline', 'ID del Canal de Telegram (ej: -100xxxxxxxx)', 'text', 97, 'Admin'),
(114, 'admin.plex_server_id_for_notifications', 'ID Servidor Plex (Notificaciones)', '153', 'ID numérico del servidor Plex a monitorear (Ver tabla Servidores)', 'text', 98, 'Admin'),
(115, 'admin.telegram_message_template', 'Plantilla Mensaje Telegram', '🎬  <b>Título:</b> <i>{title} ({year}) - {content_rating}</i>\r\n🏢  <b>Estudio:</b> <i>{studio}</i>\r\n👷🏻  <b>Director:</b> <i>{directors}</i>\r\n👫  <b>Actores:</b> <i>{actors:[1:5]}</i>\r\n🕓  <b>Duración:</b> <i>{duration} minutos</i>\r\n🎭  <b>Género:</b> <i>{genres}</i>\r\n⚙️  <b>Formato archivo:</b><i>{video_resolution}p  ({file_size})</i>\r\n🔗  <b>Enlace a TMDb:</b> <a href=\"{themoviedb_url}\">{themoviedb_url}</a>\r\n🔗  <b>Biblioteca:</b> {library_name}', 'Variables disponibles: {title}, {year}, {summary}, {type}, {original_title}, {rating}, {duration}, {director}, {genre}', 'text_area', 98, 'Admin'),
(116, 'emby.telegram_bot_token', 'Telegram Bot Token', '8457519982:AAEojrMl70RBC_x8YVsMeKBFhajonzuk--8', 'Token del Bot de Telegram para notificaciones de Emby', 'text', 10, 'Emby'),
(117, 'emby.telegram_channel_id', 'Telegram Channel ID', '@turecetaonline', 'ID del Canal de Telegram (ej: -100xxxxxxxx)', 'text', 11, 'Emby'),
(118, 'emby.telegram_server_id', 'ID Servidor Emby (Notificaciones)', '20', 'ID numérico del servidor Emby a monitorear (Ver tabla Servidores)', 'text', 12, 'Emby'),
(119, 'emby.telegram_message_template', 'Plantilla Mensaje Telegram', '🎬  <b>Título:</b> <i>{title} ({year}) - {content_rating}</i>\r\n🏢  <b>Estudio:</b> <i>{studio}</i>\r\n👷🏻  <b>Director:</b> <i>{directors}</i>\r\n👫  <b>Actores:</b> <i>{actors:[1:5]}</i>\r\n🕓  <b>Duración:</b> <i>{duration} minutos</i>\r\n🎭  <b>Género:</b> <i>{genres}</i>\r\n⚙️  <b>Formato archivo:</b><i>{video_resolution}p  ({file_size})</i>\r\n🔗  <b>Enlace a TMDb:</b> <a href=\"{themoviedb_url}\">{themoviedb_url}</a>\r\n🔗  <b>Biblioteca:</b> {library_name}', 'Variables: {title}, {year}, {summary}, {type}, {server_name}, {imdb_url}, {tmdb_url}', 'text_area', 13, 'Emby');

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

--
-- Estructura de tabla para la tabla `tickets`
--

CREATE TABLE `tickets` (
  `id` bigint UNSIGNED NOT NULL,
  `type` enum('intern','public') COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `user_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `platform` enum('emby','jellyfin','plex') COLLATE utf8mb4_unicode_ci NOT NULL,
  `ticket_category_id` bigint UNSIGNED DEFAULT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `attachments` json DEFAULT NULL,
  `status` enum('waiting','in_progress','closed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'waiting',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `ticket_categories`
--

CREATE TABLE `ticket_categories` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci 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 `ticket_categories`
--

INSERT INTO `ticket_categories` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'Soporte Técnico', '2026-01-19 18:10:06', '2026-01-19 18:10:06'),
(2, 'Facturación', '2026-01-19 18:10:06', '2026-01-19 18:10:06'),
(3, 'Ventas', '2026-01-19 18:10:06', '2026-01-19 18:10:06'),
(4, 'Otros', '2026-01-19 18:10:06', '2026-01-19 18:10:06');

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

--
-- Estructura de tabla para la tabla `ticket_messages`
--

CREATE TABLE `ticket_messages` (
  `id` bigint UNSIGNED NOT NULL,
  `ticket_id` bigint UNSIGNED NOT NULL,
  `message` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `attachments` json DEFAULT NULL,
  `type` enum('support','user') COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `translations`
--

CREATE TABLE `translations` (
  `id` int UNSIGNED NOT NULL,
  `table_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `column_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `foreign_key` int UNSIGNED NOT NULL,
  `locale` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `users`
--

CREATE TABLE `users` (
  `id` bigint UNSIGNED NOT NULL,
  `role_id` bigint UNSIGNED DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'users/default.png',
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `remember_token` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `settings` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `total_credits` int NOT NULL DEFAULT '0',
  `status` enum('active','inactive') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',
  `parent_user_id` int DEFAULT NULL,
  `aditional_info` text COLLATE utf8mb4_unicode_ci,
  `service` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `prefix` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `users` (`id`, `role_id`, `name`, `email`, `avatar`, `email_verified_at`, `password`, `remember_token`, `settings`, `created_at`, `updated_at`, `total_credits`, `status`, `parent_user_id`, `aditional_info`, `service`, `prefix`) VALUES
(33, 1, 'Carlos Vargas', 'admin@gmail.com', 'users/September2024/ZDH6PCWnWYorqrf4AXG1.png', NULL, '$2y$10$M6VpBqtYowC9aA7Nx8iSR.RjbCns1ZGnhMTNXjcJYgTCoonwy9xFW', NULL, NULL, '2023-10-15 23:50:31', '2024-09-18 19:31:00', 0, 'active', 33, NULL, 'all', NULL),
(59, 4, 'administrador', 'administrador@gmail.com', 'users/October2024/GDI6ERsbhhCeS3hJPoh3.webp', NULL, '$2y$10$LwpOV375ds1Jei83BxrUHu/mer7l4U9KqqWinAo9k6Sw6H1oG83Cq', NULL, NULL, '2023-12-23 16:20:21', '2024-10-01 14:43:19', 0, 'active', 33, NULL, 'all', NULL),
(102, 5, 'alberto vargas', 'seller@gmail.com', 'users/default.png', NULL, '$2y$10$WQo0nlsJtIi6b1LJsoh6xuQsaLH8xyQ.tL219BIOJx4KC6bbVdiau', NULL, NULL, '2026-01-20 03:55:13', '2026-01-20 03:55:13', 0, 'active', 59, NULL, '\"[\\\"plex\\\"]\"', NULL);

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

--
-- Estructura de tabla para la tabla `user_roles`
--

CREATE TABLE `user_roles` (
  `user_id` bigint UNSIGNED NOT NULL,
  `role_id` bigint UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `user_servers`
--

CREATE TABLE `user_servers` (
  `id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `server_id` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `channels`
--
ALTER TABLE `channels`
  ADD PRIMARY KEY (`id`),
  ADD KEY `channels_embyserver_id_foreign` (`embyserver_id`);

--
-- Indices de la tabla `content_requests`
--
ALTER TABLE `content_requests`
  ADD PRIMARY KEY (`id`),
  ADD KEY `content_requests_user_id_index` (`user_id`),
  ADD KEY `content_requests_customer_id_index` (`customer_id`),
  ADD KEY `content_requests_status_index` (`status`);

--
-- Indices de la tabla `credits`
--
ALTER TABLE `credits`
  ADD PRIMARY KEY (`id`),
  ADD KEY `credits_user_id_foreign` (`user_id`);

--
-- Indices de la tabla `customers`
--
ALTER TABLE `customers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `customers_user_id_foreign` (`user_id`),
  ADD KEY `customers_duration_id_foreign` (`duration_id`);

--
-- Indices de la tabla `data_rows`
--
ALTER TABLE `data_rows`
  ADD PRIMARY KEY (`id`),
  ADD KEY `data_rows_data_type_id_foreign` (`data_type_id`);

--
-- Indices de la tabla `data_types`
--
ALTER TABLE `data_types`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `data_types_name_unique` (`name`),
  ADD UNIQUE KEY `data_types_slug_unique` (`slug`);

--
-- Indices de la tabla `demos`
--
ALTER TABLE `demos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `demos_server_id_foreign` (`server_id`);

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

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

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

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

--
-- Indices de la tabla `embypackages`
--
ALTER TABLE `embypackages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `embypackages_embyserver_id_foreign` (`embyserver_id`);

--
-- Indices de la tabla `embyservers`
--
ALTER TABLE `embyservers`
  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 `jellyfincustomers`
--
ALTER TABLE `jellyfincustomers`
  ADD PRIMARY KEY (`id`);

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

--
-- Indices de la tabla `jellyfinpackages`
--
ALTER TABLE `jellyfinpackages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jellyfinpackages_jellyfinserver_id_foreign` (`jellyfinserver_id`);

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

--
-- Indices de la tabla `jobs`
--
ALTER TABLE `jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobs_queue_index` (`queue`);

--
-- Indices de la tabla `menus`
--
ALTER TABLE `menus`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `menus_name_unique` (`name`);

--
-- Indices de la tabla `menu_items`
--
ALTER TABLE `menu_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `menu_items_menu_id_foreign` (`menu_id`);

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

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

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

--
-- Indices de la tabla `packages`
--
ALTER TABLE `packages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `packages_server_id_foreign` (`server_id`);

--
-- Indices de la tabla `password_resets`
--
ALTER TABLE `password_resets`
  ADD KEY `password_resets_email_index` (`email`);

--
-- Indices de la tabla `permissions`
--
ALTER TABLE `permissions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `permissions_key_index` (`key`);

--
-- Indices de la tabla `permission_role`
--
ALTER TABLE `permission_role`
  ADD PRIMARY KEY (`permission_id`,`role_id`),
  ADD KEY `permission_role_permission_id_index` (`permission_id`),
  ADD KEY `permission_role_role_id_index` (`role_id`);

--
-- Indices de la tabla `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
  ADD KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`);

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

--
-- Indices de la tabla `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `roles_name_unique` (`name`);

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

--
-- Indices de la tabla `server_libraries`
--
ALTER TABLE `server_libraries`
  ADD PRIMARY KEY (`id`),
  ADD KEY `server_libraries_server_id_foreign` (`server_id`);

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

--
-- Indices de la tabla `settings`
--
ALTER TABLE `settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `settings_key_unique` (`key`);

--
-- Indices de la tabla `tickets`
--
ALTER TABLE `tickets`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tickets_user_id_user_type_index` (`user_id`,`user_type`),
  ADD KEY `tickets_ticket_category_id_foreign` (`ticket_category_id`);

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

--
-- Indices de la tabla `ticket_messages`
--
ALTER TABLE `ticket_messages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ticket_messages_ticket_id_foreign` (`ticket_id`);

--
-- Indices de la tabla `translations`
--
ALTER TABLE `translations`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `translations_table_name_column_name_foreign_key_locale_unique` (`table_name`,`column_name`,`foreign_key`,`locale`);

--
-- Indices de la tabla `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_email_unique` (`email`),
  ADD KEY `users_role_id_foreign` (`role_id`);

--
-- Indices de la tabla `user_roles`
--
ALTER TABLE `user_roles`
  ADD PRIMARY KEY (`user_id`,`role_id`),
  ADD KEY `user_roles_user_id_index` (`user_id`),
  ADD KEY `user_roles_role_id_index` (`role_id`);

--
-- Indices de la tabla `user_servers`
--
ALTER TABLE `user_servers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_servers_server_id_foreign` (`server_id`),
  ADD KEY `user_servers_user_id_foreign` (`user_id`);

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `channels`
--
ALTER TABLE `channels`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7928;

--
-- AUTO_INCREMENT de la tabla `content_requests`
--
ALTER TABLE `content_requests`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `credits`
--
ALTER TABLE `credits`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=71;

--
-- AUTO_INCREMENT de la tabla `customers`
--
ALTER TABLE `customers`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2263;

--
-- AUTO_INCREMENT de la tabla `data_rows`
--
ALTER TABLE `data_rows`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=258;

--
-- AUTO_INCREMENT de la tabla `data_types`
--
ALTER TABLE `data_types`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

--
-- AUTO_INCREMENT de la tabla `demos`
--
ALTER TABLE `demos`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=112;

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

--
-- AUTO_INCREMENT de la tabla `durations`
--
ALTER TABLE `durations`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;

--
-- AUTO_INCREMENT de la tabla `embycustomers`
--
ALTER TABLE `embycustomers`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=48;

--
-- AUTO_INCREMENT de la tabla `embydemos`
--
ALTER TABLE `embydemos`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT de la tabla `embypackages`
--
ALTER TABLE `embypackages`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de la tabla `embyservers`
--
ALTER TABLE `embyservers`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

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

--
-- AUTO_INCREMENT de la tabla `jellyfincustomers`
--
ALTER TABLE `jellyfincustomers`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=102;

--
-- AUTO_INCREMENT de la tabla `jellyfindemos`
--
ALTER TABLE `jellyfindemos`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=48;

--
-- AUTO_INCREMENT de la tabla `jellyfinpackages`
--
ALTER TABLE `jellyfinpackages`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT de la tabla `jellyfinservers`
--
ALTER TABLE `jellyfinservers`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;

--
-- AUTO_INCREMENT de la tabla `jobs`
--
ALTER TABLE `jobs`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `menus`
--
ALTER TABLE `menus`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `menu_items`
--
ALTER TABLE `menu_items`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=39;

--
-- AUTO_INCREMENT de la tabla `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=123;

--
-- AUTO_INCREMENT de la tabla `movements`
--
ALTER TABLE `movements`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `notifications`
--
ALTER TABLE `notifications`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT de la tabla `packages`
--
ALTER TABLE `packages`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;

--
-- AUTO_INCREMENT de la tabla `permissions`
--
ALTER TABLE `permissions`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=116;

--
-- AUTO_INCREMENT de la tabla `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `proxies`
--
ALTER TABLE `proxies`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=202;

--
-- AUTO_INCREMENT de la tabla `roles`
--
ALTER TABLE `roles`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT de la tabla `servers`
--
ALTER TABLE `servers`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=154;

--
-- AUTO_INCREMENT de la tabla `server_libraries`
--
ALTER TABLE `server_libraries`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;

--
-- AUTO_INCREMENT de la tabla `sessions`
--
ALTER TABLE `sessions`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=616;

--
-- AUTO_INCREMENT de la tabla `settings`
--
ALTER TABLE `settings`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=120;

--
-- AUTO_INCREMENT de la tabla `tickets`
--
ALTER TABLE `tickets`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `ticket_categories`
--
ALTER TABLE `ticket_categories`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de la tabla `ticket_messages`
--
ALTER TABLE `ticket_messages`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT de la tabla `translations`
--
ALTER TABLE `translations`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `users`
--
ALTER TABLE `users`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=103;

--
-- AUTO_INCREMENT de la tabla `user_servers`
--
ALTER TABLE `user_servers`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- Restricciones para tablas volcadas
--

--
-- Filtros para la tabla `channels`
--
ALTER TABLE `channels`
  ADD CONSTRAINT `channels_embyserver_id_foreign` FOREIGN KEY (`embyserver_id`) REFERENCES `embyservers` (`id`) ON DELETE CASCADE;

--
-- Filtros para la tabla `credits`
--
ALTER TABLE `credits`
  ADD CONSTRAINT `credits_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON UPDATE CASCADE;

--
-- Filtros para la tabla `customers`
--
ALTER TABLE `customers`
  ADD CONSTRAINT `customers_duration_id_foreign` FOREIGN KEY (`duration_id`) REFERENCES `durations` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  ADD CONSTRAINT `customers_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON UPDATE CASCADE;

--
-- Filtros para la tabla `data_rows`
--
ALTER TABLE `data_rows`
  ADD CONSTRAINT `data_rows_data_type_id_foreign` FOREIGN KEY (`data_type_id`) REFERENCES `data_types` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Filtros para la tabla `demos`
--
ALTER TABLE `demos`
  ADD CONSTRAINT `demos_server_id_foreign` FOREIGN KEY (`server_id`) REFERENCES `servers` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;

--
-- Filtros para la tabla `embypackages`
--
ALTER TABLE `embypackages`
  ADD CONSTRAINT `embypackages_embyserver_id_foreign` FOREIGN KEY (`embyserver_id`) REFERENCES `embyservers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Filtros para la tabla `jellyfinpackages`
--
ALTER TABLE `jellyfinpackages`
  ADD CONSTRAINT `jellyfinpackages_jellyfinserver_id_foreign` FOREIGN KEY (`jellyfinserver_id`) REFERENCES `jellyfinservers` (`id`);

--
-- Filtros para la tabla `menu_items`
--
ALTER TABLE `menu_items`
  ADD CONSTRAINT `menu_items_menu_id_foreign` FOREIGN KEY (`menu_id`) REFERENCES `menus` (`id`) ON DELETE CASCADE;

--
-- Filtros para la tabla `packages`
--
ALTER TABLE `packages`
  ADD CONSTRAINT `packages_server_id_foreign` FOREIGN KEY (`server_id`) REFERENCES `servers` (`id`);

--
-- Filtros para la tabla `permission_role`
--
ALTER TABLE `permission_role`
  ADD CONSTRAINT `permission_role_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `permission_role_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Filtros para la tabla `server_libraries`
--
ALTER TABLE `server_libraries`
  ADD CONSTRAINT `server_libraries_server_id_foreign` FOREIGN KEY (`server_id`) REFERENCES `servers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Filtros para la tabla `tickets`
--
ALTER TABLE `tickets`
  ADD CONSTRAINT `tickets_ticket_category_id_foreign` FOREIGN KEY (`ticket_category_id`) REFERENCES `ticket_categories` (`id`) ON DELETE SET NULL;

--
-- Filtros para la tabla `ticket_messages`
--
ALTER TABLE `ticket_messages`
  ADD CONSTRAINT `ticket_messages_ticket_id_foreign` FOREIGN KEY (`ticket_id`) REFERENCES `tickets` (`id`) ON DELETE CASCADE;

--
-- Filtros para la tabla `users`
--
ALTER TABLE `users`
  ADD CONSTRAINT `users_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`);

--
-- Filtros para la tabla `user_roles`
--
ALTER TABLE `user_roles`
  ADD CONSTRAINT `user_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `user_roles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Filtros para la tabla `user_servers`
--
ALTER TABLE `user_servers`
  ADD CONSTRAINT `user_servers_server_id_foreign` FOREIGN KEY (`server_id`) REFERENCES `servers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `user_servers_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;

