`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '商品ID', `code` varchar(255) NOT NULL COMMENT '唯一code', `type` varchar(255) NOT NULL DEFAULT 'tabp' COMMENT '类型', `name` varchar(255) NOT NULL DEFAULT '' COMMENT '名称', `name_sub` varchar(255) DEFAULT NULL, `price` decimal(12,2) unsigned NOT NULL DEFAULT 0.00 COMMENT '售价', `content` longtext NOT NULL DEFAULT '{}' COMMENT '内容' CHECK (json_valid(`content`)), `limit` longtext NOT NULL DEFAULT '{}' COMMENT '购买限制' CHECK (json_valid(`limit`)), `status` tinyint(1) unsigned NOT NULL DEFAULT 1 COMMENT '销售状态', `create_time` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '创建时间', `update_time` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '更新时间', `sale_count` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '累计销量', `sale_count_shadow` int(11) DEFAULT 0 COMMENT '假销售count', `sale_shadow_oneday` int(11) DEFAULT 0 COMMENT '一天假卖几个', `stock` int(11) NOT NULL DEFAULT -1 COMMENT '限购数量,0为不限购', `class_time` int(11) DEFAULT 0 COMMENT '和content里的完全一致,拿出来方便排序。', `reward` tinyint(1) DEFAULT 1 COMMENT '允许返利', `order_group` tinyint(2) DEFAULT 1 COMMENT '排序组', `huodong_up_str` varchar(255) DEFAULT NULL COMMENT '提升了什么', `end_time` int(11) DEFAULT 0 COMMENT '自动下架时间,0为不限期', `start_time` int(11) DEFAULT 0 COMMENT '自动上架时间', `memo` varchar(255) DEFAULT NULL COMMENT '备注,仅后台可见', `is_huodong` tinyint(1) DEFAULT 0 COMMENT '是否是活动商品,目前是没用上,但是业务逻辑上应该有', `coupon_disable` tinyint(1) DEFAULT 0 COMMENT '是否阻止优化码,这个优先级最高', `autorenew_count` int(11) DEFAULT 0 COMMENT '自动续费数量,提前续订也算', PRIMARY KEY (`id`), UNIQUE KEY `code` (`code`), KEY `id` (`id`), KEY `type` (`type`), KEY `status` (`status`)