多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
~~~[sql] CREATE TABLE `xi_promotion_coupon` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `dealer_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商家ID', `stores_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '门店ID', `name` varchar(32) NOT NULL DEFAULT '' COMMENT '名称', `money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '金额', `number` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '数量', `conditions` varchar(255) NOT NULL DEFAULT '' COMMENT '条件', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) NOT NULL DEFAULT '1451577600' COMMENT '更新时间', `start_at` int(11) NOT NULL DEFAULT '1451577600' COMMENT '开始时间', `end_at` int(11) NOT NULL DEFAULT '1451577600' COMMENT '结束时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='促销优惠券'; ~~~ ~~~[sql] CREATE TABLE `xi_promotion_coupon_record` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `coupon_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '优惠券ID', `member_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID', `order_id` int(11) unsigned DEFAULT NULL COMMENT '订单ID', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `conpon_id` (`coupon_id`,`member_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='促销优惠券记录'; ~~~ ~~~[sql] CREATE TABLE `xi_promotion_goods_seckill` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `dealer_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商家ID', `stores_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '门店ID', `goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID', `price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '价格', `inventory` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '库存', `max_buy_number` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '最大购买数量', `is_trash` tinyint(11) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(11) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', `start_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '开始时间', `end_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '结束时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='促销商品秒杀'; ~~~ ~~~[sql] CREATE TABLE `xi_promotion_order_full_subtract` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `dealer_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商家ID', `stores_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '门店ID', `value` varchar(255) NOT NULL DEFAULT '' COMMENT '值', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `stores_id` (`stores_id`,`is_trash`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='促销订单满减'; ~~~ ~~~[sql] CREATE TABLE `xi_promotion_redpacket` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `admin_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '管理员ID', `name` varchar(32) NOT NULL DEFAULT '' COMMENT '名称', `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '金额', `number` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '数量', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='促销红包'; ~~~ ~~~[sql] CREATE TABLE `xi_promotion_redpacket_record` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `redpacket_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '红包ID', `member_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID', `order_id` int(11) unsigned DEFAULT NULL COMMENT '订单ID', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `redpacket_id` (`redpacket_id`,`member_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='促销红包记录'; ~~~