-- Active: 1742323104246@@192.168.0.177@3306@eurochronos_2
DROP TABLE IF EXISTS mod_products;
CREATE TABLE `mod_products` (
  `mod_prod_id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
  `mod_prod_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `mod_prod_pathurl` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `mod_prod_description` varchar(445) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `mod_prod_tags` tinytext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_img` int DEFAULT NULL,
  `mod_prod_code` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `mod_prod_record_date` datetime DEFAULT NULL,
  `mod_prod_type` int NOT NULL DEFAULT '0',
  `mod_prod_ent_id` int DEFAULT '0',
  `mod_prod_state` int NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Estructura de tabla para la tabla `mod_products_categorys`
--
DROP TABLE IF EXISTS mod_products_categorys;
CREATE TABLE `mod_products_categorys` (
  `mod_prod_cat_prod_id` int NOT NULL,
  `mod_prod_cat_cat_id` int NOT NULL,
  `mod_prod_cat_ent_id` int NOT NULL,
  `mod_prod_cat_order` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Estructura de tabla para la tabla `mod_products_clothing_store`
--
DROP TABLE IF EXISTS mod_products_clothing_store;
CREATE TABLE `mod_products_clothing_store` (
  `mod_prod_cst_id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
  `mod_prod_cst_prod_id` int NOT NULL,
  `mod_prod_cst_size` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'sx,l,m,l',
  `mod_prod_cst_codebar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `mod_prod_cst_contents` int NOT NULL,
  `mod_prod_cst_colors` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT 'json',
  `mod_prop_cst_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Estructura de tabla para la tabla `mod_products_colors`
--
DROP TABLE IF EXISTS mod_products_colors;
CREATE TABLE `mod_products_colors` (
  `mod_prod_color_id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
  `mod_prod_color_name` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `mod_prod_color_hex` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `mod_prod_color_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_color_ent_id` int NOT NULL,
  `mod_prod_color_state` int NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Estructura de tabla para la tabla `mod_products_files`
--
DROP TABLE IF EXISTS mod_products_files;
CREATE TABLE `mod_products_files` (
  `mod_prod_file_prod_id` int NOT NULL,
  `mod_prod_file_file_id` int NOT NULL,
  `mod_prod_file_order` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Estructura de tabla para la tabla `mod_products_food`
--
DROP TABLE IF EXISTS mod_products_food;
CREATE TABLE `mod_products_food` (
  `mod_prod_food_id` int NOT NULL,
  `mod_prod_food_prod_id` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

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

--
-- Estructura de tabla para la tabla `mod_products_options`
--
DROP TABLE IF EXISTS mod_products_options;
CREATE TABLE `mod_products_options` (
  `mod_prod_opt_id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
  `mod_prod_opt_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `mod_prod_opt_value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `mod_prod_opt_autoload` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Estructura de tabla para la tabla `mod_products_pharmacy`
--
DROP TABLE IF EXISTS mod_products_pharmacy;
CREATE TABLE `mod_products_pharmacy` (
  `mod_prod_pha_id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
  `mod_prod_pha_code_provider` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `mod_prod_pha_prov_id` int NOT NULL,
  `mod_prod_pha_lab_id` int NOT NULL,
  `mod_prod_pha_mak_id` int NOT NULL,
  `mod_prod_pha_presentation` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `mod_prod_pha_codebar` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `mod_prod_pha_phar_form` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `mod_prod_pha_active_concentration_1` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `mod_prod_pha_active_concentration_2` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `mod_prod_pha_active_concentration_3` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `mod_prod_pha_therapy_action` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `mod_prod_pha_condition_sale` int NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Estructura de tabla para la tabla `mod_products_pharmacy_stock`
--

DROP TABLE IF EXISTS mod_products_pharmacy_stock;
CREATE TABLE `mod_products_pharmacy_stock` (
  `mod_prod_pha_stk_id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
  `mod_prod_pha_stk_contry_id` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `mod_prod_pha_stk_nro_health_registration` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `mod_prod_pha_stk_ratio_units_box` int NOT NULL,
  `mod_prod_pha_stk_lot` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `mod_prod_pha_stk_box_blister_ratio` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `mod_prod_pha_stk_height_cm` int NOT NULL,
  `mod_prod_pha_stk_width_cm` int NOT NULL,
  `mod_prod_pha_stk_depth_cm` int NOT NULL,
  `mod_prod_pha_stk_diameter_cm` int NOT NULL,
  `mod_prod_pha_stk_storage_temperature_c` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Estructura de tabla para la tabla `mod_products_prices_list`
--

DROP TABLE IF EXISTS mod_products_prices_list;
CREATE TABLE `mod_products_prices_list` (
  `mod_prod_prl_id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
  `mod_prod_prl_prod_id` int NOT NULL,
  `mod_prod_prl_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `mod_prod_prl_register_date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Estructura de tabla para la tabla `mod_products_relation`
--

DROP TABLE IF EXISTS mod_products_relation;
CREATE TABLE `mod_products_relation` (
  `mod_prod_rel_id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
  `mod_prod_rel_prod_id` int NOT NULL,
  `mod_prod_rel_ent_id` int NOT NULL,
  `mod_prod_rel_type` int DEFAULT NULL,
  `mod_prod_rel_stock` int DEFAULT NULL,
  `mod_prod_rel_pricing` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Estructura de tabla para la tabla `mod_products_rw`
--

DROP TABLE IF EXISTS mod_products_rw;
CREATE TABLE `mod_products_rw` (
  `mod_prod_rw_id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
  `mod_prod_rw_prod_id` int NOT NULL,
  `mod_prod_rw_state` tinyint DEFAULT '0',
  `mod_prod_rw_rmc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_reference` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_familyname` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_modelname` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_ranking` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_spec_modelcase` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_spec_diameter` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_spec_material` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_spec_bezel` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_spec_windingcrown` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_spec_crystal` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_spec_waterresistance` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_spec_movement` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_spec_calibre` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_spec_bracelet` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_spec_braceletmaterial` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_spec_clasp` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_spec_dial` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_spec_gem_setting` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_spec_powerreserve` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_spec_certification` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_gallery_image1` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_gallery_image2` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_gallery_image3` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_gallery_image4` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_feature1_title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_feature1_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_feature1_asset` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_feature2_title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_feature2_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_feature2_asset` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_feature3_title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_feature3_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_feature3_asset` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_brochure` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_rw_h1` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;


DROP TABLE IF EXISTS mod_products_types;
CREATE TABLE `mod_products_types` (
  `mod_prod_type_id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
  `mod_prod_type_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `mod_prod_type_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `mod_prod_type_subfix` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `mod_prod_type_subfix_db` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `mod_prod_type_primary` int DEFAULT '0',
  `mod_prod_type_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `mod_prod_type_ent_id` int DEFAULT NULL,
  `mod_prod_type_state` int NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `mod_products_types` (`mod_prod_type_id`, `mod_prod_type_name`, `mod_prod_type_path`, `mod_prod_type_subfix`, `mod_prod_type_subfix_db`, `mod_prod_type_primary`, `mod_prod_type_json`, `mod_prod_type_ent_id`, `mod_prod_type_state`) VALUES
(1, 'Store', 'store', '_str', '_store', 0, '', 1, 1),
(2, 'Clothing store', 'clothingStore', '_cst', '_clothing_store', 1, NULL, 1, 1);

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

--
-- Estructura de tabla para la tabla `mod_products_warehouses`
--

DROP TABLE IF EXISTS mod_products_warehouses;
CREATE TABLE `mod_products_warehouses` (
  `mod_prod_wrh_prod_id` int NOT NULL,
  `mod_prod_wrh_wrh_id` int NOT NULL,
  `mod_prod_wrh_order` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;