```[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;
- 序言
- 商城简介
- 代码规范
- model层命名规范
- 前端(管理页面)命名
- 控制器命名规范
- 入门指导
- 伪静态配置
- 数据库配置
- 系统环境
- 系统框架
- 目录结构
- 数据库操作
- 标准代码(前端)
- 提示面板
- 表单
- 插件开发
- 插件目录
- 插件开发说明
- 事件开发
- 常用事件
- 数据字典
- 系统基础表
- 微信小程序相关
- 微信公众号相关
- 配送相关表
- 商品相关表
- 店铺网站设置相关
- 门店相关表
- 会员相关表
- 订单相关表
- 营销(组合套餐)
- 营销(砍价)
- 营销(优惠券)
- 营销(限时折扣)
- 营销(满额包邮)
- 营销(互动游戏)
- 营销(团购)
- 营销(满减送)
- 营销(拼团)
- 营销(秒杀)
- 营销(专题)
- 应用(分销)
- 应用(店铺笔记)
- 应用(小票打印)
- 应用(积分兑换)