--
-- Host: localhost    Database: story-book
-- ------------------------------------------------------


--
-- Current Database: `story-book`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `story-book` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `story-book`;

--
-- Table structure for table `product_images`
--

CREATE TABLE `product_images` (
  `id` int NOT NULL AUTO_INCREMENT,
  `project_master_id` int NOT NULL,
  `product_template_id` int NOT NULL,
  `final_image_path` varchar(255) NOT NULL,
  `final_image_thumbnail_path` varchar(255) DEFAULT NULL,
  `final_image_product_path` varchar(255) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `final_transparent_image_path` text,
  PRIMARY KEY (`id`),
  KEY `ix_product_images_project_master_id` (`project_master_id`),
  KEY `ix_product_images_product_template_id` (`product_template_id`),
  CONSTRAINT `product_images_ibfk_1` FOREIGN KEY (`project_master_id`) REFERENCES `project_masters` (`id`),
  CONSTRAINT `product_images_ibfk_2` FOREIGN KEY (`product_template_id`) REFERENCES `product_template` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `product_images`
--

INSERT INTO `product_images` VALUES (1,1,5,'assets/projects/project_1/final_images/919ce974ede144499774360406b8d979_final.png','assets/projects/project_1/final_images/thumbnail/8c9709718c064f5793b4c072fe791b67_thumb.png','assets/projects/project_1/final_images/06bc4d1f7f04484b8b7aff0820a64d22_product.png',0,'2025-12-19 08:35:55','2025-12-19 08:35:55',NULL),(2,1,4,'assets/projects/project_1/final_images/1580ecf40fe14823bbdf4f8316c1fead_final.png','assets/projects/project_1/final_images/thumbnail/95689a68e9a64056b269337b35797986_thumb.png','assets/projects/project_1/final_images/c32888be81884e9e9000f27ed1ae08aa_product.png',0,'2025-12-19 08:36:00','2025-12-19 08:36:00',NULL),(3,1,2,'assets/projects/project_1/final_images/7724220e3ac0468c9dcb73f5dd44158c_final.png','assets/projects/project_1/final_images/thumbnail/7960f687c2374984add004320c2584f0_thumb.png','assets/projects/project_1/final_images/663e2f344b8b45b8bd551e02a9cfbb3a_product.png',0,'2025-12-19 08:36:01','2025-12-19 10:16:03',NULL),(4,1,3,'assets/projects/project_1/final_images/b648b97ff2df44ffb16b298b6ffec6aa_final.png','assets/projects/project_1/final_images/thumbnail/606da68a37d34104b0d84ff1ce10fd85_thumb.png','assets/projects/project_1/final_images/e8168795e84f43beac0b680d5d45b70c_product.png',0,'2025-12-19 08:36:03','2025-12-19 08:36:03',NULL),(5,1,1,'assets/projects/project_1/final_images/7e0d24f87ad3452f96f0509e898f1461_final.png','assets/projects/project_1/final_images/thumbnail/a9b605c1f9b24e9ea97e3b3d2ab89e03_thumb.png','assets/projects/project_1/final_images/c80773c9df8b4092b294cb0b53053394_product.png',0,'2025-12-19 08:36:05','2025-12-19 10:16:24',NULL),(6,1,6,'assets/projects/project_1/final_images/021557460a1941dfa541cc3238abd2b0_final.png','assets/projects/project_1/final_images/thumbnail/ece219c50c2a44a49664fa0352dd36dc_thumb.png','assets/projects/project_1/final_images/1c4bb59facd645d2a8d3a9f47541006e_product.png',0,'2025-12-19 08:36:06','2025-12-19 08:36:06',NULL),(7,1,7,'assets/projects/project_1/final_images/3a5659e5554047679e692ee670087e7e_final.png','assets/projects/project_1/final_images/thumbnail/b7924c5fe57d4205b4b581f0f9e5b59a_thumb.png','assets/projects/project_1/final_images/6c189c4cb0b948d099b554ada4c36d99_product.png',0,'2025-12-19 08:36:06','2025-12-19 08:36:06',NULL);

--
-- Table structure for table `product_template`
--

CREATE TABLE `product_template` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `unique_name` varchar(255) NOT NULL,
  `uploaded_by` int DEFAULT NULL,
  `file_path` varchar(255) NOT NULL,
  `base_image_path` varchar(255) DEFAULT NULL,
  `base_thumbnail_path` varchar(255) DEFAULT NULL,
  `main_black_mask_path` varchar(255) DEFAULT NULL,
  `main_white_mask_path` varchar(255) DEFAULT NULL,
  `logo_black_mask_path` varchar(255) DEFAULT NULL,
  `logo_white_mask_path` varchar(255) DEFAULT NULL,
  `color_preview_path` varchar(255) DEFAULT NULL,
  `color_white_mask_path` varchar(255) DEFAULT NULL,
  `width` int NOT NULL,
  `height` int NOT NULL,
  `ratio` varchar(255) NOT NULL,
  `is_deleted` tinyint(1) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `ix_product_template_unique_name` (`unique_name`),
  KEY `uploaded_by` (`uploaded_by`),
  KEY `ix_product_template_name` (`name`),
  CONSTRAINT `product_template_ibfk_1` FOREIGN KEY (`uploaded_by`) REFERENCES `user` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `product_template`
--

INSERT INTO `product_template` VALUES (1,'Theale Bag','bag',2,'assets/psd_files/41a6fc65d771496891d2666525aab61d_bag.psd','assets/psd_files/bag/eb027d342a9740bb8cd4c30916abd935_base_image.png','assets/psd_files/bag/6d0b2f4b7abb4845b087e7a6c44845ee_thumb.png','assets/psd_files/bag/f8278015c91a4c3d9bbbb4fcceaf05b0_main_black_mask.png','assets/psd_files/bag/f75ccf333e7e459b8e9bd426dadb2e8d_main_white_mask.png',NULL,NULL,'assets/psd_files/bag/a2742a2abadc44ae8dc35c520a6556b4_color_preview.png','assets/psd_files/bag/726b60de2f1e44ba934cfb1183791f4a_color_white_mask.png',1633,2973,'2421:4412',0,'2025-12-19 08:23:34','2025-12-19 08:23:34'),(2,'Photo Frame','frame',2,'assets/psd_files/8f347c9784774e5982986abb612dd65b_frame.psd','assets/psd_files/frame/be788c7c1d1f48d78d1aa7e49d0fec67_base_image.png','assets/psd_files/frame/6c83b1f0794c42308afb322f0eb5040c_thumb.png','assets/psd_files/frame/49c9f5bcef8e4e31bdf53bc53ec48d34_main_black_mask.png','assets/psd_files/frame/a96bb1e9d4f74ad58c8a3199a78f2bb0_main_white_mask.png',NULL,NULL,NULL,NULL,1022,825,'262:187',0,'2025-12-19 08:24:00','2025-12-19 08:24:00'),(3,'Greeting Card','greeting_card',2,'assets/psd_files/3201e496bdf14c8ea15d459840d112de_greeting_card.psd','assets/psd_files/greeting_card/329e6f8548a5432392a3de7c881fa07b_base_image.png','assets/psd_files/greeting_card/7385e3680b4b41439fd221514ace7c7e_thumb.png','assets/psd_files/greeting_card/838187996ec346da93b599105fca4e17_main_black_mask.png','assets/psd_files/greeting_card/55a99fad65714a7ea63cc553c4ce656c_main_white_mask.png',NULL,NULL,NULL,NULL,940,887,'693:1366',0,'2025-12-19 08:24:33','2025-12-19 08:24:33'),(4,'Keyring','keyring',2,'assets/psd_files/a75837e8bf1949f4bf71cc815085a62a_keyring.psd','assets/psd_files/keyring/39e1ae1edef441ac94a72ffa37f46c1d_base_image.png','assets/psd_files/keyring/912af0cbea614257b9818bedde3a54da_thumb.png','assets/psd_files/keyring/622bc84ab464494a9b5cf1fc14451d36_main_black_mask.png','assets/psd_files/keyring/e832465e0d484faea78c3f5d2197924c_main_white_mask.png',NULL,NULL,NULL,NULL,390,210,'599:1121',0,'2025-12-19 08:24:55','2025-12-19 08:24:55'),(5,'Mugs','mug',2,'assets/psd_files/fdc68906e2194b3aaff3116e6e5feadd_mug.psd','assets/psd_files/mug/30d9130939ef4ae0ace65acef03d4eaf_base_image.png','assets/psd_files/mug/f1244f5a55c44433b8241ec81c17831f_thumb.png','assets/psd_files/mug/4f49d460ada44ec79a4987daba54450f_main_black_mask.png','assets/psd_files/mug/f77db3072995439b9fbbae4043c684a3_main_white_mask.png','assets/psd_files/mug/b6d098bab88649b5b9b1fd338bcc42c7_logo_black_mask.png','assets/psd_files/mug/cae7a91680fb473796a8ad1c1862354a_logo_white_mask.png',NULL,NULL,1329,550,'2775:1148',0,'2025-12-19 08:29:07','2025-12-19 08:29:07'),(6,'Notebook','notebook',2,'assets/psd_files/7a1e5f41cae846f7b68f119d29034984_notebook.psd','assets/psd_files/notebook/a973d6001c59494bacb81b2cc92d6423_base_image.png','assets/psd_files/notebook/0fed56f94fa843eda18a33a4afa16e95_thumb.png','assets/psd_files/notebook/13df69b24b6f4fb4a3a18389fa9885e4_main_black_mask.png','assets/psd_files/notebook/27a566ca916d4c3fbde89e5dbff577f3_main_white_mask.png',NULL,NULL,NULL,NULL,587,904,'865:1649',0,'2025-12-19 08:30:14','2025-12-19 08:30:14'),(7,'Fridge Magnet','magnet',2,'assets/psd_files/47cb9d6a09a44139922fc0377f7b7788_magnet.psd','assets/psd_files/magnet/e5e51853130e46f68e4d74ffc560fd23_base_image.png','assets/psd_files/magnet/b7540d1be9474604afa86fd292ecc07a_thumb.png','assets/psd_files/magnet/e7395903c66d4d4bbe81379a2e659a76_main_black_mask.png','assets/psd_files/magnet/d0f8d1dec8244b9e82ce6b27606fa07f_main_white_mask.png',NULL,NULL,NULL,NULL,669,669,'1340:1997',0,'2025-12-19 08:33:33','2025-12-19 08:33:33');

--
-- Table structure for table `project_masters`
--

CREATE TABLE `project_masters` (
  `id` int NOT NULL AUTO_INCREMENT,
  `project_name` varchar(255) NOT NULL,
  `client_name` varchar(255) NOT NULL,
  `overlay_image_path` varchar(255) DEFAULT NULL,
  `overlay_thumbnail_path` varchar(255) DEFAULT NULL,
  `logo_image_path` varchar(255) DEFAULT NULL,
  `logo_thumbnail_path` varchar(255) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `ix_project_masters_project_name` (`project_name`),
  KEY `ix_project_masters_client_name` (`client_name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `project_masters`
--

INSERT INTO `project_masters` VALUES (1,'Project-1','Client-1','assets/projects/project_1/overlay_images/6791fc05d499442685bf90ca0a214320_Bat.png','assets/projects/project_1/overlay_images/thumbnail/051a2688db834fdc98de13a0d5f451c2_thumb.png',NULL,NULL,0,'2025-12-19 08:35:25','2025-12-19 08:35:32');


