🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
```[sql] -- ---------------------------- -- Table structure for ns_promotion_exchange -- ---------------------------- DROP TABLE IF EXISTS `ns_promotion_exchange`; CREATE TABLE `ns_promotion_exchange` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键', `site_id` int(11) NOT NULL DEFAULT 0 COMMENT ' 站点id', `type` int(11) NOT NULL DEFAULT 1 COMMENT '兑换形式', `type_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '兑换类型名称', `type_id` int(11) NOT NULL DEFAULT 0 COMMENT '关联id', `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '兑换名称', `image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '图片', `stock` int(11) NOT NULL DEFAULT 0 COMMENT '当前库存', `pay_type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '支付类型(0积分 1积分加钱)', `point` int(11) NOT NULL DEFAULT 0 COMMENT '积分数', `market_price` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '市场价', `price` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '兑换价', `limit_num` int(11) NOT NULL DEFAULT 1 COMMENT '限制兑换数量', `delivery_price` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '物流费用(礼品有效)', `balance` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '余额红包(余额有效)', `state` int(11) NOT NULL DEFAULT 1 COMMENT '状态(上下架)', `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '兑换说明', `create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间', `modify_time` int(11) NOT NULL DEFAULT 0 COMMENT '修改时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 1820 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '积分兑换' ROW_FORMAT = Compact; -- ---------------------------- -- Table structure for ns_promotion_exchange_order -- ---------------------------- DROP TABLE IF EXISTS `ns_promotion_exchange_order`; CREATE TABLE `ns_promotion_exchange_order` ( `order_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `order_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单编号', `member_id` int(11) NOT NULL DEFAULT 0 COMMENT '对应会员', `out_trade_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '支付流水号(线上支付有效)', `point` int(11) NOT NULL DEFAULT 0 COMMENT '兑换积分数', `exchange_price` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '兑换价格', `delivery_price` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '邮费', `price` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '实际应付金额', `express_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '物流单号(礼品发货)', `create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间', `pay_time` int(11) NOT NULL DEFAULT 0 COMMENT '兑换成功时间', `exchange_id` int(11) NOT NULL DEFAULT 0 COMMENT '兑换商品id', `exchange_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '兑换商品名称', `exchange_image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '兑换商品图片', `num` int(11) NOT NULL DEFAULT 0 COMMENT '兑换数量', `order_status` int(11) NOT NULL DEFAULT 0 COMMENT '状态', `type` int(11) NOT NULL DEFAULT 0 COMMENT '类型', `type_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '类型名称', `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '姓名', `mobile` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '手机号', `telephone` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '电话', `province_id` int(11) NOT NULL DEFAULT 0 COMMENT '省id', `city_id` int(11) NOT NULL DEFAULT 0 COMMENT '市id', `district_id` int(11) NOT NULL DEFAULT 0 COMMENT '区县id', `community_id` int(11) NOT NULL DEFAULT 0 COMMENT '社区id', `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '地址信息', `full_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '详细地址信息', `longitude` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '经度', `latitude` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '纬度', `buyer_message` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '买家留言', `order_from` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单来源', `order_from_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单来源名称', `type_id` int(11) NOT NULL DEFAULT 0 COMMENT '关联id', `balance` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '赠送红包', `site_id` int(11) NOT NULL DEFAULT 0, `delivery_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '物流类型', `delivery_type_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '配送方式名称', `delivery_status` int(11) NOT NULL DEFAULT 0 COMMENT '发货状态', `delivery_status_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '发货状态名称', `delivery_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '配送单号', `delivery_store_id` int(11) NOT NULL DEFAULT 0 COMMENT '门店id', `delivery_store_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '门店名称', `delivery_store_info` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '门店信息', `buyer_ask_delivery_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '到达时间', `relate_order_id` int(11) NOT NULL DEFAULT 0 COMMENT '关联订单', PRIMARY KEY (`order_id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 910 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '积分兑换订单' ROW_FORMAT = Compact;