--
-- Host: localhost    Database: catalogo
-- ------------------------------------------------------


--
-- Table structure for table `catalog_category_sort`
--

CREATE TABLE `catalog_category_sort` (
  `category_id` int(11) NOT NULL,
  `sort_order` int(11) NOT NULL DEFAULT '9999',
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`category_id`),
  KEY `ix_catalog_category_sort_order` (`sort_order`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `catalog_category_sort`
--

INSERT INTO `catalog_category_sort` VALUES (1,1,'2026-04-21 13:40:32'),(2,7,'2026-04-21 13:40:32'),(3,6,'2026-04-21 13:40:32'),(13,10,'2026-04-21 13:40:32'),(16,2,'2026-04-21 13:40:32'),(17,8,'2026-04-21 13:40:32'),(18,4,'2026-04-21 13:40:32'),(19,3,'2026-04-21 13:40:32'),(20,9,'2026-04-21 13:40:32'),(21,5,'2026-04-21 13:40:32');

--
-- Table structure for table `catalog_employee_permissions`
--

CREATE TABLE `catalog_employee_permissions` (
  `person_id` int(11) NOT NULL,
  `can_access_panel` tinyint(1) NOT NULL DEFAULT '1',
  `can_view_dashboard` tinyint(1) NOT NULL DEFAULT '1',
  `can_manage_links` tinyint(1) NOT NULL DEFAULT '1',
  `can_create_links` tinyint(1) NOT NULL DEFAULT '1',
  `can_view_orders` tinyint(1) NOT NULL DEFAULT '1',
  `can_manage_inventory` tinyint(1) NOT NULL DEFAULT '1',
  `can_manage_catalog` tinyint(1) NOT NULL DEFAULT '1',
  `can_download_reports` tinyint(1) NOT NULL DEFAULT '1',
  `can_manage_permissions` tinyint(1) NOT NULL DEFAULT '0',
  `updated_at` datetime NOT NULL,
  `updated_by` int(11) DEFAULT NULL,
  PRIMARY KEY (`person_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `catalog_employee_permissions`
--

INSERT INTO `catalog_employee_permissions` VALUES (1,1,1,1,1,1,1,1,1,1,'2026-04-20 17:32:21',1),(2,1,1,1,1,1,1,0,1,0,'2026-04-20 17:32:21',1),(74,1,1,1,1,1,1,0,1,0,'2026-04-20 17:32:21',1),(97,1,0,0,0,0,1,0,0,0,'2026-04-20 17:32:21',1);

--
-- Table structure for table `catalog_item_image_sort`
--

CREATE TABLE `catalog_item_image_sort` (
  `item_id` int(11) NOT NULL,
  `image_id` int(11) NOT NULL,
  `sort_order` int(11) NOT NULL DEFAULT '9999',
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`item_id`,`image_id`),
  KEY `ix_catalog_item_image_sort_order` (`item_id`,`sort_order`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `catalog_item_image_sort`
--

INSERT INTO `catalog_item_image_sort` VALUES (452,325,2,'2026-04-21 15:35:23'),(452,624,1,'2026-04-21 15:35:23'),(453,326,2,'2026-04-21 15:35:11'),(453,623,1,'2026-04-21 15:35:11'),(454,327,2,'2026-04-21 15:34:54'),(454,622,1,'2026-04-21 15:34:54'),(455,328,2,'2026-04-21 15:34:41'),(455,621,1,'2026-04-21 15:34:41'),(456,329,2,'2026-04-21 15:34:29'),(456,620,1,'2026-04-21 15:34:29'),(457,330,2,'2026-04-21 15:20:23'),(457,502,1,'2026-04-21 15:20:23'),(458,331,2,'2026-04-21 15:34:16'),(458,619,1,'2026-04-21 15:34:16'),(459,332,2,'2026-04-21 15:33:56'),(459,618,1,'2026-04-21 15:33:56'),(460,333,2,'2026-04-21 15:33:43'),(460,617,1,'2026-04-21 15:33:43'),(461,334,2,'2026-04-21 15:33:35'),(461,616,1,'2026-04-21 15:33:35'),(462,335,2,'2026-04-21 15:33:21'),(462,615,1,'2026-04-21 15:33:21'),(463,336,2,'2026-04-21 15:33:10'),(463,614,1,'2026-04-21 15:33:10'),(464,337,2,'2026-04-21 15:32:59'),(464,613,1,'2026-04-21 15:32:59'),(465,338,2,'2026-04-21 15:32:48'),(465,612,1,'2026-04-21 15:32:48'),(466,339,2,'2026-04-21 15:32:38'),(466,611,1,'2026-04-21 15:32:38'),(467,340,2,'2026-04-21 15:32:24'),(467,610,1,'2026-04-21 15:32:24'),(468,341,2,'2026-04-21 15:32:11'),(468,609,1,'2026-04-21 15:32:11'),(469,342,2,'2026-04-21 15:31:56'),(469,608,1,'2026-04-21 15:31:56'),(476,311,2,'2026-04-21 15:14:07'),(476,607,1,'2026-04-21 15:14:07'),(505,223,2,'2026-04-21 15:11:49'),(505,606,1,'2026-04-21 15:11:49'),(509,226,2,'2026-04-21 15:09:47'),(509,605,1,'2026-04-21 15:09:47'),(514,229,2,'2026-04-21 15:08:16'),(514,604,1,'2026-04-21 15:08:16'),(521,206,2,'2026-04-21 15:41:04'),(521,625,1,'2026-04-21 15:41:04'),(522,261,2,'2026-04-21 14:57:30'),(522,603,1,'2026-04-21 14:57:30'),(523,262,2,'2026-04-21 14:57:26'),(523,602,1,'2026-04-21 14:57:26'),(524,263,2,'2026-04-21 14:57:21'),(524,601,1,'2026-04-21 14:57:21'),(525,264,2,'2026-04-21 14:57:17'),(525,600,1,'2026-04-21 14:57:17'),(526,265,2,'2026-04-21 14:57:05'),(526,598,1,'2026-04-21 14:57:05'),(527,266,2,'2026-04-21 14:56:56'),(527,597,1,'2026-04-21 14:56:56'),(528,267,2,'2026-04-21 14:56:41'),(528,596,1,'2026-04-21 14:56:41'),(529,268,2,'2026-04-21 14:56:36'),(529,595,1,'2026-04-21 14:56:36'),(530,269,2,'2026-04-21 14:56:30'),(530,594,1,'2026-04-21 14:56:30'),(531,270,2,'2026-04-21 14:56:25'),(531,593,1,'2026-04-21 14:56:25'),(532,271,2,'2026-04-21 14:56:20'),(532,592,1,'2026-04-21 14:56:20'),(533,272,2,'2026-04-21 14:56:10'),(533,591,1,'2026-04-21 14:56:10'),(534,273,2,'2026-04-21 14:40:36'),(534,590,1,'2026-04-21 14:40:36'),(535,274,2,'2026-04-21 14:40:38'),(535,589,1,'2026-04-21 14:40:38'),(536,275,2,'2026-04-21 14:40:47'),(536,588,1,'2026-04-21 14:40:47'),(537,276,2,'2026-04-21 14:40:50'),(537,587,1,'2026-04-21 14:40:50'),(538,277,2,'2026-04-21 14:40:56'),(538,586,1,'2026-04-21 14:40:56'),(539,278,2,'2026-04-21 14:36:38'),(539,585,1,'2026-04-21 14:36:38'),(540,279,2,'2026-04-21 14:36:32'),(540,584,1,'2026-04-21 14:36:32'),(541,244,2,'2026-04-21 14:31:34'),(541,583,1,'2026-04-21 14:31:34'),(542,245,2,'2026-04-21 14:31:41'),(542,582,1,'2026-04-21 14:31:41'),(543,246,2,'2026-04-21 14:31:44'),(543,581,1,'2026-04-21 14:31:44'),(544,247,2,'2026-04-21 14:32:00'),(544,579,1,'2026-04-21 14:32:00'),(545,248,2,'2026-04-21 14:32:03'),(545,578,1,'2026-04-21 14:32:03'),(546,249,2,'2026-04-21 14:32:05'),(546,577,1,'2026-04-21 14:32:05'),(566,449,2,'2026-04-21 14:20:05'),(566,571,1,'2026-04-21 14:20:05'),(567,397,2,'2026-04-21 14:20:26'),(567,572,1,'2026-04-21 14:20:26'),(568,398,2,'2026-04-21 14:20:57'),(568,573,1,'2026-04-21 14:20:57'),(569,399,2,'2026-04-21 14:22:56'),(569,575,1,'2026-04-21 14:22:56'),(570,400,2,'2026-04-21 14:25:12'),(570,576,1,'2026-04-21 14:25:12'),(579,207,2,'2026-04-21 13:49:32'),(579,570,1,'2026-04-21 13:49:32'),(580,208,2,'2026-04-21 13:49:19'),(580,569,1,'2026-04-21 13:49:19'),(581,209,2,'2026-04-21 13:49:08'),(581,568,1,'2026-04-21 13:49:08'),(582,210,2,'2026-04-21 13:48:40'),(582,566,1,'2026-04-21 13:48:40'),(583,211,2,'2026-04-21 13:45:57'),(583,564,1,'2026-04-21 13:45:57'),(584,212,2,'2026-04-21 13:47:30'),(584,565,1,'2026-04-21 13:47:30'),(588,287,2,'2026-04-21 13:29:45'),(588,560,1,'2026-04-21 13:29:45'),(589,286,2,'2026-04-21 13:29:42'),(589,559,1,'2026-04-21 13:29:42'),(590,432,2,'2026-04-21 13:27:03'),(590,558,1,'2026-04-21 13:27:03'),(596,190,2,'2026-04-21 13:05:03'),(596,557,1,'2026-04-21 13:05:03'),(597,191,2,'2026-04-21 13:04:34'),(597,455,3,'2026-04-21 13:04:34'),(597,556,1,'2026-04-21 13:04:34'),(598,192,2,'2026-04-21 13:04:20'),(598,555,1,'2026-04-21 13:04:20'),(599,193,2,'2026-04-21 13:04:10'),(599,554,1,'2026-04-21 13:04:10'),(600,194,2,'2026-04-21 12:57:49'),(600,552,1,'2026-04-21 12:57:49'),(601,195,2,'2026-04-21 13:03:51'),(601,553,1,'2026-04-21 13:03:51'),(602,196,2,'2026-04-21 12:57:09'),(602,551,1,'2026-04-21 12:57:09'),(603,197,2,'2026-04-21 12:56:54'),(603,550,1,'2026-04-21 12:56:54'),(604,198,2,'2026-04-21 12:56:32'),(604,549,1,'2026-04-21 12:56:32'),(605,199,2,'2026-04-21 12:56:18'),(605,548,1,'2026-04-21 12:56:18'),(606,285,2,'2026-04-21 12:56:09'),(606,547,1,'2026-04-21 12:56:09'),(607,284,2,'2026-04-21 12:55:57'),(607,546,1,'2026-04-21 12:55:57'),(608,283,2,'2026-04-21 12:55:48'),(608,545,1,'2026-04-21 12:55:48'),(609,282,2,'2026-04-21 12:55:34'),(609,544,1,'2026-04-21 12:55:34'),(611,280,2,'2026-04-21 12:40:45'),(611,511,1,'2026-04-21 12:40:45'),(613,434,2,'2026-04-21 12:55:05'),(613,543,1,'2026-04-21 12:55:05'),(614,435,2,'2026-04-21 12:54:52'),(614,542,1,'2026-04-21 12:54:52'),(615,436,2,'2026-04-21 12:54:27'),(615,541,1,'2026-04-21 12:54:27'),(616,437,2,'2026-04-21 12:54:07'),(616,540,1,'2026-04-21 12:54:07'),(617,438,2,'2026-04-21 12:53:56'),(617,539,1,'2026-04-21 12:53:56'),(618,439,2,'2026-04-21 12:53:42'),(618,538,1,'2026-04-21 12:53:42'),(619,440,2,'2026-04-21 12:53:28'),(619,537,1,'2026-04-21 12:53:28'),(620,441,2,'2026-04-21 12:53:16'),(620,536,1,'2026-04-21 12:53:16'),(621,442,2,'2026-04-21 12:53:03'),(621,535,1,'2026-04-21 12:53:03'),(622,443,2,'2026-04-21 12:52:17'),(622,534,1,'2026-04-21 12:52:17'),(623,444,2,'2026-04-21 12:52:11'),(623,533,1,'2026-04-21 12:52:11'),(624,445,2,'2026-04-21 12:52:01'),(624,532,1,'2026-04-21 12:52:01'),(625,446,2,'2026-04-21 12:51:57'),(625,531,1,'2026-04-21 12:51:57'),(626,448,2,'2026-04-21 12:51:46'),(626,530,1,'2026-04-21 12:51:46'),(627,447,2,'2026-04-21 12:46:46'),(627,529,1,'2026-04-21 12:46:46'),(641,514,2,'2026-04-21 12:51:08'),(641,515,1,'2026-04-21 12:51:08'),(670,481,2,'2026-04-21 12:45:31'),(670,482,1,'2026-04-21 12:45:31');

--
-- Table structure for table `catalog_order_items`
--

CREATE TABLE `catalog_order_items` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `order_id` int(10) unsigned NOT NULL,
  `item_id` int(11) NOT NULL,
  `item_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `quantity` decimal(23,10) NOT NULL DEFAULT '0.0000000000',
  `unit_price` decimal(23,10) NOT NULL DEFAULT '0.0000000000',
  `line_total` decimal(23,10) NOT NULL DEFAULT '0.0000000000',
  `image_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `ix_catalog_order_items_order_id` (`order_id`),
  KEY `ix_catalog_order_items_item_id` (`item_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `catalog_order_items`
--

INSERT INTO `catalog_order_items` VALUES (1,1,515,'Billetera Caballero - C-1',2.0000000000,6.0000000000,12.0000000000,358);

--
-- Table structure for table `catalog_orders`
--

CREATE TABLE `catalog_orders` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `link_id` int(10) unsigned NOT NULL,
  `customer_id` int(11) NOT NULL,
  `sale_id` int(11) DEFAULT NULL,
  `customer_note` text COLLATE utf8mb4_unicode_ci,
  `ordered_at` datetime NOT NULL,
  `subtotal` decimal(23,10) NOT NULL DEFAULT '0.0000000000',
  `tax` decimal(23,10) NOT NULL DEFAULT '0.0000000000',
  `total` decimal(23,10) NOT NULL DEFAULT '0.0000000000',
  `status` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'submitted',
  PRIMARY KEY (`id`),
  KEY `ix_catalog_orders_link_id` (`link_id`),
  KEY `ix_catalog_orders_customer_id` (`customer_id`),
  KEY `ix_catalog_orders_sale_id` (`sale_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `catalog_orders`
--

INSERT INTO `catalog_orders` VALUES (1,3,76,738,'hnyfhnjyfg','2026-04-20 14:01:53',12.0000000000,0.0000000000,12.0000000000,'deleted');

--
-- Table structure for table `catalog_templates`
--

CREATE TABLE `catalog_templates` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(120) COLLATE utf8mb4_unicode_ci NOT NULL,
  `primary_color` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#d62828',
  `secondary_color` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#003049',
  `bg_color` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#fcfaf5',
  `image_bg_color` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#f4f1e6',
  `border_color` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#e4ddce',
  `text_color` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#0f172a',
  `muted_text_color` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#546278',
  `title_size_px` int(11) NOT NULL DEFAULT '17',
  `desc_size_px` int(11) NOT NULL DEFAULT '13',
  `price_size_px` int(11) NOT NULL DEFAULT '24',
  `logo_size_px` int(11) NOT NULL DEFAULT '64',
  `card_style` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'rounded',
  `is_active` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `ix_catalog_templates_active` (`is_active`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `catalog_templates`
--

INSERT INTO `catalog_templates` VALUES (1,'Rojo Clasico','#D62828','#003049','#DBDBDB','#FFFFFF','#E4DDCE','#0F172A','#546278',17,13,24,100,'rounded',1,'2026-04-19 21:10:33'),(2,'Verde Menta','#0f766e','#1d3557','#f0fdfa','#e6f7f2','#cce8df','#102a43','#486581',17,13,24,64,'soft',0,'2026-04-19 21:10:33'),(3,'Noche Azul','#2563eb','#0f172a','#eff6ff','#e7eef9','#bfd0ea','#0f172a','#475569',17,13,24,64,'sharp',0,'2026-04-19 21:10:33');

--
-- Dumping events for database 'catalogo'
--

--
-- Dumping routines for database 'catalogo'
--


