🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
```[sql] -- ---------------------------- -- Table structure for ns_promotion_pintuan -- ---------------------------- DROP TABLE IF EXISTS `ns_promotion_pintuan`; CREATE TABLE `ns_promotion_pintuan` ( `pintuan_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '拼团id', `site_id` int(11) NOT NULL COMMENT '店铺id', `site_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '店铺名称', `pintuan_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '活动名称', `goods_id` int(11) NULL DEFAULT 0 COMMENT '商品id', `is_virtual_goods` tinyint(1) NULL DEFAULT 0 COMMENT '是否是虚拟商品(0否 1是)', `pintuan_num` int(11) NOT NULL DEFAULT 0 COMMENT '参团人数', `pintuan_time` int(11) NOT NULL DEFAULT 1 COMMENT '拼团有效期', `remark` text CHARACTER SET utf16 COLLATE utf16_general_ci NULL COMMENT '备注', `create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间', `modify_time` int(11) NOT NULL DEFAULT 0 COMMENT '修改时间', `is_recommend` int(11) NOT NULL DEFAULT 0 COMMENT '是否推荐', `start_time` int(11) NOT NULL DEFAULT 0 COMMENT '开始时间', `end_time` int(11) NOT NULL DEFAULT 0 COMMENT '结束时间', `buy_num` int(11) NOT NULL DEFAULT 0 COMMENT '拼团限制购买', `pintuan_price` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '显示拼团价', `is_single_buy` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否单独购买', `is_virtual_buy` tinyint(1) NULL DEFAULT 0 COMMENT '是否虚拟成团', `is_promotion` tinyint(1) NULL DEFAULT 0 COMMENT '是否团长优惠', `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态(0正常 1活动进行中 2活动已结束 3失效 4删除)', `group_num` int(11) NOT NULL DEFAULT 0 COMMENT '开团组数', `order_num` int(11) NOT NULL DEFAULT 0 COMMENT '购买人数', PRIMARY KEY (`pintuan_id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 4096 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '拼团活动表' ROW_FORMAT = Compact; -- ---------------------------- -- Table structure for ns_promotion_pintuan_goods -- ---------------------------- DROP TABLE IF EXISTS `ns_promotion_pintuan_goods`; CREATE TABLE `ns_promotion_pintuan_goods` ( `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键', `pintuan_id` int(11) NOT NULL DEFAULT 0 COMMENT '拼团id', `goods_id` int(11) NOT NULL DEFAULT 0 COMMENT '商品id', `sku_id` int(11) NOT NULL DEFAULT 0 COMMENT 'skuid', `pintuan_price` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '拼团价', `promotion_price` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '团长优惠价', `site_id` int(11) NOT NULL DEFAULT 0 COMMENT '站点id', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 1489 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '拼团商品表' ROW_FORMAT = Compact; -- ---------------------------- -- Table structure for ns_promotion_pintuan_group -- ---------------------------- DROP TABLE IF EXISTS `ns_promotion_pintuan_group`; CREATE TABLE `ns_promotion_pintuan_group` ( `group_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '拼团分组id', `site_id` int(11) NOT NULL DEFAULT 0 COMMENT '店铺id', `goods_id` int(11) NOT NULL DEFAULT 0 COMMENT '商品id', `is_virtual_goods` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否虚拟商品', `pintuan_id` int(11) NOT NULL DEFAULT 0 COMMENT '拼团活动id', `head_id` int(11) NOT NULL DEFAULT 0 COMMENT '团长id', `pintuan_num` int(11) NOT NULL DEFAULT 0 COMMENT '拼团数量', `pintuan_count` int(11) NOT NULL DEFAULT 1 COMMENT '当前数量', `create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间', `end_time` int(11) NOT NULL DEFAULT 0 COMMENT '拼团结束时间', `status` int(11) NOT NULL DEFAULT 0 COMMENT '当前状态 0未支付 1拼团失败 2.组团中3.拼团成功', `is_virtual_buy` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否虚拟成团', `is_single_buy` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否单独购买', `is_promotion` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否团长优惠', `buy_num` int(11) NOT NULL DEFAULT 0 COMMENT '拼团限制购买', `head_member_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '组长会员头像', `head_nickname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '组长会员昵称', PRIMARY KEY (`group_id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 1260 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '拼团组' ROW_FORMAT = Compact; -- ---------------------------- -- Table structure for ns_promotion_pintuan_order -- ---------------------------- DROP TABLE IF EXISTS `ns_promotion_pintuan_order`; CREATE TABLE `ns_promotion_pintuan_order` ( `id` int(11) NOT NULL AUTO_INCREMENT, `pintuan_id` int(11) NOT NULL DEFAULT 0 COMMENT '拼团id', `order_id` int(11) NOT NULL DEFAULT 0 COMMENT '订单id', `site_id` int(11) NOT NULL DEFAULT 0 COMMENT '站点id', `order_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单编号', `group_id` int(11) NOT NULL DEFAULT 0 COMMENT '拼团分组id', `pintuan_status` int(11) NOT NULL DEFAULT 0 COMMENT '拼团状态(0未支付 1拼团失败 2组团中 3拼团成功)', `order_type` int(11) NOT NULL DEFAULT 1 COMMENT '订单类型', `head_id` int(11) NOT NULL DEFAULT 1 COMMENT '团长id', `member_id` int(11) NOT NULL DEFAULT 0 COMMENT '订单会员id', `member_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '会员头像图', `nickname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '会员昵称', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 744 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '拼团订单' ROW_FORMAT = Compact;