DROP TABLE IF EXISTS `product_list_image`;
CREATE TABLE `product_list_image` (
                                      `id` int NOT NULL AUTO_INCREMENT,
                                      `list_id` int NOT NULL,
                                      `image` varchar(255) NOT NULL,
                                      `api_image` varchar(255) DEFAULT NULL,
                                      `title` varchar(250) NOT NULL,
                                      `alt` varchar(250) NOT NULL,
                                      `cover` tinyint(1) DEFAULT NULL,
                                      `sort` int NOT NULL,
                                      PRIMARY KEY (`id`),
                                      KEY `fk_product_list_image_id` (`list_id`),
                                      CONSTRAINT `fk_product_list_image_id` FOREIGN KEY (`list_id`) REFERENCES `product_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3;