/*
 Navicat Premium Data Transfer

 Source Server         : dev-server
 Source Server Type    : MySQL
 Source Server Version : 50741
 Source Host           : 177.222.32.121:3306
 Source Schema         : nucleo_base

 Target Server Type    : MySQL
 Target Server Version : 50741
 File Encoding         : 65001

 Date: 08/07/2023 10:50:26
*/


-- ----------------------------
-- Table structure for blocks
-- ----------------------------
CREATE TABLE `blocks` (
  `block_id` int(11) NOT NULL AUTO_INCREMENT,
  `block_name` varchar(255) NOT NULL,
  `block_class` varchar(44) DEFAULT NULL,
  `block_order` int(11) DEFAULT NULL,
  `block_parent_id` int(11) NOT NULL,
  `block_ent_id` int(11) NOT NULL DEFAULT '0',
  `block_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`block_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of blocks
-- ----------------------------
BEGIN;
INSERT INTO `blocks` VALUES (1, 'Header', 'headerPage', 1, 0, 1, 1);
INSERT INTO `blocks` VALUES (2, 'Body', 'bodyPage', 2, 0, 1, 1);
INSERT INTO `blocks` VALUES (3, 'Footer', 'footerPage', 3, 0, 1, 1);
COMMIT;

-- ----------------------------
-- Table structure for categorys
-- ----------------------------
CREATE TABLE `categorys` (
  `cat_id` int(11) NOT NULL AUTO_INCREMENT,
  `cat_name` varchar(255) DEFAULT NULL,
  `cat_path` varchar(255) DEFAULT NULL,
  `cat_pathurl` varchar(1000) DEFAULT NULL,
  `cat_description` text,
  `cat_order` int(11) DEFAULT NULL,
  `cat_parent_id` int(11) DEFAULT '0',
  `cat_related` varchar(255) DEFAULT NULL,
  `cat_icon` varchar(30) DEFAULT NULL,
  `cat_color` varchar(11) DEFAULT NULL,
  `cat_img` int(11) DEFAULT NULL,
  `cat_banner` int(11) DEFAULT NULL,
  `cat_ent_id` int(11) DEFAULT NULL,
  `cat_configpath` varchar(400) DEFAULT NULL,
  `cat_cls` varchar(255) DEFAULT NULL,
  `cat_json` text,
  `cat_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`cat_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of categorys
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for categorys_files
-- ----------------------------
CREATE TABLE `categorys_files` (
  `cat_file_file_id` int(11) NOT NULL,
  `cat_file_cat_id` int(11) NOT NULL,
  `cat_file_order` int(11) NOT NULL,
  PRIMARY KEY (`cat_file_file_id`,`cat_file_cat_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of categorys_files
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for contents
-- ----------------------------
CREATE TABLE `contents` (
  `cont_id` int(11) NOT NULL AUTO_INCREMENT,
  `cont_title` varchar(255) NOT NULL,
  `cont_pathurl` varchar(255) NOT NULL,
  `cont_summary` text,
  `cont_tags` varchar(300) DEFAULT NULL,
  `cont_img` int(11) DEFAULT NULL,
  `cont_body` text,
  `cont_author` int(11) DEFAULT NULL,
  `cont_register_date` datetime DEFAULT NULL,
  `cont_user_id` int(11) DEFAULT NULL COMMENT 'user register',
  `cont_notitle` int(11) DEFAULT '0',
  `cont_url` varchar(255) DEFAULT NULL,
  `cont_btn_title` varchar(45) DEFAULT NULL,
  `cont_icon` varchar(21) DEFAULT NULL,
  `cont_target` varchar(12) NOT NULL DEFAULT '_blank',
  `cont_cls` varchar(255) NOT NULL COMMENT 'css class',
  `cont_json` text,
  `cont_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`cont_id`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of contents
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for contents_categorys
-- ----------------------------
CREATE TABLE `contents_categorys` (
  `cont_cat_cont_id` int(11) NOT NULL,
  `cont_cat_cat_id` int(11) NOT NULL,
  `cont_cat_ent_id` int(11) DEFAULT NULL,
  `cont_cat_order` int(11) NOT NULL,
  PRIMARY KEY (`cont_cat_cont_id`,`cont_cat_cat_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of contents_categorys
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for contents_files
-- ----------------------------
CREATE TABLE `contents_files` (
  `cont_file_cont_id` int(11) NOT NULL,
  `cont_file_file_id` int(11) NOT NULL,
  `cont_file_title` varchar(255) NOT NULL,
  `cont_file_summary` text,
  `cont_file_url` varchar(255) NOT NULL,
  `cont_file_btn_title` varchar(255) DEFAULT NULL,
  `cont_file_icon` varchar(25) DEFAULT NULL,
  `cont_file_target` varchar(255) NOT NULL DEFAULT '_blank',
  `cont_file_order` int(11) NOT NULL,
  PRIMARY KEY (`cont_file_cont_id`,`cont_file_file_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of contents_files
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for contents_pubs
-- ----------------------------
CREATE TABLE `contents_pubs` (
  `cont_pub_cont_id` int(11) NOT NULL,
  `cont_pub_pub_id` int(11) NOT NULL,
  `cont_pub_order` int(11) NOT NULL,
  PRIMARY KEY (`cont_pub_cont_id`,`cont_pub_pub_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of contents_pubs
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Records of entities
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for files
-- ----------------------------
CREATE TABLE `files` (
  `file_id` int(11) NOT NULL AUTO_INCREMENT,
  `file_name` varchar(255) DEFAULT NULL,
  `file_description` varchar(255) DEFAULT NULL,
  `file_pathurl` varchar(1000) DEFAULT NULL,
  `file_embed` varchar(500) DEFAULT NULL,
  `file_btn_title` varchar(255) DEFAULT NULL,
  `file_ext` varchar(11) DEFAULT NULL,
  `file_alt` varchar(250) DEFAULT NULL,
  `file_title` varchar(255) DEFAULT NULL,
  `file_filename_md5` binary(255) DEFAULT NULL,
  `file_datatime` datetime DEFAULT NULL,
  `file_ent_id` int(11) DEFAULT NULL,
  `file_state` int(11) DEFAULT '0',
  PRIMARY KEY (`file_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=86 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of files
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for groups
-- ----------------------------
CREATE TABLE `groups` (
  `group_id` int(11) NOT NULL AUTO_INCREMENT,
  `group_name` varchar(255) DEFAULT NULL,
  `group_description` tinytext,
  `group_state` int(11) DEFAULT NULL,
  PRIMARY KEY (`group_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of groups
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for groups_files
-- ----------------------------
CREATE TABLE `groups_files` (
  `group_file_group_id` int(11) NOT NULL,
  `group_file_file_id` int(11) NOT NULL,
  `group_file_order` int(11) NOT NULL,
  PRIMARY KEY (`group_file_group_id`,`group_file_file_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of groups_files
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for links
-- ----------------------------
CREATE TABLE `links` (
  `lnk_id` int(11) NOT NULL AUTO_INCREMENT,
  `lnk_title` varchar(455) DEFAULT NULL,
  `lnk_description` varchar(445) DEFAULT NULL,
  `lnk_tags` varchar(455) DEFAULT NULL,
  `lnk_url` varchar(455) DEFAULT '#',
  `lnk_target` varchar(12) DEFAULT '_blank',
  `lnk_icon` varchar(255) DEFAULT NULL,
  `lnk_attr` varchar(120) DEFAULT NULL,
  `lnk_cls` varchar(45) DEFAULT NULL,
  `lnk_alt` varchar(120) DEFAULT NULL,
  `lnk_img` int(11) DEFAULT NULL,
  `lnk_json` text,
  `lnk_ent_id` int(11) DEFAULT NULL,
  `lnk_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`lnk_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of links
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for links_categorys
-- ----------------------------
CREATE TABLE `links_categorys` (
  `lnk_cat_cat_id` int(11) NOT NULL,
  `lnk_cat_lnk_id` int(11) NOT NULL,
  `lnk_cat_order` int(11) DEFAULT NULL,
  PRIMARY KEY (`lnk_cat_cat_id`,`lnk_cat_lnk_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of links_categorys
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for links_pubs
-- ----------------------------
CREATE TABLE `links_pubs` (
  `lnk_pub_pub_id` int(11) NOT NULL,
  `lnk_pub_lnk_id` int(11) NOT NULL,
  `lnk_pub_order` int(11) NOT NULL,
  PRIMARY KEY (`lnk_pub_pub_id`,`lnk_pub_lnk_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of links_pubs
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for menus
-- ----------------------------
CREATE TABLE `menus` (
  `menu_id` int(11) NOT NULL AUTO_INCREMENT,
  `menu_name` varchar(255) NOT NULL,
  `menu_description` tinytext,
  `menu_ent_id` int(11) DEFAULT NULL,
  `menu_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`menu_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of menus
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for menus_items
-- ----------------------------
CREATE TABLE `menus_items` (
  `menu_item_id` int(11) NOT NULL AUTO_INCREMENT,
  `menu_item_name` varchar(255) NOT NULL,
  `menu_item_description` tinytext,
  `menu_item_menu_id` int(11) DEFAULT NULL,
  `menu_item_cat_id` int(11) DEFAULT NULL,
  `menu_item_cat_active` int(11) DEFAULT '0',
  `menu_item_pathurl` varchar(400) DEFAULT NULL,
  `menu_item_target` varchar(12) NOT NULL DEFAULT '_self',
  `menu_item_parent_id` int(11) DEFAULT '0',
  `menu_item_icon` int(11) DEFAULT NULL,
  `menu_item_img` int(11) DEFAULT NULL,
  `menu_item_order` int(11) DEFAULT NULL,
  `menu_item_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`menu_item_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of menus_items
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_accounting_plan
-- ----------------------------
CREATE TABLE `mod_accounting_plan` (
  `mod_acp_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_acp_name` varchar(255) DEFAULT NULL,
  `mod_acp_descripcion` varchar(450) DEFAULT NULL,
  `mod_acp_parent_id` int(11) DEFAULT NULL,
  `mod_acp_code` varchar(255) DEFAULT NULL,
  `mod_acp_level` int(11) DEFAULT NULL,
  `mod_acp_coin` varchar(5) DEFAULT NULL,
  `mod_acp_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_acp_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_accounting_plan
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_accounts_addresses
-- ----------------------------
CREATE TABLE `mod_accounts_addresses` (
  `mod_acu_add_acu_id` int(11) NOT NULL,
  `mod_acu_add_add_id` int(11) NOT NULL,
  `mod_acu_add_order` int(11) NOT NULL,
  PRIMARY KEY (`mod_acu_add_acu_id`,`mod_acu_add_add_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_accounts_addresses
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_accounts_ads
-- ----------------------------
CREATE TABLE `mod_accounts_ads` (
  `mod_aca_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_aca_cen_id` int(11) NOT NULL,
  `mod_aca_name` varchar(255) NOT NULL,
  `mod_aca_description` longtext,
  `mod_aca_code` int(11) DEFAULT NULL,
  `mod_aca_ent_id` int(11) DEFAULT NULL,
  `mod_aca_state` int(11) DEFAULT NULL,
  PRIMARY KEY (`mod_aca_id`,`mod_aca_cen_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_accounts_ads
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_accounts_invoices_data
-- ----------------------------
CREATE TABLE `mod_accounts_invoices_data` (
  `mod_acu_invd_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_acu_invd_acu_id` int(11) NOT NULL,
  `mod_acu_invd_razon_social` varchar(255) DEFAULT NULL,
  `mod_acu_invd_nit` int(11) NOT NULL,
  `mod_acu_invd_order` int(11) NOT NULL,
  `mod_acu_invd_state` int(11) DEFAULT '0',
  PRIMARY KEY (`mod_acu_invd_id`,`mod_acu_invd_acu_id`,`mod_acu_invd_nit`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_accounts_invoices_data
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_accounts_roles
-- ----------------------------
CREATE TABLE `mod_accounts_roles` (
  `mod_acu_rol_id` int(11) NOT NULL,
  `mod_acu_rol_name` varchar(255) DEFAULT NULL,
  `mod_acu_rol_description` varchar(255) DEFAULT NULL,
  `mod_acu_rol_parent_id` int(11) DEFAULT NULL,
  `mod_acu_rol_redirection_url` varchar(1000) DEFAULT NULL,
  `mod_acu_rol_json` text,
  `mod_acu_rol_state` int(11) DEFAULT '0',
  PRIMARY KEY (`mod_acu_rol_id`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_accounts_roles
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_accounts_services
-- ----------------------------
CREATE TABLE `mod_accounts_services` (
  `mod_acu_sv_sv_id` int(11) NOT NULL,
  `mod_acu_sv_acu_id` int(11) NOT NULL,
  `mod_acu_sv_order` int(11) NOT NULL,
  PRIMARY KEY (`mod_acu_sv_sv_id`,`mod_acu_sv_acu_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_accounts_services
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Records of mod_accounts_token
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Records of mod_accounts_users
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_accounts_users_roles
-- ----------------------------
CREATE TABLE `mod_accounts_users_roles` (
  `mod_acu_user_rol_acu_id` int(11) NOT NULL,
  `mod_acu_user_rol_rol_id` int(11) NOT NULL,
  `mod_acu_user_rol_ent_id` int(11) NOT NULL,
  `mod_acu_user_rol_order` int(11) NOT NULL,
  PRIMARY KEY (`mod_acu_user_rol_acu_id`,`mod_acu_user_rol_rol_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_accounts_users_roles
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_actions
-- ----------------------------
CREATE TABLE `mod_actions` (
  `mod_act_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_act_name` varchar(255) NOT NULL,
  `mod_act_summary` varchar(455) DEFAULT NULL,
  `mod_act_path` varchar(255) NOT NULL,
  `mod_act_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_act_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_actions
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_actions_register
-- ----------------------------
CREATE TABLE `mod_actions_register` (
  `mod_act_reg_act_id` int(11) NOT NULL COMMENT 'mod_actions',
  `mod_act_reg_cpa_id` int(11) NOT NULL COMMENT 'mod_campaigns_ads',
  `mod_act_reg_aca_id` int(11) NOT NULL COMMENT 'mod_accounts_ads',
  `mod_act_reg_acu_id` int(11) NOT NULL COMMENT 'mod_accounts_user',
  `mod_act_reg_plc_id` int(11) NOT NULL COMMENT 'mod_places',
  `mod_act_reg_value` int(11) NOT NULL,
  `mod_act_reg_register_date` datetime NOT NULL,
  `mod_act_reg_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_act_reg_act_id`,`mod_act_reg_cpa_id`,`mod_act_reg_aca_id`,`mod_act_reg_acu_id`,`mod_act_reg_plc_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_actions_register
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_acuse
-- ----------------------------
CREATE TABLE `mod_acuse` (
  `mod_ac_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_ac_date` datetime NOT NULL,
  `mod_ac_email` varchar(255) NOT NULL,
  PRIMARY KEY (`mod_ac_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_acuse
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_addresses
-- ----------------------------
CREATE TABLE `mod_addresses` (
  `mod_add_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_add_name` varchar(450) DEFAULT NULL,
  `mod_add_alias` varchar(255) DEFAULT NULL,
  `mod_add_description` varchar(700) DEFAULT NULL,
  `mod_add_coord` varchar(700) DEFAULT NULL,
  `mod_add_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_add_id`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_addresses
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_addresses_logistics_distribution_zone
-- ----------------------------
CREATE TABLE `mod_addresses_logistics_distribution_zone` (
  `mod_add_ldz_add_id` int(11) NOT NULL,
  `mod_add_ldz_ldz_id` int(11) NOT NULL,
  `mod_add_ldz_order` int(11) NOT NULL,
  PRIMARY KEY (`mod_add_ldz_add_id`,`mod_add_ldz_ldz_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_addresses_logistics_distribution_zone
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_advised_calendars
-- ----------------------------
CREATE TABLE `mod_advised_calendars` (
  `mod_adv_cal_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_adv_cal_acu_id` int(11) DEFAULT NULL,
  `mod_adv_cal_cou_id` int(11) DEFAULT NULL,
  `mod_adv_cal_type` varchar(255) DEFAULT 'appointment',
  `mod_adv_cal_date_start` datetime DEFAULT NULL,
  `mod_adv_cal_date_end` datetime DEFAULT NULL,
  `mod_adv_cal_title` varchar(255) DEFAULT NULL,
  `mod_adv_cal_details` text,
  `mod_adv_cal_place` varchar(255) DEFAULT NULL,
  `mod_adv_cal_reason_cancel` varchar(150) DEFAULT NULL,
  `mod_adv_cal_reschedule` int(11) DEFAULT NULL,
  `mod_adv_cal_ent_id` int(11) DEFAULT NULL,
  `mod_adv_cal_user_id` int(11) DEFAULT NULL,
  `mod_adv_cal_date_register` datetime DEFAULT NULL,
  `mod_adv_cal_state` int(11) NOT NULL DEFAULT '0' COMMENT '0. Eliminado, 1. Activo, 2. cancelado, 3. reagendado, 4. Atendido',
  PRIMARY KEY (`mod_adv_cal_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_advised_calendars
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_advised_calendars_blocked
-- ----------------------------
CREATE TABLE `mod_advised_calendars_blocked` (
  `mod_adv_cb_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_adv_cb_date_start` datetime NOT NULL,
  `mod_adv_cb_date_end` datetime DEFAULT NULL,
  `mod_adv_cb_ent_id` int(11) DEFAULT NULL,
  `mod_adv_cb_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_adv_cb_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_advised_calendars_blocked
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_advised_counselors
-- ----------------------------
CREATE TABLE `mod_advised_counselors` (
  `mod_adv_cou_acu_id` int(11) NOT NULL,
  `mod_adv_cou_cou_id` int(11) NOT NULL,
  `mod_adv_cou_order` int(11) NOT NULL,
  PRIMARY KEY (`mod_adv_cou_acu_id`,`mod_adv_cou_cou_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_advised_counselors
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_advised_counselors_fields
-- ----------------------------
CREATE TABLE `mod_advised_counselors_fields` (
  `mod_adv_fds_user_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_adv_fds_fds_id` int(11) NOT NULL,
  `mod_adv_fds_order` int(11) NOT NULL,
  PRIMARY KEY (`mod_adv_fds_user_id`,`mod_adv_fds_fds_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_advised_counselors_fields
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_advised_history
-- ----------------------------
CREATE TABLE `mod_advised_history` (
  `mod_adv_his_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_adv_his_acu_id` int(11) DEFAULT NULL,
  `mod_adv_his_user_id` int(11) DEFAULT NULL,
  `mod_adv_his_fds_id` int(11) DEFAULT NULL,
  `mod_adv_his_comments` text,
  `mod_adv_his_date_registration` datetime DEFAULT NULL,
  `mod_adv_his_date_init` datetime DEFAULT NULL,
  `mod_adv_his_date_end` datetime DEFAULT NULL,
  `mod_adv_his_place` varchar(255) DEFAULT NULL,
  `mod_adv_his_type` int(11) NOT NULL DEFAULT '0' COMMENT '0. normal 1.Fuera de Hora',
  `mod_adv_his_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_adv_his_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_advised_history
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_advised_history_calendars
-- ----------------------------
CREATE TABLE `mod_advised_history_calendars` (
  `mod_adv_his_cal_cal_id` int(11) NOT NULL,
  `mod_adv_his_cal_his_id` int(11) NOT NULL,
  `mod_adv_his_cal_order` int(11) NOT NULL,
  PRIMARY KEY (`mod_adv_his_cal_cal_id`,`mod_adv_his_cal_his_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_advised_history_calendars
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_advised_options
-- ----------------------------
CREATE TABLE `mod_advised_options` (
  `mod_adv_opt_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_adv_opt_name` varchar(250) NOT NULL,
  `mod_adv_opt_value` varchar(250) NOT NULL,
  `mod_adv_opt_autoload` varchar(4) NOT NULL DEFAULT 'yes',
  PRIMARY KEY (`mod_adv_opt_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_advised_options
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_advised_schedules
-- ----------------------------
CREATE TABLE `mod_advised_schedules` (
  `mod_adv_sch_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_adv_sch_cou_id` int(11) NOT NULL,
  `mod_adv_sch_day` int(11) NOT NULL,
  `mod_adv_sch_hour_start` time NOT NULL,
  `mod_adv_sch_hour_end` time NOT NULL,
  `mod_adv_sch_count` int(11) NOT NULL,
  `mod_adv_sch_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_adv_sch_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_advised_schedules
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_advised_types_appointments
-- ----------------------------
CREATE TABLE `mod_advised_types_appointments` (
  `mod_adv_tya_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_adv_tya_name` varchar(255) DEFAULT NULL,
  `mod_adv_tya_summary` varchar(450) DEFAULT NULL,
  `mod_adv_tya_type` varchar(255) DEFAULT NULL,
  `mod_adv_tya_path` varchar(255) DEFAULT NULL,
  `mod_adv_tya_color` varchar(8) DEFAULT NULL,
  `mod_adv_tya_json` text,
  `mod_adv_tya_ent_id` int(11) DEFAULT NULL,
  `mod_adv_tya_state` int(11) DEFAULT '0',
  PRIMARY KEY (`mod_adv_tya_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_advised_types_appointments
-- ----------------------------
BEGIN;
INSERT INTO `mod_advised_types_appointments` VALUES (1, 'Consejeria', NULL, NULL, NULL, NULL, '{\r\n \"listUsers\",\"selectDay\"\r\n}', 1, 1);
INSERT INTO `mod_advised_types_appointments` VALUES (2, 'Otra Actividad', NULL, NULL, NULL, NULL, '{\r\n \"title\",\"selectDates\"\r\n}', 1, 1);
COMMIT;

-- ----------------------------
-- Table structure for mod_advised_user
-- ----------------------------
CREATE TABLE `mod_advised_user` (
  `mod_adv_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_adv_fullname` varchar(255) NOT NULL,
  `mod_adv_comments` text NOT NULL,
  `mod_adv_acu_id` int(11) DEFAULT NULL,
  `mod_adv_fds_id` int(11) DEFAULT NULL,
  `mod_adv_civil_state` int(11) DEFAULT NULL COMMENT '1.Soltero/a 2.Casado/a 3.Divorciado 4.Concuvinato 5. Unión Libre  6. Otro',
  `mod_adv_dependents` int(11) DEFAULT NULL,
  `mod_adv_telf_fax` varchar(255) DEFAULT NULL,
  `mod_adv_address` varchar(550) DEFAULT NULL,
  `mod_adv_coordinates` varchar(400) DEFAULT NULL,
  `mod_adv_labor_status` int(11) DEFAULT NULL COMMENT '1. Dependiente 2.Independiente. 3. Jubilado/rentista. 4.Estudiante 5. Desempleado',
  `mod_adv_company_work` varchar(255) DEFAULT NULL,
  `mod_adv_address_work` varchar(550) DEFAULT NULL,
  `mod_adv_work_area` varchar(50) DEFAULT NULL,
  `mod_adv_profession` varchar(50) DEFAULT NULL,
  `mod_adv_position` varchar(50) DEFAULT NULL,
  `mod_adv_spouse_fullname` varchar(50) DEFAULT NULL,
  `mod_adv_spouse_gender` varchar(50) DEFAULT NULL,
  `mod_adv_spouse_ci` int(11) DEFAULT NULL,
  `mod_adv_spouse_ext` varchar(2) DEFAULT NULL,
  `mod_adv_spouse_birthday` date DEFAULT NULL,
  `mod_adv_spouse_nationality` varchar(50) DEFAULT NULL,
  `mod_adv_spouse_telf_fax` varchar(50) DEFAULT NULL,
  `mod_adv_spouse_cellphone` varchar(255) DEFAULT NULL,
  `mod_adv_spouse_email` varchar(255) DEFAULT NULL,
  `mod_adv_spouse_labor_status` int(11) DEFAULT NULL,
  `mod_adv_spouse_company_work` varchar(50) DEFAULT NULL,
  `mod_adv_spouse_address_work` varchar(50) DEFAULT NULL,
  `mod_adv_spouse_work_area` varchar(50) DEFAULT NULL,
  `mod_adv_spouse_profession` varchar(50) DEFAULT NULL,
  `mod_adv_spouse_position` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`mod_adv_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=46 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_advised_user
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_brands
-- ----------------------------
CREATE TABLE `mod_brands` (
  `mod_brd_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_brd_name` varchar(255) DEFAULT NULL,
  `mod_brd_img` int(11) DEFAULT NULL,
  `mod_brd_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_brd_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_brands
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_campaigns_actions
-- ----------------------------
CREATE TABLE `mod_campaigns_actions` (
  `mod_cpa_act_cpa_id` int(11) NOT NULL,
  `mod_cpa_act_act_id` int(11) NOT NULL,
  `mod_cpa_act_rew` int(11) DEFAULT NULL,
  `mod_cpa_act_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_cpa_act_cpa_id`,`mod_cpa_act_act_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_campaigns_actions
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_campaigns_ads
-- ----------------------------
CREATE TABLE `mod_campaigns_ads` (
  `mod_cpa_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_cpa_name` varchar(255) DEFAULT NULL,
  `mod_cpa_description` mediumtext,
  `mod_cpa_aca_id` int(11) DEFAULT NULL COMMENT '//mod_accounts_ads',
  `mod_cpa_target_init_age` int(11) DEFAULT NULL,
  `mod_cpa_target_end_age` int(11) DEFAULT NULL,
  `mod_cpa_target_gender` varchar(255) DEFAULT NULL,
  `mod_cpa_init_date` datetime DEFAULT NULL,
  `mod_cpa_end_date` datetime DEFAULT NULL,
  `mod_cpa_acu_id` int(11) DEFAULT NULL,
  `mod_cpa_register_date` datetime DEFAULT NULL,
  `mod_cpa_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_cpa_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_campaigns_ads
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_carts
-- ----------------------------
CREATE TABLE `mod_carts` (
  `mod_cart_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_cart_date` datetime DEFAULT NULL,
  `mod_cart_code` varchar(255) DEFAULT NULL,
  `mod_cart_acu_id` int(11) NOT NULL,
  `mod_cart_add_id` int(11) DEFAULT NULL,
  `mod_cart_ldz_id` int(11) DEFAULT NULL,
  `mod_cart_details` varchar(455) DEFAULT NULL,
  `mod_cart_payment_method` varchar(11) DEFAULT NULL,
  `mod_cart_invoice_id` int(11) DEFAULT NULL,
  `mod_cart_code_receipts` int(11) DEFAULT NULL COMMENT 'Codigo de Recaudación\r\n',
  `mod_cart_transaction_id` varchar(255) DEFAULT NULL,
  `mod_cart_gateway_url_payment` varchar(450) DEFAULT NULL,
  `mod_cart_gateway_payment` varchar(40) DEFAULT NULL,
  `mod_cart_gateway_url_invoice` varchar(450) DEFAULT NULL,
  `mod_cart_gateway_json` text,
  `mod_cart_state` int(11) NOT NULL DEFAULT '0' COMMENT '0 Creada 1 Registrada 2. Pagada 3. Revertida 4. Anulada 4.Eliminada\r\n',
  PRIMARY KEY (`mod_cart_id`,`mod_cart_acu_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_carts
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_carts_products
-- ----------------------------
CREATE TABLE `mod_carts_products` (
  `mod_cart_prod_cart_id` int(11) NOT NULL,
  `mod_cart_prod_prod_id` int(11) NOT NULL,
  `mod_cart_prod_price` decimal(20,2) DEFAULT NULL,
  `mod_cart_prod_order` int(11) DEFAULT NULL,
  PRIMARY KEY (`mod_cart_prod_cart_id`,`mod_cart_prod_prod_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_carts_products
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_customers_data
-- ----------------------------
CREATE TABLE `mod_customers_data` (
  `mod_ced_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_cep_business_name` varchar(255) DEFAULT NULL,
  `mod_cep_nit` varchar(22) DEFAULT NULL,
  `mod_cep_priority` int(11) DEFAULT NULL,
  `mod_cep_type_contract` int(11) DEFAULT NULL,
  `mod_cep_json` text,
  PRIMARY KEY (`mod_ced_id`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_customers_data
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_customers_enterprises
-- ----------------------------
CREATE TABLE `mod_customers_enterprises` (
  `mod_cen_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_cen_cpe_id` int(11) DEFAULT NULL,
  `mod_cen_ced_id` int(11) DEFAULT NULL COMMENT 'customer data',
  `mod_cen_name` varchar(255) DEFAULT NULL,
  `mod_cen_username` varchar(255) DEFAULT NULL,
  `mod_cen_code` varchar(12) DEFAULT NULL,
  `mod_cen_description` varchar(455) DEFAULT NULL,
  `mod_cen_img` int(11) DEFAULT NULL,
  `mod_cen_register_date` datetime DEFAULT NULL,
  `mod_cen_user_id` int(11) DEFAULT NULL,
  `mod_cen_ent_id` int(11) DEFAULT NULL,
  `mod_cen_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_cen_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_customers_enterprises
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_customers_persons
-- ----------------------------
CREATE TABLE `mod_customers_persons` (
  `mod_cpe_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_cpe_acu_id` int(11) DEFAULT NULL,
  `mod_cpe_name` varchar(255) DEFAULT NULL,
  `mod_cpe_lastname` varchar(255) DEFAULT NULL,
  `mod_cpe_email` varchar(255) DEFAULT NULL,
  `mod_cpe_code` varchar(12) DEFAULT NULL,
  `mod_cpe_phone` int(22) DEFAULT NULL,
  `mod_cpe_ci` int(22) DEFAULT NULL,
  `mod_cpe_adder` varchar(12) DEFAULT NULL,
  `mod_cpe_register_date` datetime NOT NULL,
  `mod_cpe_user_id` int(11) DEFAULT NULL COMMENT 'usuario que lo registro\r\n',
  `mod_cpe_ent_id` int(11) DEFAULT NULL,
  `mod_cpe_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_cpe_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_customers_persons
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_departments
-- ----------------------------
CREATE TABLE `mod_departments` (
  `mod_dep_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_dep_name` varchar(255) NOT NULL,
  `mod_dep_parent_id` int(11) NOT NULL,
  `mod_dep_description` tinytext NOT NULL,
  `mod_dep_ent_id` int(11) NOT NULL,
  `mod_dep_order` int(11) NOT NULL,
  `mod_dep_state` int(11) NOT NULL,
  PRIMARY KEY (`mod_dep_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_departments
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_discount
-- ----------------------------
CREATE TABLE `mod_discount` (
  `mod_dis_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_dis_name` varchar(255) DEFAULT NULL,
  `mod_dis_detail` tinytext,
  `mod_dis_rate` int(11) DEFAULT NULL,
  `mod_dis_start_date` datetime DEFAULT NULL,
  `mod_dis_end_date` datetime DEFAULT NULL,
  `mod_dis_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_dis_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_discount
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_discount_products
-- ----------------------------
CREATE TABLE `mod_discount_products` (
  `mod_dis_prod_dis_id` int(11) NOT NULL,
  `mod_dis_prod_prod_id` int(11) NOT NULL,
  `mod_dis_prod_orden` int(11) NOT NULL,
  PRIMARY KEY (`mod_dis_prod_dis_id`,`mod_dis_prod_prod_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_discount_products
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_events
-- ----------------------------
CREATE TABLE `mod_events` (
  `mod_eve_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_eve_name` varchar(255) DEFAULT NULL,
  `mod_eve_description` tinytext,
  `mod_eve_register_date` datetime DEFAULT NULL,
  `mod_eve_user_id` int(11) DEFAULT NULL,
  `mod_eve_init_date` datetime DEFAULT NULL,
  `mod_eve_end_date` datetime DEFAULT NULL,
  `mod_eve_img_small` int(11) DEFAULT NULL,
  `mod_eve_img_medium` int(11) DEFAULT NULL,
  `mod_eve_img_large` int(11) DEFAULT NULL,
  `mod_eve_seats` int(11) DEFAULT NULL,
  `mod_eve_hall` int(11) DEFAULT NULL,
  `mod_eve_json` text,
  `mod_eve_cost_seat` decimal(21,2) DEFAULT NULL,
  `mod_eve_coin` varchar(10) NOT NULL DEFAULT 'Bs',
  `mod_eve_ent_id` int(11) DEFAULT NULL,
  `mod_eve_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_eve_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_events
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_events_halls
-- ----------------------------
CREATE TABLE `mod_events_halls` (
  `mod_eve_hall_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_eve_hall_ent_id` int(11) NOT NULL,
  `mod_eve_hall_name` varchar(255) DEFAULT NULL,
  `mod_eve_hall_details` tinytext,
  `mod_eve_hall_url_draw_id` varchar(255) DEFAULT NULL,
  `mod_eve_hall_fn_js_draw` varchar(440) DEFAULT NULL,
  `mod_eve_hall_num_tables` int(11) DEFAULT NULL,
  `mod_eve_hall_num_seats` int(11) DEFAULT NULL,
  `mod_eve_hall_address` varchar(255) DEFAULT NULL,
  `mod_eve_hall_city` varchar(255) DEFAULT NULL,
  `mod_eve_hall_country` varchar(255) DEFAULT NULL,
  `mod_eve_hall_coord` varchar(440) DEFAULT NULL,
  `mod_eve_hall_user_id` int(11) DEFAULT NULL,
  `mod_eve_hall_register_date` datetime DEFAULT NULL,
  `mod_eve_hall_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_eve_hall_id`,`mod_eve_hall_ent_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_events_halls
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_events_options
-- ----------------------------
CREATE TABLE `mod_events_options` (
  `mod_eve_option_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_eve_option_name` varchar(255) DEFAULT NULL,
  `mod_eve_option_value` int(11) DEFAULT NULL,
  `mod_eve_option_autoload` varchar(3) DEFAULT NULL,
  PRIMARY KEY (`mod_eve_option_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_events_options
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_events_tickets
-- ----------------------------
CREATE TABLE `mod_events_tickets` (
  `mod_eve_tck_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_eve_tck_eve_id` int(11) DEFAULT NULL,
  `mod_eve_tck_hall_id` int(11) DEFAULT NULL,
  `mod_eve_tck_table_id` int(11) DEFAULT NULL COMMENT 'mesa id',
  `mod_eve_tck_seat_id` int(11) DEFAULT NULL,
  `mod_eve_tck_code` varchar(255) DEFAULT NULL,
  `mod_eve_tck_ref` varchar(40) DEFAULT NULL COMMENT 'reference',
  `mod_eve_tck_reserve_id` int(11) NOT NULL,
  `mod_eve_tck_acp_id` int(11) DEFAULT NULL COMMENT 'mod_accounting_plan id\r\n',
  `mod_eve_tck_cpe_id` int(11) DEFAULT NULL,
  `mod_eve_tck_date_register` datetime DEFAULT NULL,
  `mod_eve_tck_cost` decimal(22,2) DEFAULT NULL,
  `mod_eve_tck_coin` varchar(3) DEFAULT NULL,
  `mod_eve_tck_user_id` int(11) NOT NULL,
  `mod_eve_tck_pay_tx_id` int(11) DEFAULT NULL COMMENT 'mod_pay_tx_tck_id of mod_payments_tx_tickets',
  `mod_eve_tck_date_pay_register` datetime DEFAULT NULL,
  `mod_eve_tck_txr` int(11) DEFAULT NULL COMMENT 'id_transaccion pasarela',
  `mod_eve_tck_state` int(11) NOT NULL DEFAULT '0' COMMENT '// State 0:Libre, 1.temp 2:Recervado, 3: Vendido, 4:Anulado, 5:Cancelado  Null : sin estado ',
  PRIMARY KEY (`mod_eve_tck_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_events_tickets
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_external_docs_options
-- ----------------------------
CREATE TABLE `mod_external_docs_options` (
  `mod_edc_opt_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_edc_opt_name` varchar(255) NOT NULL,
  `mod_edc_opt_value` varchar(255) NOT NULL,
  `mod_edc_opt_ent_id` int(11) NOT NULL,
  `mod_edc_opt_autoload` varchar(4) NOT NULL,
  PRIMARY KEY (`mod_edc_opt_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_external_docs_options
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_external_docs_types
-- ----------------------------
CREATE TABLE `mod_external_docs_types` (
  `mod_edc_type_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_edc_type_name` varchar(255) DEFAULT NULL,
  `mod_edc_type_description` varchar(255) DEFAULT NULL,
  `mod_edc_type_parent_id` int(11) NOT NULL,
  `mod_edc_type_ent_id` int(11) NOT NULL,
  `mod_edc_type_color` varchar(8) NOT NULL,
  `mod_edc_type_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_edc_type_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_external_docs_types
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_inventory_options
-- ----------------------------
CREATE TABLE `mod_inventory_options` (
  `mod_inv_opt_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_inv_opt_name` varchar(255) DEFAULT NULL,
  `mod_inv_opt_value` longtext,
  `mod_inv_opt_autoload` varchar(20) NOT NULL,
  `mod_inv_opt_ent_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`mod_inv_opt_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_inventory_options
-- ----------------------------
BEGIN;
INSERT INTO `mod_inventory_options` VALUES (1, 'routeCategoryId', '3', '', 1);
COMMIT;

-- ----------------------------
-- Table structure for mod_inventory_units
-- ----------------------------
CREATE TABLE `mod_inventory_units` (
  `mod_inv_unt_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_inv_unt_name` varchar(255) DEFAULT NULL,
  `mod_inv_unt_summary` varchar(455) DEFAULT NULL,
  `mod_inv_unt_vars` text,
  `mod_inv_unt_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_inv_unt_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_inventory_units
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_jobtitle
-- ----------------------------
CREATE TABLE `mod_jobtitle` (
  `mod_jbt_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_jbt_title` varchar(255) NOT NULL,
  `mod_jbt_description` tinytext NOT NULL,
  `mod_jbt_parent_id` int(11) NOT NULL,
  `mod_jpt_duties_manual` int(11) NOT NULL,
  `mod_jbt_ent_id` int(11) NOT NULL,
  `mod_jbt_order` int(11) NOT NULL,
  `mod_jbt_state` int(11) NOT NULL,
  PRIMARY KEY (`mod_jbt_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_jobtitle
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_kardex
-- ----------------------------
CREATE TABLE `mod_kardex` (
  `mod_kdx_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_kdx_user_id` int(11) NOT NULL,
  `mod_kdx_name` varchar(255) DEFAULT NULL,
  `mod_kdx_fathers_lastname` varchar(255) DEFAULT NULL,
  `mod_kdx_mothers_lastname` varchar(255) DEFAULT NULL,
  `mod_kdx_ent_id` int(11) DEFAULT NULL,
  `mod_kdx_entry_date` date DEFAULT NULL,
  `mod_kdx_ci` varchar(255) DEFAULT NULL,
  `mod_kdx_ci_extension` varchar(255) DEFAULT NULL,
  `mod_kdx_ci_expiration_date` date DEFAULT NULL,
  `mod_kdx_drivers_licence_expiration_date` date DEFAULT NULL,
  `mod_kdx_birth_date` date DEFAULT NULL,
  `mod_kdx_nationality` varchar(255) DEFAULT NULL,
  `mod_kdx_birth_place` varchar(255) DEFAULT NULL,
  `mod_kdx_sex` int(11) DEFAULT NULL COMMENT '2 Masculino, 1 Femenino, 3. Otros',
  `mod_kdx_civil_status` int(11) DEFAULT NULL COMMENT '0.single 1.married 2.divorced 3.widowed',
  `mod_kdx_dates_contact` text,
  `mod_kdx_phone_address` varchar(255) DEFAULT NULL,
  `mod_kdx_phone_corp` varchar(255) DEFAULT NULL,
  `mod_kdx_phone_corp_ext` int(11) DEFAULT NULL,
  `mod_kdx_personal_mobile` varchar(255) DEFAULT NULL,
  `mod_kdx_corp_mobile` varchar(255) DEFAULT NULL,
  `mod_kdx_personal_email` varchar(255) DEFAULT NULL,
  `mod_kdx_corp_email` varchar(255) DEFAULT NULL,
  `mod_kdx_address` varchar(255) DEFAULT NULL,
  `mod_kdx_coordinates` varchar(255) DEFAULT NULL,
  `mod_kdx_nro_cns` varchar(255) DEFAULT NULL,
  `mod_kdx_nro_afp` varchar(255) DEFAULT NULL,
  `mod_kdx_afp` int(11) DEFAULT NULL,
  `mod_kdx_shirt_size` varchar(255) DEFAULT NULL,
  `mod_kdx_pant_size` varchar(255) DEFAULT NULL,
  `mod_kdx_boot_size` varchar(255) DEFAULT NULL,
  `mod_kdx_blood_type` varchar(255) DEFAULT NULL,
  `mod_kdx_removal_date` date DEFAULT NULL,
  `mod_kdx_cod_sap` int(11) DEFAULT NULL,
  `mod_kdx_cv_id` varchar(255) DEFAULT NULL,
  `mod_kdx_workhours` varchar(255) DEFAULT NULL,
  `mod_kdx_trash` int(11) DEFAULT NULL,
  `mod_kdx_state` int(11) DEFAULT '0',
  PRIMARY KEY (`mod_kdx_id`,`mod_kdx_user_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=10012 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_kardex
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_kardex_jobtitle
-- ----------------------------
CREATE TABLE `mod_kardex_jobtitle` (
  `mod_kdx_jbt_jbt_id` int(11) NOT NULL,
  `mod_kdx_jbt_kdx_id` int(11) NOT NULL,
  `mod_kdx_jbt_ent_id` int(11) NOT NULL,
  `mod_kdx_jbt_order` int(11) NOT NULL,
  PRIMARY KEY (`mod_kdx_jbt_jbt_id`,`mod_kdx_jbt_kdx_id`,`mod_kdx_jbt_ent_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_kardex_jobtitle
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_logistics_distribution_move
-- ----------------------------
CREATE TABLE `mod_logistics_distribution_move` (
  `mod_log_dtz_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_log_dtz_name` varchar(255) DEFAULT NULL,
  `mod_log_dtz_code` varchar(255) DEFAULT NULL,
  `mod_log_dtz_perimetrer` mediumtext,
  `mod_log_dtz_cost` decimal(20,2) NOT NULL,
  `mod_log_dtz_state` int(11) DEFAULT '0',
  PRIMARY KEY (`mod_log_dtz_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_logistics_distribution_move
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_logistics_distribution_zone
-- ----------------------------
CREATE TABLE `mod_logistics_distribution_zone` (
  `mod_log_dtz_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_log_dtz_name` varchar(255) DEFAULT NULL,
  `mod_log_dtz_code` varchar(255) DEFAULT NULL,
  `mod_log_dtz_perimetrer` mediumtext,
  `mod_log_dtz_cost` decimal(20,2) NOT NULL,
  `mod_log_dtz_state` int(11) DEFAULT '0',
  PRIMARY KEY (`mod_log_dtz_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_logistics_distribution_zone
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_make
-- ----------------------------
CREATE TABLE `mod_make` (
  `mod_mak_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_mak_name` varchar(255) NOT NULL,
  `mod_mak_description` varchar(400) NOT NULL,
  `mod_mak_img_id` int(11) NOT NULL,
  `mod_mak_state` int(11) NOT NULL,
  PRIMARY KEY (`mod_mak_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_make
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_organization_chart
-- ----------------------------
CREATE TABLE `mod_organization_chart` (
  `mod_orc_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_orc_position` varchar(255) DEFAULT NULL,
  `mod_orc_json` text,
  `mod_orc_functions` text,
  `mod_orc_doc_id` int(11) DEFAULT NULL COMMENT 'rel functions',
  `mod_orc_location` int(11) NOT NULL,
  `mod_orc_reports_to` varchar(255) NOT NULL COMMENT 'id,id,id',
  `mod_orc_code` varchar(10) DEFAULT NULL,
  `mod_orc_user_id` int(11) NOT NULL COMMENT 'id register',
  `mod_orc_date_register` datetime DEFAULT NULL,
  `mod_orc_ent_id` int(11) DEFAULT NULL,
  `mod_orc_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_orc_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_organization_chart
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_organization_chart_rel
-- ----------------------------
CREATE TABLE `mod_organization_chart_rel` (
  `mod_orc_rel_orc_id` int(11) NOT NULL,
  `mod_orc_rel_user_id` int(11) NOT NULL,
  `mod_orc_rel_kdx_id` int(11) DEFAULT NULL,
  `mod_orc_rel_date_register` date DEFAULT NULL,
  `mod_orc_rel_order` int(11) DEFAULT NULL,
  `mod_org_rel_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_orc_rel_orc_id`,`mod_orc_rel_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_organization_chart_rel
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_payments_tx_tickets
-- ----------------------------
CREATE TABLE `mod_payments_tx_tickets` (
  `mod_pay_tx_tck_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_pay_tx_tck_acp_id` int(11) DEFAULT NULL,
  `mod_pay_tx_tck_cpe_id` int(11) NOT NULL,
  `mod_pay_tx_tck_eve_id` int(11) NOT NULL,
  `mod_pay_tx_tck_reserve_id` int(11) NOT NULL,
  `mod_pay_tx_tck_pay` float(22,2) NOT NULL DEFAULT '0.00',
  `mod_pay_tx_tck_code` varchar(255) DEFAULT NULL,
  `mod_pay_tx_tck_coin` varchar(4) DEFAULT NULL,
  `mod_pay_tx_tck_rs` varchar(255) DEFAULT NULL COMMENT 'razon social',
  `mod_pay_tx_tck_nit` int(22) DEFAULT NULL,
  `mod_pay_tx_tck_type` varchar(255) DEFAULT NULL,
  `mod_pay_tx_tck_txr` varchar(255) DEFAULT NULL COMMENT 'id transaccion',
  `mod_pay_tx_tck_date_pay_register` datetime NOT NULL,
  `mod_pay_tx_tck_callback` text,
  `mod_pay_tx_tck_mail` text,
  `mod_pay_tx_tck_user_id` int(11) NOT NULL DEFAULT '0',
  `mod_pay_tx_tck_json` text,
  `mod_pay_tx_tck_return` text,
  `mod_pay_tx_tck_register_date` datetime DEFAULT NULL,
  `mod_pay_tx_tck_state` int(11) NOT NULL DEFAULT '0' COMMENT '0. Iniciado, 2.registrado, 3.Active/pagado, 4.Anulado 5.Delete',
  PRIMARY KEY (`mod_pay_tx_tck_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_payments_tx_tickets
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_places
-- ----------------------------
CREATE TABLE `mod_places` (
  `mod_plc_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_plc_name` varchar(255) NOT NULL,
  `mod_plc_tags` varchar(255) NOT NULL,
  `mod_plc_json` mediumtext,
  `mod_plc_address` varchar(255) NOT NULL COMMENT 'ej: Av. 3 pasos al frente, Calle Isoso #34 Edificio Lourdes Dep. 54',
  `mod_plc_city` varchar(255) NOT NULL,
  `mod_plc_country` varchar(255) NOT NULL,
  `mod_plc_phone` varchar(15) NOT NULL,
  `mod_plc_celular_whatsapp` text NOT NULL,
  `mod_plc_info` mediumtext NOT NULL,
  `mod_plc_img` int(11) NOT NULL,
  `mod_plc_profile_icon` varchar(255) NOT NULL,
  `mod_plc_main_coord` varchar(100) NOT NULL,
  `mod_plc_coordinates` varchar(255) NOT NULL,
  `mod_plc_map_icon` varchar(55) NOT NULL,
  `mod_plc_content` mediumtext NOT NULL,
  `mod_plc_start_hour` varchar(5) NOT NULL,
  `mod_plc_start_end` varchar(5) NOT NULL,
  `mod_plc_acu_id` int(11) NOT NULL,
  `mod_plc_cont_id` int(11) NOT NULL,
  `mod_plc_status` int(11) NOT NULL COMMENT 'the situation at a particular time during a process.',
  `mod_plc_ranking` int(11) NOT NULL DEFAULT '5',
  `mod_plc_code` varchar(255) NOT NULL,
  `mod_plc_map_ubication` varchar(500) NOT NULL,
  `mod_plc_24h` int(11) NOT NULL,
  `mod_plc_ent_id` int(11) DEFAULT NULL,
  `mod_plc_state` int(11) NOT NULL,
  PRIMARY KEY (`mod_plc_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_places
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_places_accounts_ads
-- ----------------------------
CREATE TABLE `mod_places_accounts_ads` (
  `mod_plc_aca_aca_id` int(11) NOT NULL,
  `mod_plc_aca_plc_id` int(11) NOT NULL,
  `mod_plc_aca_date_register` datetime NOT NULL,
  PRIMARY KEY (`mod_plc_aca_aca_id`,`mod_plc_aca_plc_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_places_accounts_ads
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_places_categorys
-- ----------------------------
CREATE TABLE `mod_places_categorys` (
  `mod_plc_cat_plc_id` int(11) NOT NULL,
  `mod_plc_cat_cat_id` int(11) NOT NULL,
  `mod_plc_cat_order` int(11) NOT NULL,
  PRIMARY KEY (`mod_plc_cat_plc_id`,`mod_plc_cat_cat_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_places_categorys
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_prices_list
-- ----------------------------
CREATE TABLE `mod_prices_list` (
  `mod_prl_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_prl_name` varchar(255) NOT NULL,
  `mod_prl_description` varchar(450) DEFAULT NULL,
  `mod_prl_user_id` int(11) DEFAULT NULL,
  `mod_prl_base_list` int(11) DEFAULT NULL COMMENT 'lista base id\r\n\r\n',
  `mod_prl_factor` float(11,3) DEFAULT '1.000',
  `mod_prl_rounding_method` int(11) NOT NULL COMMENT '0. sin *  1: si el siguiente dígito hacia la derecha después del último que desea conservarse es menor a 5, entonces el último no debe ser modificado. Por ejemplo: 8,453 se convertiría en 8,45;\r\n\r\n*2: en el caso opuesto al anterior, cuando el dígito siguiente al límite es mayor a 5, el último se debe incrementar en una unidad. Por ejemplo: 8,459 se convertiría en 8,46;\r\n\r\n*3: si un 5 sigue al último dígito que desea conservarse y después del 5 hay al menos un número diferente de 0, el último se debe incrementar en una unidad. Por ejemplo: 6,345070 se convertiría en 6,35;\r\n\r\n*4 si el último dígito deseado es un número par y a su derecha hay un 5 como dígito final o seguido de ceros, entonces no se realizan más cambios que el mero truncamiento. Por ejemplo, 4,32500 y 4,325 pasarían a ser 4,32;\r\n\r\n*\r\n5: de manera opuesta a la regla anterior, si el último dígito requerido es un número impar, entonces debemos aumentarlo en una unidad. Por ejemplo: 4,31500 y 4,315 se convertirían en 4,32. \r\n',
  `mod_prl_register_date` datetime NOT NULL,
  `mod_prl_ent_id` int(11) DEFAULT NULL,
  `mod_prl_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_prl_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_prices_list
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_producers
-- ----------------------------
CREATE TABLE `mod_producers` (
  `mod_prd_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_prd_name` varchar(255) NOT NULL,
  `mod_prd_description` varchar(400) NOT NULL,
  `mod_prd_img_id` int(11) NOT NULL,
  `mod_prd_state` int(11) NOT NULL,
  PRIMARY KEY (`mod_prd_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_producers
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_products
-- ----------------------------
CREATE TABLE `mod_products` (
  `mod_prod_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_prod_name` varchar(255) NOT NULL,
  `mod_prod_pathurl` varchar(255) DEFAULT NULL,
  `mod_prod_description` tinytext,
  `mod_prod_tags` tinytext,
  `mod_prod_img` int(11) DEFAULT NULL,
  `mod_prod_code` varchar(45) DEFAULT NULL,
  `mod_prod_record_date` datetime DEFAULT NULL,
  `mod_prod_type` int(11) NOT NULL DEFAULT '0',
  `mod_prod_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_prod_id`) USING BTREE,
  FULLTEXT KEY `mod_prod_dates` (`mod_prod_name`,`mod_prod_pathurl`,`mod_prod_tags`,`mod_prod_code`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_products
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_products_categorys
-- ----------------------------
CREATE TABLE `mod_products_categorys` (
  `mod_prod_cat_prod_id` int(11) NOT NULL,
  `mod_prod_cat_cat_id` int(11) NOT NULL,
  `mod_prod_cat_ent_id` int(11) NOT NULL,
  `mod_prod_cat_order` int(11) NOT NULL,
  PRIMARY KEY (`mod_prod_cat_prod_id`,`mod_prod_cat_cat_id`,`mod_prod_cat_ent_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_products_categorys
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_products_clothing_store
-- ----------------------------
CREATE TABLE `mod_products_clothing_store` (
  `mod_prod_cst_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_prod_cst_prod_id` int(11) NOT NULL,
  `mod_prod_cst_size` varchar(255) DEFAULT NULL COMMENT 'sx,l,m,l',
  `mod_prod_cst_codebar` varchar(255) DEFAULT NULL,
  `mod_prod_cst_contents` int(11) NOT NULL,
  `mod_prod_cst_colors` text COMMENT 'json',
  `mod_prop_cst_notes` text,
  PRIMARY KEY (`mod_prod_cst_id`,`mod_prod_cst_prod_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_products_clothing_store
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_products_colors
-- ----------------------------
CREATE TABLE `mod_products_colors` (
  `mod_prod_color_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_prod_color_name` varchar(25) DEFAULT NULL,
  `mod_prod_color_hex` varchar(11) NOT NULL,
  `mod_prod_color_json` text,
  `mod_prod_color_ent_id` int(11) NOT NULL,
  `mod_prod_color_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_prod_color_id`,`mod_prod_color_hex`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_products_colors
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_products_files
-- ----------------------------
CREATE TABLE `mod_products_files` (
  `mod_prod_file_prod_id` int(11) NOT NULL,
  `mod_prod_file_file_id` int(11) NOT NULL,
  `mod_prod_file_order` int(11) NOT NULL,
  PRIMARY KEY (`mod_prod_file_prod_id`,`mod_prod_file_file_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_products_files
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_products_food
-- ----------------------------
CREATE TABLE `mod_products_food` (
  `mod_prod_food_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_prod_food_prod_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`mod_prod_food_id`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_products_food
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_products_options
-- ----------------------------
CREATE TABLE `mod_products_options` (
  `mod_prod_opt_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_prod_opt_name` varchar(255) NOT NULL,
  `mod_prod_opt_value` longtext NOT NULL,
  `mod_prod_opt_autoload` varchar(20) NOT NULL,
  PRIMARY KEY (`mod_prod_opt_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_products_options
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_products_pharmacy
-- ----------------------------
CREATE TABLE `mod_products_pharmacy` (
  `mod_prod_pha_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_prod_pha_code_provider` varchar(255) NOT NULL,
  `mod_prod_pha_prov_id` int(11) NOT NULL,
  `mod_prod_pha_lab_id` int(11) NOT NULL,
  `mod_prod_pha_mak_id` int(11) NOT NULL,
  `mod_prod_pha_presentation` varchar(400) NOT NULL,
  `mod_prod_pha_codebar` varchar(400) NOT NULL,
  `mod_prod_pha_phar_form` varchar(400) NOT NULL,
  `mod_prod_pha_active_concentration_1` varchar(400) NOT NULL,
  `mod_prod_pha_active_concentration_2` varchar(400) NOT NULL,
  `mod_prod_pha_active_concentration_3` varchar(400) NOT NULL,
  `mod_prod_pha_therapy_action` varchar(400) NOT NULL,
  `mod_prod_pha_condition_sale` int(11) NOT NULL,
  PRIMARY KEY (`mod_prod_pha_id`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_products_pharmacy
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_products_pharmacy_stock
-- ----------------------------
CREATE TABLE `mod_products_pharmacy_stock` (
  `mod_prod_pha_stk_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_prod_pha_stk_contry_id` varchar(400) NOT NULL,
  `mod_prod_pha_stk_nro_health_registration` varchar(400) NOT NULL,
  `mod_prod_pha_stk_expiration_date` datetime NOT NULL,
  `mod_prod_pha_stk_registration_date` datetime NOT NULL,
  `mod_prod_pha_stk_purchase_unit` varchar(255) NOT NULL,
  `mod_prod_pha_stk_ratio_units_box` int(11) NOT NULL,
  `mod_prod_pha_stk_lot` varchar(255) NOT NULL,
  `mod_prod_pha_stk_box_blister_ratio` varchar(255) NOT NULL,
  `mod_prod_pha_stk_height_cm` int(11) NOT NULL,
  `mod_prod_pha_stk_width_cm` int(11) NOT NULL,
  `mod_prod_pha_stk_depth_cm` int(11) NOT NULL,
  `mod_prod_pha_stk_diameter_cm` int(11) NOT NULL,
  `mod_prod_pha_stk_storage_temperature_c` varchar(400) NOT NULL,
  PRIMARY KEY (`mod_prod_pha_stk_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_products_pharmacy_stock
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_products_prices_list
-- ----------------------------
CREATE TABLE `mod_products_prices_list` (
  `mod_prod_prl_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_prod_prl_prod_id` int(11) NOT NULL,
  `mod_prod_prl_price` decimal(20,2) NOT NULL,
  `mod_prod_prl_previous_price` decimal(20,2) DEFAULT NULL,
  `mod_prod_prl_coin` varchar(5) DEFAULT NULL,
  `mod_prod_prl_register_date` date NOT NULL,
  PRIMARY KEY (`mod_prod_prl_id`,`mod_prod_prl_prod_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_products_prices_list
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_products_relation
-- ----------------------------
CREATE TABLE `mod_products_relation` (
  `mod_prod_rel_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_prod_rel_prod_id` int(11) NOT NULL,
  `mod_prod_rel_ent_id` int(11) NOT NULL,
  `mod_prod_rel_type` int(11) DEFAULT NULL,
  `mod_prod_rel_stock` int(11) DEFAULT NULL,
  `mod_prod_rel_pricing` int(11) DEFAULT NULL,
  PRIMARY KEY (`mod_prod_rel_id`,`mod_prod_rel_prod_id`,`mod_prod_rel_ent_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_products_relation
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_products_types
-- ----------------------------
CREATE TABLE `mod_products_types` (
  `mod_prod_type_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_prod_type_name` varchar(255) NOT NULL,
  `mod_prod_type_path` varchar(255) DEFAULT NULL,
  `mod_prod_type_subfix` varchar(5) NOT NULL,
  `mod_prod_type_subfix_db` varchar(24) DEFAULT NULL,
  `mod_prod_type_primary` int(11) DEFAULT '0',
  `mod_prod_type_json` text,
  `mod_prod_type_ent_id` int(11) DEFAULT NULL,
  `mod_prod_type_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_prod_type_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_products_types
-- ----------------------------
BEGIN;
INSERT INTO `mod_products_types` VALUES (1, 'Store', 'store', '_str', '_store', 0, '', 1, 1);
INSERT INTO `mod_products_types` VALUES (2, 'Clothing store', 'clothingStore', '_cst', '_clothing_store', 1, NULL, 1, 1);
COMMIT;

-- ----------------------------
-- Table structure for mod_products_warehouses
-- ----------------------------
CREATE TABLE `mod_products_warehouses` (
  `mod_prod_wrh_prod_id` int(11) NOT NULL,
  `mod_prod_wrh_wrh_id` int(11) NOT NULL,
  `mod_prod_wrh_order` int(11) NOT NULL,
  PRIMARY KEY (`mod_prod_wrh_prod_id`,`mod_prod_wrh_wrh_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_products_warehouses
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_providers
-- ----------------------------
CREATE TABLE `mod_providers` (
  `mod_prv_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_prv_name` varchar(255) NOT NULL,
  `mod_prv_description` varchar(450) DEFAULT NULL,
  `mod_prv_img_id` int(11) NOT NULL,
  `mod_prv_type` int(11) NOT NULL,
  `mod_prv_register_date` datetime DEFAULT NULL,
  `mod_prv_user_id` int(11) NOT NULL COMMENT 'Usuario que registra',
  `mod_prv_state` int(11) NOT NULL,
  PRIMARY KEY (`mod_prv_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_providers
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_rehabilitation_centers
-- ----------------------------
CREATE TABLE `mod_rehabilitation_centers` (
  `mod_rhb_center_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_rhb_center_name` varchar(255) DEFAULT NULL,
  `mod_rhb_center_address` varchar(255) DEFAULT NULL,
  `mod_rhb_center_coord` varchar(255) DEFAULT NULL,
  `mod_rhb_center_user_id` int(11) DEFAULT NULL,
  `mod_rhb_center_ent_id` int(11) DEFAULT NULL,
  `mod_rhb_center_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_rhb_center_id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_rehabilitation_centers
-- ----------------------------
BEGIN;
INSERT INTO `mod_rehabilitation_centers` VALUES (1, 'Centro 1', NULL, NULL, 4, 1, 1);
INSERT INTO `mod_rehabilitation_centers` VALUES (2, 'Centro 2', NULL, NULL, 2, 1, 1);
INSERT INTO `mod_rehabilitation_centers` VALUES (3, 'Centro 3', NULL, NULL, 0, 1, 1);
COMMIT;

-- ----------------------------
-- Table structure for mod_rehabilitation_intern
-- ----------------------------
CREATE TABLE `mod_rehabilitation_intern` (
  `mod_rhb_int_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_rhb_int_acu_id` int(11) NOT NULL,
  `mod_rhb_int_date_intern` datetime DEFAULT NULL,
  `mod_rhb_int_date_graduation` datetime DEFAULT NULL,
  `mod_rhb_int_date_leaving` datetime DEFAULT NULL,
  `mod_rhb_int_reason_leaving` text,
  `mod_rhb_int_reason_addiction` varchar(255) DEFAULT NULL,
  `mod_rhb_int_primary_consumption` varchar(255) DEFAULT NULL,
  `mod_rhb_int_state` int(11) DEFAULT '0',
  PRIMARY KEY (`mod_rhb_int_id`,`mod_rhb_int_acu_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_rehabilitation_intern
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_rehabilitation_primary_consumption
-- ----------------------------
CREATE TABLE `mod_rehabilitation_primary_consumption` (
  `mod_rhb_pcn_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_rhb_pcn_name` varchar(255) DEFAULT NULL,
  `mod_rhb_pcn_summary` varchar(255) DEFAULT NULL,
  `mod_rhb_pcn_path` varchar(255) DEFAULT NULL,
  `mod_rhb_pcn_order` int(11) DEFAULT NULL,
  `mod_rhb_pcn_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_rhb_pcn_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_rehabilitation_primary_consumption
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_rehabilitation_tutor
-- ----------------------------
CREATE TABLE `mod_rehabilitation_tutor` (
  `mod_rhb_tutor_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_rhb_tutor_name` varchar(50) DEFAULT NULL,
  `mod_rhb_tutor_fathers_lastname` varchar(250) DEFAULT NULL,
  `mod_rhb_tutor_mothers_lastname` varchar(250) DEFAULT NULL,
  `mod_rhb_tutor_rhb_id` int(11) DEFAULT NULL COMMENT 'mod_rhb_user_id',
  `mod_rhb_tutor_gender` varchar(50) DEFAULT NULL,
  `mod_rhb_tutor_ci` int(11) DEFAULT NULL,
  `mod_rhb_tutor_ext` varchar(2) DEFAULT NULL,
  `mod_rhb_tutor_dial` varchar(5) DEFAULT NULL,
  `mod_rhb_tutor_celular` int(11) DEFAULT NULL,
  `mod_rhb_tutor_relationship` varchar(50) DEFAULT NULL,
  `mod_rhb_tutor_address` varchar(255) DEFAULT NULL,
  `mod_rhb_tutor_intern_ids` varchar(255) DEFAULT NULL,
  `mod_rhb_tutor_coordinates` varchar(450) DEFAULT NULL,
  `mod_rhb_tutor_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_rhb_tutor_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_rehabilitation_tutor
-- ----------------------------
BEGIN;
INSERT INTO `mod_rehabilitation_tutor` VALUES (1, 'Hermany', 'Terrazas', 'Cossio', 1, '0', 4735799, 'SC', '591', 75313126, '', '', '', '', 1);
COMMIT;

-- ----------------------------
-- Table structure for mod_rehabilitation_user
-- ----------------------------
CREATE TABLE `mod_rehabilitation_user` (
  `mod_rhb_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_rhb_name` varchar(255) NOT NULL,
  `mod_rhb_lastname` varchar(255) NOT NULL,
  `mod_rhb_acu_id` int(11) DEFAULT NULL,
  `mod_rhb_tepcyr` varchar(11) DEFAULT NULL COMMENT 'Time from First Consumption to Rehabilitation',
  `mod_rhb_birthday` date DEFAULT NULL,
  `mod_rhb_nationality` varchar(550) DEFAULT NULL,
  `mod_rhb_age_first_use` int(11) DEFAULT NULL,
  `mod_rhb_register_date` date DEFAULT NULL,
  `mod_rhb_user_id` int(11) DEFAULT NULL,
  `mod_rhb_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_rhb_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_rehabilitation_user
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_rewards
-- ----------------------------
CREATE TABLE `mod_rewards` (
  `mod_rwd_id` int(11) NOT NULL,
  `mod_rwd_cpa_id` int(11) NOT NULL,
  `mod_rwd_name` varchar(255) DEFAULT NULL,
  `mod_rwd_img` int(11) DEFAULT NULL,
  `mod_rwd_description` tinytext,
  `mod_rwd_code` varchar(21) DEFAULT NULL,
  `mod_rwd_value` int(11) NOT NULL DEFAULT '0',
  `mod_rwd_json` text NOT NULL,
  `mod_rwd_register_date` datetime NOT NULL,
  `mod_rwd_user_id` int(11) DEFAULT NULL,
  `mod_rwd_state` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_rewards
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_rewards_register
-- ----------------------------
CREATE TABLE `mod_rewards_register` (
  `mod_rwd_reg_rwd_id` int(11) NOT NULL,
  `mod_rwd_reg_acu_id` int(11) NOT NULL,
  `mod_rwd_reg_cpa_id` int(11) NOT NULL,
  `mod_rwd_reg_register_date` datetime NOT NULL,
  `mod_rwd_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_rwd_reg_rwd_id`,`mod_rwd_reg_acu_id`,`mod_rwd_reg_cpa_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_rewards_register
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_services
-- ----------------------------
CREATE TABLE `mod_services` (
  `mod_sv_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_sv_name` varchar(255) NOT NULL,
  `mod_sv_description` varchar(550) NOT NULL,
  `mod_sv_parent_id` int(11) NOT NULL,
  `mod_sv_state` int(11) DEFAULT '0',
  PRIMARY KEY (`mod_sv_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_services
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_stock
-- ----------------------------
CREATE TABLE `mod_stock` (
  `mod_stk_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_stk_sku` varchar(22) DEFAULT NULL,
  `mod_stk_prod_id` int(11) NOT NULL,
  `mod_stk_quantity` int(11) DEFAULT NULL,
  `mod_stk_register_date` datetime NOT NULL,
  `mod_stk_comment` text NOT NULL,
  `mod_stk_inv_id` int(11) DEFAULT NULL COMMENT 'id factura',
  `mod_stk_max` int(11) DEFAULT NULL,
  `mod_stk_min` int(11) DEFAULT NULL,
  `mod_stk_alert` int(11) DEFAULT NULL,
  `mod_stk_receipt_date` datetime NOT NULL COMMENT 'fecha de recepción',
  `mod_stk_lote` int(11) NOT NULL,
  `mod_stk_prv_id` int(11) NOT NULL COMMENT 'id proveedor',
  `mod_stk_net_price` decimal(20,2) NOT NULL DEFAULT '0.00' COMMENT 'precio neto',
  `mod_stk_ent_id` int(11) DEFAULT NULL,
  `mod_stk_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_stk_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_stock
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_stock_receipt
-- ----------------------------
CREATE TABLE `mod_stock_receipt` (
  `mod_str_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_str_prod_id` int(11) DEFAULT NULL,
  `mod_str_quantity` int(11) DEFAULT NULL,
  `mod_str_register_date` datetime NOT NULL,
  `mod_str_comment` mediumtext NOT NULL,
  `mod_str_inv_id` int(11) DEFAULT NULL COMMENT 'id factura',
  `mod_str_max` int(11) DEFAULT NULL,
  `mod_str_min` int(11) DEFAULT NULL,
  `mod_str_receipt_date` datetime NOT NULL COMMENT 'fecha de recepción',
  `mod_str_lote` int(11) NOT NULL,
  `mod_str_prv_id` int(11) NOT NULL COMMENT 'id proveedor',
  `mod_str_net_price` decimal(20,2) NOT NULL,
  `mod_str_cash_discount` decimal(20,2) NOT NULL,
  `mod_str_discount` int(11) NOT NULL,
  `mod_str_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_str_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_stock_receipt
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_syllabus
-- ----------------------------
CREATE TABLE `mod_syllabus` (
  `mod_syl_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_syl_name` varchar(255) DEFAULT NULL,
  `mod_syl_summary` varchar(455) DEFAULT NULL,
  `mod_syl_ent_id` int(11) DEFAULT NULL,
  `mod_syl_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_syl_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_syllabus
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_syllabus_categorys
-- ----------------------------
CREATE TABLE `mod_syllabus_categorys` (
  `mod_syl_cat_syl_id` int(11) NOT NULL,
  `mod_syl_cat_cat_id` int(11) NOT NULL,
  `mod_syl_cat_order` int(11) NOT NULL,
  PRIMARY KEY (`mod_syl_cat_syl_id`,`mod_syl_cat_cat_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_syllabus_categorys
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_syllabus_contents
-- ----------------------------
CREATE TABLE `mod_syllabus_contents` (
  `mod_syl_cont_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_syl_cont_title` varchar(445) DEFAULT NULL,
  `mod_syl_cont_summary` text,
  `mod_syl_cont_per_id` int(11) DEFAULT NULL,
  `mod_syl_cont_syl_id` int(11) DEFAULT NULL,
  `mod_syl_cont_order` int(11) DEFAULT NULL,
  `mod_syl_cont_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_syl_cont_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_syllabus_contents
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_syllabus_periods
-- ----------------------------
CREATE TABLE `mod_syllabus_periods` (
  `mod_syl_per_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_syl_per_name` varchar(255) NOT NULL,
  `mod_syl_per_summary` mediumtext,
  `mod_syl_per_ent_id` int(11) DEFAULT NULL,
  `mod_syl_per_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_syl_per_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_syllabus_periods
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_syllabus_relations_periods
-- ----------------------------
CREATE TABLE `mod_syllabus_relations_periods` (
  `mod_syl_rel_per_syl_id` int(11) NOT NULL,
  `mod_syl_rel_per_per_id` int(11) NOT NULL,
  `mod_syl_rel_per_order` int(11) DEFAULT NULL,
  PRIMARY KEY (`mod_syl_rel_per_syl_id`,`mod_syl_rel_per_per_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_syllabus_relations_periods
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mod_warehouses
-- ----------------------------
CREATE TABLE `mod_warehouses` (
  `mod_wrh_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_wrh_name` varchar(255) NOT NULL,
  `mod_wrh_details` tinytext,
  `mod_wrh_primary` bit(2) DEFAULT b'0',
  `mod_wrh_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_wrh_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of mod_warehouses
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for modules
-- ----------------------------
CREATE TABLE `modules` (
  `mod_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_name` varchar(255) DEFAULT NULL,
  `mod_description` tinytext,
  `mod_pathurl` varchar(255) DEFAULT NULL,
  `mod_path` varchar(500) DEFAULT NULL,
  `mod_code` varchar(11) DEFAULT NULL,
  `mod_icon` varchar(255) DEFAULT NULL,
  `mod_color` varchar(10) DEFAULT NULL,
  `mod_parent_id` int(11) DEFAULT NULL,
  `mod_indexjs` varchar(400) NOT NULL,
  `mod_css` varchar(255) NOT NULL,
  `mod_db` varchar(255) NOT NULL COMMENT 'database',
  `mod_prefix_db` varchar(255) NOT NULL,
  `mod_relations_db` text NOT NULL,
  `mod_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`mod_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=2002 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of modules
-- ----------------------------
BEGIN;
INSERT INTO `modules` VALUES (1, 'systems', NULL, 'systems', 'modules/systems/', 'SYS1', 'icon icon-systems', '#99C14C', 0, 'components/sistems.js', 'assets/css/dist/systems.css', 'systems', 'sys_', '', 0);
INSERT INTO `modules` VALUES (2, 'modules', NULL, 'modules', 'modules/modules/', 'MOD1', 'icon icon-box-close', '#99C14C', 0, 'components/modules.js', 'assets/css/dist/modules.css', 'modules', 'mod_', 'modules_categorys:mod_cat_mod_id,systems_modules:sys_mod_mod_id', 0);
INSERT INTO `modules` VALUES (3, 'sites', NULL, 'sites', 'modules/websites/', 'SIT1', 'icon icon-blocks', '#8900ff', 0, 'components/sites.js', 'assets/css/dist/sites.css', 'sites', 'site_', '', 0);
INSERT INTO `modules` VALUES (4, 'Hojas de Trabajo', NULL, 'worksheets', 'modules/websites/', 'WS1', 'icon icon-worksheets', '#26fff6', 0, 'components/worksheets.js', 'assets/css/dist/worksheets.css', 'worksheets', 'ws_', '', 1);
INSERT INTO `modules` VALUES (5, 'Bloques', NULL, 'blocks', 'modules/websites/', 'BL1', 'icon icon-blocks-web', '#FEBF10', 0, 'components/blocks.js', 'assets/css/dist/blocks.css', 'blocks', 'block_', '', 1);
INSERT INTO `modules` VALUES (6, 'Publicaciones', NULL, 'publications', 'modules/websites/', 'PUB1', 'icon icon-webpart', '#FEBF10', 0, 'components/publications.js', 'assets/css/dist/publications.css', 'publications', 'pub_', '', 1);
INSERT INTO `modules` VALUES (10, 'Dashboard WebSites', NULL, 'websites', 'modules/websites/', 'WEB1', 'icon icon-dashboard', '#99C14C', 0, 'components/websites.js', 'assets/css/dist/websites.min.css', '', '', '', 1);
INSERT INTO `modules` VALUES (11, 'Contenidos', NULL, 'contents', 'modules/websites/', 'CON1', 'icon icon-content', '#1ff4ed', 0, 'components/contents.js', 'assets/css/dist/contents.min.css', 'contents', 'cont_', 'contents_categorys:cont_cat_cont_id,contents_files:cont_file_cont_id', 1);
INSERT INTO `modules` VALUES (12, 'Categorias', NULL, 'categorys', 'modules/websites/', 'CAT1', 'icon icon-category', '#dd4b4d', 0, 'components/categorys.js', 'assets/css/dist/categorys.min.css', '', '', '', 1);
INSERT INTO `modules` VALUES (13, 'Media', NULL, 'media', 'modules/websites/', 'MED1', 'icon icon-media', '#f04f04', 0, 'components/media.js', 'assets/css/dist/media.min.css', '', '', '', 1);
INSERT INTO `modules` VALUES (14, 'Documentos', NULL, 'docs', 'modules/websites/', 'DOC1', 'icon icon-folder', '#FEBF10', 0, 'components/docs.js', 'assets/css/dist/docs.min.css', '', '', '', 1);
INSERT INTO `modules` VALUES (15, 'Posts', NULL, 'posts', 'modules/websites/', 'POST1', 'icon icon-news', '#37ff2c', 0, 'components/posts.js', 'assets/css/dist/posts.min.css', '', '', '', 1);
INSERT INTO `modules` VALUES (16, 'Enlaces', NULL, 'links', 'modules/websites/', 'LINK1', 'icon icon-link', '#26fff6', 0, 'components/links.js', 'assets/css/dist/links.min.css', '', '', '', 1);
INSERT INTO `modules` VALUES (17, 'Sliders', NULL, 'sliders', 'modules/websites/', 'SLD1', 'icon icon-slider', '#8900ff', 0, 'components/sliders.js', 'assets/css/dist/sliders.min.css', '', '', '', 1);
INSERT INTO `modules` VALUES (200, 'Dashboard RRHH', NULL, 'rrhh', 'modules/rrhh/', 'RRHH', 'icon icon-category', '#99C14C', 0, 'components/rrhh.js', 'assets/css/dist/rrhh.css', '', '', '', 0);
INSERT INTO `modules` VALUES (210, 'kardex', NULL, 'kardex', 'modules/rrhh/', 'KDX', 'icon icon-users', '#FEBF10', 0, 'components/kardex.js', '', '', '', '', 0);
INSERT INTO `modules` VALUES (400, 'Dashboard Inventario', NULL, 'inventory', 'modules/inventory/', 'INV', 'icon icon-dashboard', '#FEBF10', 0, 'components/inventory.js', 'assets/css/dist/inventory.css', '', '', '', 1);
INSERT INTO `modules` VALUES (401, 'Productos', NULL, 'products', 'modules/inventory/', 'PRO', 'icon icon-box', '#CCC', 0, 'components/products.js', 'assets/css/dist/products.css', 'mod_products', 'mod_prod_', '', 1);
INSERT INTO `modules` VALUES (402, 'Stock', NULL, 'stock', 'modules/inventory/', 'STC', 'icon icon-unchecked', '#99C14C', 0, 'components/stock.js', 'assets/css/dist/stock.css', '', '', '', 1);
INSERT INTO `modules` VALUES (403, 'Lista de Precios', NULL, 'pricelist', 'modules/inventory/', 'STC', 'icon icon-coin', '#99C14C', 0, 'components/pricelist.js', 'assets/css/dist/pricelist.css', '', '', '', 1);
INSERT INTO `modules` VALUES (500, 'Dashboard Contabilidad', NULL, 'accounting', 'modules/accounting/', 'ACC', 'icon icon-dashboard', '#99C14C', 0, 'components/accounting.js', 'assets/css/dist/accounting.css', '', '', '', 1);
INSERT INTO `modules` VALUES (600, 'Dashboard Consejeria', NULL, 'counseling', 'modules/counseling/', NULL, 'icon icon-dashboard', '#99C14C', 0, 'components/counseling.js', '', '', '', '', 1);
INSERT INTO `modules` VALUES (601, 'Aconsejados', NULL, 'advised', 'modules/counseling/', NULL, 'icon icon-users', '#FEBF10', 0, 'components/advised.js', '', '', '', '', 1);
INSERT INTO `modules` VALUES (602, 'Agenda', NULL, 'calendarAdvised', 'modules/counseling/', NULL, 'icon icon-calendar', '#FEBF10', 0, 'components/calendarAdvised.js', 'assets/css/dist/calendarAdvised.css', '', '', '', 1);
INSERT INTO `modules` VALUES (603, 'Reportes', NULL, 'reportsCounseling', 'modules/counseling/', NULL, 'icon icon-table-check', '#FEBF10', 0, 'components/reportCounseling.js', 'assets/css/dist/reportCounseling.css', '', '', '', 1);
INSERT INTO `modules` VALUES (700, 'Dashboard Ventas', NULL, 'sales', 'modules/sales/', 'PVD', 'icon icon-dashboard', '#fcc54e', 0, 'components/sales.js', 'assets/css/dist/sales.css', '', '', '', 1);
INSERT INTO `modules` VALUES (701, 'Punto de Venta Tickets', NULL, 'salesPointTickets', 'modules/sales/', 'PVT', 'icon icon-cash-register', '#fcc54e', 0, 'components/salesPointTickets.js', 'assets/css/dist/salesPointTickets.css', '', '', '', 1);
INSERT INTO `modules` VALUES (800, 'Dashboard Brokers', NULL, 'brokers', 'modules/brokers/', 'PV', 'icon icon-dashboard', '#fcc54e', 0, 'components/brokers.js', 'assets/css/dist/brokers.css', '', '', '', 1);
INSERT INTO `modules` VALUES (801, 'Clientes', NULL, 'brokersCustomers', 'modules/brokers/', 'PV', 'icon icon-users', '#fcc54e', 0, 'components/brokersCustomers.js', 'assets/css/dist/brokersCustomers.css', '', '', '', 1);
INSERT INTO `modules` VALUES (1000, 'Dashboard Suscripciones', NULL, 'suscriptions', 'modules/accounts/', 'SC1', 'icon icon-dashboard', '#99C14', 0, 'components/subscriptions.js', 'assets/css/dist/subscriptions.css', '', '', '', 1);
INSERT INTO `modules` VALUES (1001, 'Cuentas de Usuarios', NULL, 'accountsUsers', 'modules/accounts/', 'ACC1', 'icon icon-user', '#8900ff', 0, 'components/accountsUsers.js', 'assets/css/dist/subscriptions.css', '', '', '', 1);
INSERT INTO `modules` VALUES (1002, 'Cuentas de Clientes', NULL, 'customers', 'modules/accounts/', 'CS1', 'icon icon-folder-open', '#07c472', 0, 'components/customers.js', 'assets/css/dist/customers.css', '', '', '', 1);
INSERT INTO `modules` VALUES (1200, 'Dashboard FLS', NULL, 'fls', 'modules/fls/', 'FLS', 'icon icon-dashboard', '#fcc54e', 0, 'components/fls.js', 'assets/css/dist/fls.css', '', '', '', 1);
INSERT INTO `modules` VALUES (1201, 'Clientes', NULL, 'flsCustomers', 'modules/fls/', 'PV', 'icon icon-users', '#fcc54e', 0, 'components/flsCustomers.js', 'assets/css/dist/flsCustomers.css', '', '', '', 1);
INSERT INTO `modules` VALUES (1300, 'Dashboard Boletería', NULL, 'tickets', 'modules/tickets/', 'TKS', 'icon icon-dashboard', '#fcc54e', 0, 'components/tickets.js', 'assets/css/dist/tickets.min.css', '', '', '', 1);
INSERT INTO `modules` VALUES (1301, 'Eventos', NULL, 'ticketingEvents', 'modules/tickets/', 'EVTKS', 'icon icon-tag', '#fcc54e', 0, 'components/ticketingEvents.js', 'assets/css/dist/ticketingEvents.min.css', 'mod_events', 'mod_eve_', '', 1);
INSERT INTO `modules` VALUES (1400, 'Dashboard Rehabilitación', NULL, 'rehabilitation', 'modules/rehabilitation/', 'RHB', 'icon icon-dashboard', '#fcc54e', 0, 'components/rehabilitation.js', 'assets/css/dist/rehabilitation.min.css', '', '', '', 1);
INSERT INTO `modules` VALUES (1401, 'Registro', NULL, 'rehabilitationRegistry', 'modules/rehabilitation/', 'RHBR', 'icon icon-user', '#fcc54e', 0, 'components/rehabilitationRegistry.js', 'assets/css/dist/rehabilitationRegistry.min.css', '', '', '', 1);
INSERT INTO `modules` VALUES (1500, 'Dashboard Ads', NULL, 'ads', 'modules/ads/', 'ADS1', 'icon icon-dashboard', '#8900ff', 0, 'components/ads.js', 'assets/css/dist/ads.css', '', '', '', 1);
INSERT INTO `modules` VALUES (1501, 'Lugares', NULL, 'places', 'modules/ads/', 'ADS1', 'icon icon-pointer', '#07c472', 0, 'components/places.js', 'assets/css/dist/places.min.css', '', '', '', 1);
INSERT INTO `modules` VALUES (1600, 'Dashboard LMS', NULL, 'lms', 'modules/lms/', 'ADS1', 'icon icon-dashboard', '#8900ff', 0, 'components/lms.js', 'assets/css/dist/lms.min.css', '', '', '', 1);
INSERT INTO `modules` VALUES (1601, 'Plan de Estudios', NULL, 'syllabus', 'modules/lms/', 'SB1', 'icon icon-category-r', '#8900ff', 0, 'components/syllabus.js', 'assets/css/dist/syllabus.min.css', '', '', '', 1);
INSERT INTO `modules` VALUES (1700, 'Dashboard Activo Fijo', NULL, 'fixedassets', 'modules/fixedassets/', 'AF1', 'icon icon-dashboard', '#8900ff', 0, 'components/fixedassets.js', 'assets/css/dist/fixedassets.min.css', '', '', '', 1);
INSERT INTO `modules` VALUES (1701, 'Activos', NULL, 'assets', 'modules/fixedassets/', 'ASS1', 'icon icon-tag-qr', '#8900ff', 0, 'components/assets.js', 'assets/css/dist/assets.min.css', '', '', '', 1);
INSERT INTO `modules` VALUES (1800, 'Dashboard Operaciones', NULL, 'operations', 'modules/operations/', 'OP1', 'icon icon-dashboard', '#8900ff', 0, 'components/operations.js', 'assets/css/dist/operations.min.css', '', '', '', 1);
INSERT INTO `modules` VALUES (1900, 'Dashboard CRM', NULL, 'crm', 'modules/crm/', 'CRM1', 'icon icon-dashboard', '#8900ff', 0, 'components/crm.js', 'assets/css/dist/crm.min.css', '', '', '', 1);
INSERT INTO `modules` VALUES (1901, 'Clientes', NULL, 'customersCrm', 'modules/accounts/', 'CS1', 'icon icon-folder-open', '#8900ff', 0, 'components/customers.js', 'assets/css/dist/customers.min.css', '', '', '', 1);
INSERT INTO `modules` VALUES (2000, 'Dashboard', NULL, 'restaurants', 'modules/restaurants/', 'RST1', 'icon icon-dashboard', '#8900ff', 0, 'components/restaurants.js', 'assets/css/dist/restaurants.min.css', '', '', '', 1);
INSERT INTO `modules` VALUES (2001, 'Ordenes', NULL, 'commands', 'modules/restaurants/', 'CS1', 'icon icon-command', '#8900ff', 0, 'components/commands.js', 'assets/css/dist/commands.min.css', '', '', '', 1);
COMMIT;

-- ----------------------------
-- Table structure for modules_categorys
-- ----------------------------
CREATE TABLE `modules_categorys` (
  `mod_cat_mod_id` int(11) NOT NULL,
  `mod_cat_cat_id` int(11) NOT NULL,
  `mod_cat_ent_id` int(11) NOT NULL,
  `mod_cat_order` int(11) NOT NULL,
  PRIMARY KEY (`mod_cat_mod_id`,`mod_cat_cat_id`,`mod_cat_ent_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of modules_categorys
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for notifications
-- ----------------------------
CREATE TABLE `notifications` (
  `ntf_id` int(11) NOT NULL AUTO_INCREMENT,
  `ntf_type` varchar(120) DEFAULT NULL,
  `ntf_emitter_id` int(11) DEFAULT NULL,
  `ntf_receiver_id` int(11) DEFAULT NULL,
  `ntf_message` varchar(450) DEFAULT NULL,
  `ntf_register_date` datetime DEFAULT NULL,
  `ntf_json` varchar(450) DEFAULT NULL,
  `ntf_state` int(11) DEFAULT '0' COMMENT '0 delete, 1 register, 2 recieved 3 read\r\n4. no recived 5.cancel\r\n',
  PRIMARY KEY (`ntf_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of notifications
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for options
-- ----------------------------
CREATE TABLE `options` (
  `option_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `option_name` varchar(191) NOT NULL DEFAULT '',
  `option_value` longtext NOT NULL,
  `autoload` varchar(20) NOT NULL DEFAULT 'yes',
  PRIMARY KEY (`option_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of options
-- ----------------------------
BEGIN;
INSERT INTO `options` VALUES (1, 'site_title', 'Ion', 'yes');
INSERT INTO `options` VALUES (2, 'site_favicon', 'assets/img/favicon.png', 'yes');
INSERT INTO `options` VALUES (3, 'site_img', 'assets/img/logo.svg', 'yes');
INSERT INTO `options` VALUES (4, 'site_version', '22662', 'yes');
INSERT INTO `options` VALUES (5, 'user_id_default', '3', 'yes');
INSERT INTO `options` VALUES (6, 'bearer_token', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI3MjM0OTIzODczNDkiLCJuYW1lIjoibnVjbGVvIiwiaWF0Ijo5MzI0MjQzNDl9.jIsiHIdOGa-KHCJ2mUhLLKqlvTYVLolUyrp1HM6E7Cs-gedeon', 'yes');
INSERT INTO `options` VALUES (7, 'client_id', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9-gedeon', 'yes');
INSERT INTO `options` VALUES (8, 'client_secret', 'eyJzdWIiOiI3MjM0OTIzODczNDkiLCJuYW1lIjoibnVjbGVvIiwiaWF0Ijo5MzI0MjQzNDl9-gedeon', 'yes');
INSERT INTO `options` VALUES (9, 'locale', 'es_ES', 'yes');
INSERT INTO `options` VALUES (10, 'timezone', 'America/La_Paz', 'yes');
INSERT INTO `options` VALUES (12, 'site-meta', 'sites/default/controllers/pub/meta.pub.php', 'yes');
INSERT INTO `options` VALUES (13, 'entitie_id_default', '1', 'yes');
INSERT INTO `options` VALUES (14, 'dashboard_img', 'assets/img/logo.svg', 'yes');
INSERT INTO `options` VALUES (15, 'dashboard_favicon', 'assets/img/favicon.png', 'yes');
INSERT INTO `options` VALUES (16, 'dashboard_brand', 'assets/img/logo.svg', 'yes');
INSERT INTO `options` VALUES (17, 'path_icons_pub', 'assets/img/pubs', 'yes');
COMMIT;

-- ----------------------------
-- Table structure for posts
-- ----------------------------
CREATE TABLE `posts` (
  `post_id` int(11) NOT NULL AUTO_INCREMENT,
  `post_title` varchar(455) DEFAULT NULL,
  `post_pathurl` varchar(455) DEFAULT NULL,
  `post_tags` varchar(255) DEFAULT NULL,
  `post_review` tinytext,
  `post_img` varchar(255) DEFAULT NULL,
  `post_body` text NOT NULL,
  `post_place` varchar(255) NOT NULL,
  `post_author` int(11) DEFAULT NULL,
  `post_cls` varchar(255) DEFAULT NULL,
  `post_register_date` datetime NOT NULL,
  `post_state` int(11) DEFAULT '0',
  PRIMARY KEY (`post_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of posts
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for posts_categorys
-- ----------------------------
CREATE TABLE `posts_categorys` (
  `post_cat_post_id` int(11) NOT NULL,
  `post_cat_cat_id` int(11) NOT NULL,
  `post_cat_ent_id` int(11) DEFAULT NULL,
  `post_cat_order` int(11) NOT NULL,
  PRIMARY KEY (`post_cat_post_id`,`post_cat_cat_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of posts_categorys
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for publications
-- ----------------------------
CREATE TABLE `publications` (
  `pub_id` int(11) NOT NULL AUTO_INCREMENT,
  `pub_name` varchar(255) DEFAULT NULL,
  `pub_description` mediumtext,
  `pub_title` varchar(255) DEFAULT NULL,
  `pub_summary` mediumtext NOT NULL,
  `pub_path` varchar(255) DEFAULT NULL,
  `pub_path_ui` varchar(255) DEFAULT NULL,
  `pub_icon` varchar(12) DEFAULT NULL,
  `pub_type` varchar(200) DEFAULT NULL,
  `pub_class` varchar(200) DEFAULT NULL,
  `pub_attr_id` varchar(255) DEFAULT NULL,
  `pub_json` text,
  `pub_state` int(11) DEFAULT '0',
  PRIMARY KEY (`pub_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of publications
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for publications_pattern
-- ----------------------------
CREATE TABLE `publications_pattern` (
  `pub_pat_id` int(11) NOT NULL AUTO_INCREMENT,
  `pub_pat_name` varchar(250) NOT NULL,
  `pub_pat_description` tinytext NOT NULL,
  `pub_pat_json` text NOT NULL,
  `pub_pat_ent_id` int(11) DEFAULT '0',
  `pub_pat_order` int(11) DEFAULT '0',
  `pub_pat_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`pub_pat_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of publications_pattern
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for publications_relations
-- ----------------------------
CREATE TABLE `publications_relations` (
  `pub_rel_id` int(11) NOT NULL AUTO_INCREMENT,
  `pub_rel_cat_id` int(11) DEFAULT NULL,
  `pub_rel_ws_id` int(11) DEFAULT NULL,
  `pub_rel_block_id` int(11) DEFAULT NULL,
  `pub_rel_pub_id` int(11) DEFAULT NULL,
  `pub_rel_state` int(11) NOT NULL DEFAULT '1',
  `pub_rel_order` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`pub_rel_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of publications_relations
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for roles
-- ----------------------------
CREATE TABLE `roles` (
  `rol_id` int(11) NOT NULL AUTO_INCREMENT,
  `rol_name` varchar(255) DEFAULT NULL,
  `rol_description` varchar(255) DEFAULT NULL,
  `rol_parent_id` int(11) DEFAULT NULL,
  `rol_redirection_url` varchar(1000) DEFAULT NULL,
  `rol_json` text,
  `rol_state` int(11) DEFAULT '0',
  PRIMARY KEY (`rol_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of roles
-- ----------------------------
BEGIN;
INSERT INTO `roles` VALUES (1, 'Super Administrador', NULL, 0, '{_PATH_WEB}dashboard', NULL, 1);
INSERT INTO `roles` VALUES (2, 'Administrador', NULL, 1, '{_PATH_WEB}dashboard', NULL, 1);
INSERT INTO `roles` VALUES (3, 'Administrador de Entidad', NULL, 2, '{_PATH_WEB}dashboard', NULL, 1);
INSERT INTO `roles` VALUES (4, 'Administrador RRHH', NULL, 2, '{_PATH_WEB}dashboard', NULL, 1);
INSERT INTO `roles` VALUES (10, 'Encargado de Contabilidad', NULL, 2, '{_PATH_WEB}dashboard', NULL, 1);
COMMIT;

-- ----------------------------
-- Table structure for roles_categorys
-- ----------------------------
CREATE TABLE `roles_categorys` (
  `rol_cat_rol_id` int(11) NOT NULL,
  `rol_cat_cat_id` int(11) NOT NULL,
  `rol_cat_order` int(11) NOT NULL,
  PRIMARY KEY (`rol_cat_rol_id`,`rol_cat_cat_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of roles_categorys
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for roles_entities
-- ----------------------------
CREATE TABLE `roles_entities` (
  `rol_ent_rol_id` int(11) NOT NULL,
  `rol_ent_ent_id` int(11) NOT NULL,
  PRIMARY KEY (`rol_ent_rol_id`,`rol_ent_ent_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of roles_entities
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for roles_modules
-- ----------------------------
CREATE TABLE `roles_modules` (
  `rol_mod_rol_id` int(11) NOT NULL,
  `rol_mod_mod_id` int(11) NOT NULL,
  `rol_mod_ent_id` int(11) NOT NULL,
  `rol_mod_order` int(11) NOT NULL,
  `rol_mod_permits` varchar(20) NOT NULL DEFAULT '0,0,0,0,0' COMMENT 'See,Publish,Add,Edit,Delete',
  PRIMARY KEY (`rol_mod_mod_id`,`rol_mod_rol_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of roles_modules
-- ----------------------------
BEGIN;
INSERT INTO `roles_modules` VALUES (5, 500, 1, 1, '0,0,0,0,0');
INSERT INTO `roles_modules` VALUES (6, 500, 1, 0, '0,0,0,0,0');
INSERT INTO `roles_modules` VALUES (7, 500, 1, 0, '0,0,0,0,0');
INSERT INTO `roles_modules` VALUES (5, 501, 1, 1, '0,0,0,0,0');
INSERT INTO `roles_modules` VALUES (6, 501, 1, 0, '0,0,0,0,0');
INSERT INTO `roles_modules` VALUES (7, 501, 1, 1, '0,0,0,0,0');
INSERT INTO `roles_modules` VALUES (10, 1000, 1, 1, '0,0,0,0,0');
INSERT INTO `roles_modules` VALUES (10, 1001, 1, 1, '0,0,0,0,0');
COMMIT;

-- ----------------------------
-- Table structure for roles_sites
-- ----------------------------
CREATE TABLE `roles_sites` (
  `rol_site_rol_id` int(11) NOT NULL,
  `rol_site_site_id` int(11) NOT NULL,
  `rol_site_order` int(11) NOT NULL,
  PRIMARY KEY (`rol_site_rol_id`,`rol_site_site_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of roles_sites
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for roles_systems
-- ----------------------------
CREATE TABLE `roles_systems` (
  `rol_sys_rol_id` int(11) NOT NULL,
  `rol_sys_sys_id` int(11) NOT NULL,
  `rol_sys_ent_id` int(11) NOT NULL,
  `rol_sys_order` int(11) DEFAULT '0',
  PRIMARY KEY (`rol_sys_rol_id`,`rol_sys_sys_id`,`rol_sys_ent_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of roles_systems
-- ----------------------------
BEGIN;
INSERT INTO `roles_systems` VALUES (2, 6, 1, 0);
INSERT INTO `roles_systems` VALUES (5, 6, 1, 1);
INSERT INTO `roles_systems` VALUES (6, 6, 1, 2);
INSERT INTO `roles_systems` VALUES (7, 6, 1, 0);
INSERT INTO `roles_systems` VALUES (10, 5, 1, 1);
COMMIT;

-- ----------------------------
-- Table structure for sites
-- ----------------------------
CREATE TABLE `sites` (
  `site_id` int(11) NOT NULL AUTO_INCREMENT,
  `site_name` varchar(255) DEFAULT NULL,
  `site_path_web` varchar(255) NOT NULL,
  `site_path_host` varchar(255) NOT NULL,
  `site_title` varchar(255) DEFAULT NULL,
  `site_head` text,
  `site_head_path_url` varchar(255) NOT NULL,
  `site_default` int(11) NOT NULL DEFAULT '0',
  `site_state` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`site_id`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of sites
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sites_entities
-- ----------------------------
CREATE TABLE `sites_entities` (
  `site_ent_site_id` int(11) NOT NULL,
  `site_ent_ent_id` int(11) NOT NULL,
  `site_ent_order` int(11) NOT NULL,
  PRIMARY KEY (`site_ent_site_id`,`site_ent_ent_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of sites_entities
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for systems
-- ----------------------------
CREATE TABLE `systems` (
  `sys_id` int(11) NOT NULL AUTO_INCREMENT,
  `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',
  PRIMARY KEY (`sys_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of systems
-- ----------------------------
BEGIN;
INSERT INTO `systems` VALUES (1, 'Websites', NULL, 'websites', 'modules/websites/', 10, '', 'icon icon-code', '#6F91E9', 0, 'components/websites.js', 'assets/css/dist/websites.css', 0, 1);
INSERT INTO `systems` VALUES (2, 'Recursos Humanos', NULL, 'rrhh', 'modules/rrhh/', 200, '', 'icon icon-category', '#6F91E9', 0, 'components/rrhh.js', 'assets/css/dist/rrhh.css', 0, 1);
INSERT INTO `systems` VALUES (4, 'Inventario', NULL, 'inventory', 'modules/inventory/', 400, '', 'icon icon-box', '#FEBF10', 0, 'components/inventory.js', 'assets/css/dist/inventory.css', 0, 1);
INSERT INTO `systems` VALUES (5, 'Contabilidad', NULL, 'accounting', 'modules/accounting/', 500, '', 'icon icon-coin', '#6F91E9', 0, 'components/accounting.js', 'assets/css/dist/accounting.css', 0, 1);
INSERT INTO `systems` VALUES (6, 'Consejeria', NULL, 'counseling', 'modules/counseling/', 600, '', 'icon icon-users', '#27d27c', 0, 'components/counseling.js', 'assets/css/dist/counseling.css', 0, 1);
INSERT INTO `systems` VALUES (7, 'Ventas', NULL, 'sales', 'modules/sales/', 700, '', 'icon icon-sales', '#fc9835', 0, 'components/sales.js', 'assets/css/dist/sales.css', 0, 0);
INSERT INTO `systems` VALUES (8, 'Brokers', NULL, 'brokers', 'modules/brokers/', 800, '', 'icon icon-circle-doble', '#27d27c', 0, 'components/brokers.js', 'assets/css/dist/brokers.css', 0, 0);
INSERT INTO `systems` VALUES (10, 'Suscriptiones', NULL, 'suscriptions', 'modules/accounts/', 1000, '', 'icon icon-tag', '#1be5fc', 0, 'components/subscriptions.js', 'assets/css/dist/subscriptions.css', 0, 1);
INSERT INTO `systems` VALUES (12, 'Finalcial Services Leeds', NULL, 'fls', 'modules/fls/', 1200, '', 'icon icon-circle', '#27d27c', 0, 'components/fls.js', 'assets/css/dist/fls.css', 0, 0);
INSERT INTO `systems` VALUES (13, 'Boletería', NULL, 'tickets', 'modules/tickets/', 1300, '', 'icon icon-tag', '#27d27c', 0, 'components/tickets.js', 'assets/css/dist/tickets.min.css', 0, 1);
INSERT INTO `systems` VALUES (14, 'Rehabilitación', NULL, 'rehabilitation', 'modules/rehabilitation/', 1400, '', 'icon icon-user', '#6F91E', 0, 'components/rehabilitation.js', 'assets/css/dist/rehabilitation.min.css', 0, 1);
INSERT INTO `systems` VALUES (15, 'Ads', NULL, 'ads', 'modules/ads/', 1500, '', 'icon icon-loudspeaker', '#e71882', 0, 'components/ads.js', 'assets/css/dist/ads.min.css', 0, 1);
INSERT INTO `systems` VALUES (16, 'LMS', NULL, 'lms', 'modules/lms/', 1600, '', 'icon icon-graduation', '#FEBF10', 0, 'components/lms.js', 'assets/css/dist/lms.min.css', 0, 1);
INSERT INTO `systems` VALUES (17, 'Activo Fijo', NULL, 'fixedassets', 'modules/fixedassets/', 1700, '', 'icon icon-fixed-assets', '#9c27b0', 0, 'components/fixedassets.js', 'assets/css/dist/fixedassets.min.css', 0, 1);
INSERT INTO `systems` VALUES (18, 'Operaciones', NULL, 'operations', 'modules/operations/', 1800, '', 'icon icon-operations', '#258dfc', 0, 'components/operations.js', 'assets/css/dist/operations.min.css', 0, 1);
INSERT INTO `systems` VALUES (19, 'CRM', NULL, 'crm', 'modules/crm/', 1900, '', 'icon icon-crm', '#ef4848', 0, 'components/crm.js', 'assets/css/dist/crm.min.css', 0, 1);
INSERT INTO `systems` VALUES (20, 'Restorants', NULL, 'restaurants', 'modules/restaurants/', 2000, '', 'icon icon-restaurant', '#ef4848', 0, 'components/restaurants.js', 'assets/css/dist/restaurants.min.css', 0, 1);
COMMIT;

-- ----------------------------
-- Table structure for systems_modules
-- ----------------------------
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,
  PRIMARY KEY (`sys_mod_sys_id`,`sys_mod_mod_id`,`sys_mod_ent_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of systems_modules
-- ----------------------------
BEGIN;
INSERT INTO `systems_modules` VALUES (1, 10, 1, 1);
INSERT INTO `systems_modules` VALUES (1, 11, 1, 2);
INSERT INTO `systems_modules` VALUES (1, 12, 1, 3);
INSERT INTO `systems_modules` VALUES (1, 13, 1, 4);
INSERT INTO `systems_modules` VALUES (1, 14, 1, 5);
INSERT INTO `systems_modules` VALUES (1, 15, 1, 6);
INSERT INTO `systems_modules` VALUES (1, 16, 1, 7);
INSERT INTO `systems_modules` VALUES (1, 17, 1, 8);
INSERT INTO `systems_modules` VALUES (2, 200, 1, 1);
INSERT INTO `systems_modules` VALUES (2, 210, 1, 1);
INSERT INTO `systems_modules` VALUES (4, 400, 1, 1);
INSERT INTO `systems_modules` VALUES (4, 401, 1, 1);
INSERT INTO `systems_modules` VALUES (4, 402, 1, 1);
INSERT INTO `systems_modules` VALUES (4, 403, 1, 1);
INSERT INTO `systems_modules` VALUES (5, 500, 1, 1);
INSERT INTO `systems_modules` VALUES (6, 600, 1, 1);
INSERT INTO `systems_modules` VALUES (6, 601, 1, 1);
INSERT INTO `systems_modules` VALUES (6, 602, 1, 1);
INSERT INTO `systems_modules` VALUES (6, 603, 1, 1);
INSERT INTO `systems_modules` VALUES (7, 700, 1, 1);
INSERT INTO `systems_modules` VALUES (7, 701, 1, 1);
INSERT INTO `systems_modules` VALUES (8, 800, 1, 1);
INSERT INTO `systems_modules` VALUES (8, 801, 1, 1);
INSERT INTO `systems_modules` VALUES (10, 1000, 1, 1);
INSERT INTO `systems_modules` VALUES (10, 1001, 1, 1);
INSERT INTO `systems_modules` VALUES (10, 1002, 1, 1);
INSERT INTO `systems_modules` VALUES (12, 1200, 1, 1);
INSERT INTO `systems_modules` VALUES (12, 1201, 1, 1);
INSERT INTO `systems_modules` VALUES (13, 1300, 1, 1);
INSERT INTO `systems_modules` VALUES (13, 1301, 1, 1);
INSERT INTO `systems_modules` VALUES (14, 1400, 1, 1);
INSERT INTO `systems_modules` VALUES (14, 1401, 1, 1);
INSERT INTO `systems_modules` VALUES (15, 1500, 1, 1);
INSERT INTO `systems_modules` VALUES (15, 1501, 1, 1);
INSERT INTO `systems_modules` VALUES (16, 1600, 1, 1);
INSERT INTO `systems_modules` VALUES (16, 1601, 1, 1);
INSERT INTO `systems_modules` VALUES (17, 1700, 1, 1);
INSERT INTO `systems_modules` VALUES (17, 1701, 1, 1);
INSERT INTO `systems_modules` VALUES (18, 1800, 1, 1);
INSERT INTO `systems_modules` VALUES (19, 1900, 1, 1);
INSERT INTO `systems_modules` VALUES (19, 1901, 1, 1);
INSERT INTO `systems_modules` VALUES (200, 2000, 1, 1);
INSERT INTO `systems_modules` VALUES (201, 2001, 1, 1);
COMMIT;

-- ----------------------------
-- Records of users
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for users_groups
-- ----------------------------
CREATE TABLE `users_groups` (
  `user_group_user_id` int(11) NOT NULL,
  `user_group_group_id` int(11) NOT NULL,
  `user_group_ent_id` int(11) NOT NULL,
  `user_group_order` int(11) NOT NULL,
  PRIMARY KEY (`user_group_user_id`,`user_group_group_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of users_groups
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for users_path
-- ----------------------------
CREATE TABLE `users_path` (
  `user_path_user_id` int(11) NOT NULL,
  `user_path_mod_id` int(11) NOT NULL,
  `user_path_path` varchar(255) NOT NULL,
  `user_path_order` int(11) NOT NULL,
  PRIMARY KEY (`user_path_user_id`,`user_path_mod_id`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of users_path
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for users_roles
-- ----------------------------
CREATE TABLE `users_roles` (
  `user_rol_user_id` int(11) NOT NULL,
  `user_rol_rol_id` int(11) NOT NULL,
  `user_rol_ent_id` int(11) NOT NULL,
  `user_rol_order` int(11) NOT NULL,
  PRIMARY KEY (`user_rol_user_id`,`user_rol_rol_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of users_roles
-- ----------------------------
BEGIN;
INSERT INTO `users_roles` VALUES (1, 1, 1, 0);
INSERT INTO `users_roles` VALUES (3, 10, 1, 1);
INSERT INTO `users_roles` VALUES (4, 10, 1, 1);
COMMIT;

-- ----------------------------
-- Table structure for users_tabs
-- ----------------------------
CREATE TABLE `users_tabs` (
  `user_tab_user_id` int(11) NOT NULL,
  `user_tab_sys_id` int(11) NOT NULL,
  `user_tab_ent_id` int(11) NOT NULL,
  `user_tab_sys_active` int(11) NOT NULL,
  `user_tab_start_mod_id` int(11) DEFAULT '0',
  `user_tab_json` text,
  `user_tab_order` int(11) NOT NULL,
  PRIMARY KEY (`user_tab_user_id`,`user_tab_sys_id`,`user_tab_ent_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of users_tabs
-- ----------------------------
BEGIN;
INSERT INTO `users_tabs` VALUES (1, 1, 1, 0, 0, NULL, 1);
COMMIT;

-- ----------------------------
-- Records of users_tokens
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for worksheets
-- ----------------------------
CREATE TABLE `worksheets` (
  `ws_id` int(11) NOT NULL AUTO_INCREMENT,
  `ws_name` varchar(255) DEFAULT NULL,
  `ws_level` int(11) DEFAULT NULL,
  `ws_class` varchar(44) NOT NULL,
  `ws_ent_id` int(11) NOT NULL DEFAULT '0',
  `ws_state` int(11) DEFAULT NULL,
  PRIMARY KEY (`ws_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of worksheets
-- ----------------------------
BEGIN;
INSERT INTO `worksheets` VALUES (1, 'planilla 1', 1, 'ws1', 1, 1);
INSERT INTO `worksheets` VALUES (2, 'planilla 2', 2, 'ws2', 1, 1);
INSERT INTO `worksheets` VALUES (3, 'planilla 3', 3, 'ws3', 1, 1);
COMMIT;

-- ----------------------------
-- Table structure for worksheets_blocks
-- ----------------------------
CREATE TABLE `worksheets_blocks` (
  `ws_block_ws_id` int(11) NOT NULL,
  `ws_block_block_id` int(11) NOT NULL,
  `ws_block_order` int(11) NOT NULL,
  PRIMARY KEY (`ws_block_ws_id`,`ws_block_block_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of worksheets_blocks
-- ----------------------------
BEGIN;
INSERT INTO `worksheets_blocks` VALUES (1, 1, 1);
INSERT INTO `worksheets_blocks` VALUES (1, 2, 2);
INSERT INTO `worksheets_blocks` VALUES (1, 3, 3);
COMMIT;

