CREATE TABLE `qimall_addons_seckill_activity` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `mall_id` int(11) NOT NULL DEFAULT '0',
  `title` varchar(128) CHARACTER SET utf8mb4 NOT NULL DEFAULT '' COMMENT '活动标题',
  `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品ID',
  `attr_id` int(11) NOT NULL DEFAULT '0' COMMENT '规格ID',
  `begin_time` int(11) NOT NULL DEFAULT '0' COMMENT '开始时间',
  `end_time` int(11) NOT NULL DEFAULT '0' COMMENT '结束时间',
  `hot_time` int(11) NOT NULL DEFAULT '0' COMMENT '预热开始时间',
  `stock` int(11) NOT NULL DEFAULT '0' COMMENT '库存',
  `sale_nums` int(11) NOT NULL DEFAULT '0' COMMENT '已售数量',
  `price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '秒杀售价',
  `activity_status` tinyint(3) NOT NULL DEFAULT '0' COMMENT '0未开始;1进行中;2已结束;3已取消',
  `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]',
  `created_at` int(10) NOT NULL DEFAULT '0',
  `updated_at` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `mall_user_id` (`mall_id`,`goods_id`) USING BTREE
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='秒杀活动表';


CREATE TABLE `qimall_addons_seckill_activity_order` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `mall_id` int(11) NOT NULL DEFAULT '0',
  `activity_id` int(11) NOT NULL DEFAULT '0' COMMENT '活动ID',
  `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单ID',
  `created_at` int(10) NOT NULL DEFAULT '0',
  `updated_at` int(10) NOT NULL DEFAULT '0',
  `is_close` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否关闭',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `activity_id` (`activity_id`) USING BTREE,
  KEY `order_id` (`order_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='秒杀活动订单表';

