-- Active: 1776528123145@@192.168.100.177@3306@nucleo_base
DROP TABLE IF EXISTS systems;
DROP TABLE IF EXISTS systems_modules;

CREATE TABLE `systems` (
  `sys_id` int(11) NOT NULL,
  `sys_name` varchar(255) DEFAULT NULL,
  `sys_description` tinytext,
  `sys_pathurl` varchar(500) DEFAULT NULL,
  `sys_path` varchar(500) DEFAULT NULL,
  `sys_mod_default` int (11) NOT NULL DEFAULT '0',
  `sys_code` varchar(11) NOT NULL,
  `sys_icon` varchar(240) DEFAULT NULL,
  `sys_color` varchar(10) DEFAULT NULL,
  `sys_parent_id` int(11) DEFAULT NULL,
  `sys_indexjs` varchar(255) NOT NULL,
  `sys_css` varchar(255) NOT NULL,
  `sys_order` int(11) NOT NULL,
  `sys_state` int(11) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

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

INSERT INTO `systems` (`sys_id`, `sys_name`, `sys_description`, `sys_pathurl`, `sys_path`, `sys_mod_default`,`sys_code`, `sys_icon`, `sys_color`, `sys_parent_id`, `sys_indexjs`, `sys_css`, `sys_order`, `sys_state`) VALUES
(1, 'Websites', 'Gestión de sitios web y contenidos', 'websites', 'systems/websites/', '10', '', 'icon icon-code', '#6F91E9', 0, 'components/websites.js', 'assets/css/dist/websites.css', 0, 1),
(2, 'RRHH', "Sistema de Recursos Humanos", 'rrhh', 'systems/rrhh/', '200', '', 'icon icon-category', '#6F91E9', 0, 'components/rrhh.js', 'assets/css/dist/rrhh.css', 0, 1),
(6, 'Consejeria', NULL, 'counseling', 'systems/counseling/', '600', '', 'icon icon-users', '#27d27c', 0, 'components/counseling.js', 'assets/css/dist/counseling.css', 0, 1),
(7, 'Ventas', NULL, 'sales', 'systems/sales/', '700', '', 'icon icon-sales', '#fc9835', 0, 'components/sales.js', 'assets/css/dist/sales.css', 0, 0),
(10, 'Suscriptiones', NULL, 'suscriptions', 'core/accounts/', '1000', '', 'icon icon-tag', '#1be5fc', 0, 'components/subscriptions.js', 'assets/css/dist/subscriptions.css', 0, 1),
(12, 'Finalcial Services Leeds', NULL, 'fls', 'systems/fls/', '1200', '', 'icon icon-circle', '#27d27c', 0, 'components/fls.js', 'assets/css/dist/fls.css', 0, 0),
(13, 'Boletería', NULL, 'tickets', 'systems/tickets/', '1300', '', 'icon icon-tag', '#27d27c', 0, 'components/tickets.js', 'assets/css/dist/tickets.min.css', 0, 1),
(16, 'LMS', NULL, 'lms', 'systems/lms/', '1600', '', 'icon icon-graduation', '#FEBF10', 0, 'components/lms.js', 'assets/css/dist/lms.min.css', 0, 1),
(19, 'CRM', "Customer Relationship Management - Gestión de Relaciones con Clientes", 'crm', 'systems/crm/', '1900', '', 'icon icon-crm', '#ef4848', 0, 'components/crm.js', 'assets/css/dist/crm.min.css', 0, 1),
(20, 'Restaurant', NULL, 'restaurants', 'systems/restaurants/', '2000', '', 'icon icon-restaurant', '#6b6fa9', 0, 'components/restaurants.js', 'assets/css/dist/restaurants.min.css', 0, 1),
(23, 'Deportes', NULL, 'sports', 'systems/sports/', '2200', '', 'icon icon-sport', '#ff7629', 0, 'components/sports.js', 'assets/css/dist/sports.min.css', 0, 1),
(24, 'Concursos', NULL, 'competitions', 'systems/competitions/', '2400', '', 'icon icon-copy', '#ff3333', 0, 'components/competitions.js', 'assets/css/dist/competitions.min.css', 0, 1),
(30, 'CMS', 'Content Management System', 'cms', 'systems/cms/', '30', '', 'icon icon-blocks', '#99C14C', 0, 'components/cms.js', 'assets/css/dist/cms.min.css', 99, 1),
(37, 'Tributo App', NULL, 'app_tributo', 'systems/app_tributo/', '3700', '', 'icon icon-coin', '#003767', 0, 'components/app_tributo.js', 'assets/css/dist/app_tributo.min.css', 0, 1),
(38, 'Finanzas', 'Gestión Financiera y Contabilidad General', 'finance', 'systems/finance/', '3800', '', 'icon icon-coin', '#10b981', 0, 'components/finance.js', 'assets/css/dist/finance.min.css', 0, 1),
(39, 'REMS', 'Real Estate Management System - Gestión de Inmobiliarias y Propiedades', 'rems', 'systems/rems/', '3900', '', 'icon icon-home', '#003900', 0, 'components/rems.js', 'assets/css/dist/rems.min.css', 0, 1),
(40, 'PIM', 'Product Information Management - Gestión de Información de Productos', 'pim', 'systems/pim/', '4000', '', 'icon icon-box', '#f59e0b', 0, 'components/pim.js', 'assets/css/dist/pim.min.css', 0, 1),
(41, 'WMS', 'Warehouse Management System - Gestión de Almacenes e Inventario', 'wms', 'systems/wms/', '4100', '', 'icon icon-checked', '#06b6d4', 0, 'components/wms.js', 'assets/css/dist/wms.min.css', 0, 1),
(42, 'OMS', 'Order Management System - Gestión de Órdenes y Fulfillment', 'oms', 'systems/oms/', '4200', '', 'icon icon-sales', '#ef4444', 0, 'components/oms.js', 'assets/css/dist/oms.min.css', 0, 1),
(43, 'FSS', 'Financial Settlement System - Sistema de Liquidación Financiera', 'fss', 'systems/fss/', '4300', '', 'icon icon-coin', '#14b8a6', 0, 'components/fss.js', 'assets/css/dist/fss.min.css', 0, 1),
(44, 'CCM', 'Customer & Communication Management - Gestión de Clientes y Comunicación', 'ccm', 'systems/ccm/', '4400', '', 'icon icon-users', '#ec4899', 0, 'components/ccm.js', 'assets/css/dist/ccm.min.css', 0, 1),
(45, 'BI Analytics', 'Business Intelligence - Análisis y Reportes', 'bi', 'systems/bi/', '4500', '', 'icon icon-table-check', '#6366f1', 0, 'components/bi.js', 'assets/css/dist/bi.min.css', 0, 1),
(46, 'VMS', 'Vendor Management System - Gestión de Vendedores', 'vms', 'systems/vms/', '4600', '', 'icon icon-users', '#8b5cf6', 0, 'components/vms.js', 'assets/css/dist/vms.min.css', 0, 1),
(47, 'Administración y Finanzas', 'Gestión administrativa y financiera', 'admin-finance', 'systems/admin_finance/', '4700', '', 'icon icon-coin', '#0ea5e9', 0, 'components/admin_finance.js', 'assets/css/dist/admin_finance.min.css', 0, 1),
(48, 'Proyectos', '(PS) Proyect System Gestión estructurada de proyectos', 'ps', 'systems/ps/', '4800', '', 'icon icon-operations', '#3b82f6', 0, 'components/ps.js', 'assets/css/dist/ps.css', 0, 1)
;

--
-- Indices de la tabla `systems`
--
ALTER TABLE `systems`
  ADD PRIMARY KEY (`sys_id`) USING BTREE;

--
-- AUTO_INCREMENT de la tabla `systems`
--
ALTER TABLE `systems`
  MODIFY `sys_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=50;
COMMIT;

CREATE TABLE `systems_modules` (
  `sys_mod_sys_id` int(11) NOT NULL,
  `sys_mod_mod_id` int(11) NOT NULL,
  `sys_mod_ent_id` int(11) NOT NULL,
  `sys_mod_order` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

INSERT INTO `systems_modules` (`sys_mod_sys_id`, `sys_mod_mod_id`, `sys_mod_ent_id`, `sys_mod_order`) VALUES
(1, 10, 1, 1),
(1, 11, 1, 2),
(1, 12, 1, 3),
(1, 13, 1, 4),
(1, 14, 1, 5),
(1, 15, 1, 6),
(1, 16, 1, 7),
(1, 17, 1, 8),
(1, 18, 1, 9),
(1, 19, 1, 10),
(1, 20, 1, 11),
(2, 200, 1, 1),
(2, 210, 1, 2),
(2, 220, 1, 3),
(2, 221, 1, 4),
(2, 222, 1, 5),
(2, 223, 1, 6),
(2, 224, 1, 7),
(2, 225, 1, 8),
(2, 226, 1, 9),
(2, 227, 1, 10),
(6, 600, 1, 1),
(6, 601, 1, 2),
(6, 602, 1, 3),
(6, 603, 1, 4),
(7, 700, 1, 1),
(7, 701, 1, 2),
(10, 1000, 1, 1),
(10, 1001, 1, 2),
(10, 1002, 1, 3),
(12, 1200, 1, 1),
(12, 1201, 1, 2),
(13, 1300, 1, 1),
(13, 1301, 1, 2),
(16, 1600, 1, 1),
(16, 1601, 1, 2),
(19, 1900, 1, 1),
(19, 1901, 1, 2),
(19, 1902, 1, 3),
(19, 1903, 1, 4),
(20, 2000, 1, 1),
(20, 2001, 1, 2),
(23, 2300, 1, 1),
(23, 2301, 1, 2),
(24, 2400, 1, 1),
(37, 3700, 1, 1),
(37, 3701, 1, 2),
(37, 3702, 1, 3),
(37, 3703, 1, 4),
(38, 3800, 1, 1),
(38, 3801, 1, 2),
(38, 3802, 1, 3),
(39, 3900, 1, 1),
(39, 3901, 1, 2),
(39, 3902, 1, 3),
(39, 3903, 1, 4),
(39, 3904, 1, 5),
(39, 3905, 1, 6),
(39, 3907, 1, 8),
(39, 3908, 1, 9),
(39, 3909, 1, 10),
(39, 3910, 1, 11),
(39, 3911, 1, 12),
(39, 3912, 1, 13),
(39, 3913, 1, 14),
(39, 3914, 1, 15),
(39, 3915, 1, 16),
(39, 3917, 1, 17),
(40, 4000, 1, 1),
(40, 4001, 1, 2),
(40, 4002, 1, 3),
(40, 4003, 1, 4),
(41, 4100, 1, 1),
(41, 4101, 1, 2),
(41, 4102, 1, 3),
(42, 4200, 1, 1),
(42, 4201, 1, 2),
(42, 4202, 1, 3),
(42, 4203, 1, 4),
(42, 4204, 1, 5),
(43, 4300, 1, 1),
(43, 4301, 1, 2),
(44, 4400, 1, 1),
(44, 4401, 1, 2),
(44, 4402, 1, 3),
(45, 4500, 1, 1),
(45, 4501, 1, 2),
(45, 4502, 1, 3),
(46, 4600, 1, 1),
(46, 4601, 1, 2),
(46, 4602, 1, 3),
(19, 1904, 1, 5),
(19, 1905, 1, 6),
(38, 3803, 1, 4),
(47, 4700, 1, 1),
(47, 4701, 1, 2),
(47, 4702, 1, 3),
(47, 4703, 1, 4),
(48, 4800, 1, 1),
(48, 4801, 1, 2),
(48, 4802, 1, 3),
(30, 300, 1, 1),
(30, 3, 1, 2),
(30, 301, 1, 3),
(30, 302, 1, 4),
(30, 303, 1, 5),
(30, 304, 1, 6),
(30, 305, 1, 7),
(30, 306, 1, 8),
(30, 307, 1, 9),
(30, 308, 1, 10),
(30, 309, 1, 11),
(30, 310, 1, 12)
;


--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `systems_modules`
--
ALTER TABLE `systems_modules`
  ADD PRIMARY KEY (`sys_mod_sys_id`,`sys_mod_mod_id`,`sys_mod_ent_id`) USING BTREE;
 
