DROP TABLE IF EXISTS `coupon`;
CREATE TABLE `coupon` (
                          `id` int NOT NULL AUTO_INCREMENT,
                          `name` varchar(150) NOT NULL,
                          `code` varchar(20) NOT NULL,
                          `type` varchar(20) NOT NULL,
                          `discount` decimal(15,4) NOT NULL,
                          `logged` tinyint(1) NOT NULL,
                          `shipping` tinyint(1) NOT NULL,
                          `total` decimal(15,4) NOT NULL,
                          `date_start` datetime NOT NULL,
                          `date_end` datetime NOT NULL,
                          `uses_total` int NOT NULL,
                          `uses_customer` varchar(11) NOT NULL,
                          `status` tinyint(1) NOT NULL,
                          `date_added` datetime NOT NULL,
                          `shop_id` int NOT NULL,
                          PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;