```[sql]
-- ----------------------------
-- Table structure for ns_order
-- ----------------------------
DROP TABLE IF EXISTS `ns_order`;
CREATE TABLE `ns_order` (
`order_id` int(11) NOT NULL AUTO_INCREMENT,
`order_no` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单编号',
`site_id` int(11) NOT NULL DEFAULT 0 COMMENT '商家id',
`site_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '店铺名称',
`website_id` int(11) NOT NULL DEFAULT 0 COMMENT '分站id',
`order_name` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单内容',
`order_from` varchar(55) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单来源',
`order_from_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单来源名称',
`order_type` int(11) NOT NULL DEFAULT 0 COMMENT '订单类型 1. 普通订单 2. 门店订单 3. 本地配送订单4. 虚拟订单',
`order_type_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单类型名称',
`order_promotion_type` int(11) NOT NULL DEFAULT 0 COMMENT '订单营销类型',
`order_promotion_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '营销活动类型名称',
`promotion_id` int(11) NOT NULL DEFAULT 0 COMMENT '营销活动id',
`out_trade_no` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '支付流水号',
`out_trade_no_2` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '支付流水号(多次支付)',
`delivery_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '整体提货编码',
`order_status` int(11) NOT NULL DEFAULT 0 COMMENT '订单状态',
`order_status_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单状态名称',
`order_status_action` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单操作',
`pay_status` int(11) NOT NULL DEFAULT 0 COMMENT '支付状态',
`delivery_status` int(11) NOT NULL DEFAULT 0 COMMENT '配送状态',
`refund_status` int(11) NOT NULL DEFAULT 0 COMMENT '退款状态',
`pay_type` varchar(55) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '支付方式',
`pay_type_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '支付类型名称',
`delivery_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '配送方式',
`delivery_type_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '配送方式名称',
`member_id` int(11) NOT NULL DEFAULT 0 COMMENT '购买人uid',
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '购买人姓名',
`mobile` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '购买人手机',
`telephone` varchar(20) 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(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '购买人地址经度',
`latitude` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '购买人地址纬度',
`buyer_ip` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '购买人ip',
`buyer_ask_delivery_time` int(11) NOT NULL DEFAULT 0 COMMENT '购买人要求配送时间',
`buyer_message` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '购买人留言信息',
`goods_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '商品总金额',
`delivery_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '配送费用',
`promotion_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '订单优惠金额(满减)',
`coupon_id` int(11) NOT NULL DEFAULT 0 COMMENT '优惠券id',
`coupon_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '优惠券金额',
`invoice_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '发票金额',
`order_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '订单合计金额',
`adjust_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '订单调整金额',
`balance_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '余额支付金额',
`pay_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '抵扣之后应付金额',
`create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间',
`pay_time` int(11) NOT NULL DEFAULT 0 COMMENT '订单支付时间',
`delivery_time` int(11) NOT NULL DEFAULT 0 COMMENT '订单配送时间',
`sign_time` int(11) NOT NULL DEFAULT 0 COMMENT '订单签收时间',
`finish_time` int(11) NOT NULL DEFAULT 0 COMMENT '订单完成时间',
`close_time` int(11) NOT NULL DEFAULT 0 COMMENT '订单关闭时间',
`is_lock` int(11) NOT NULL DEFAULT 0 COMMENT '是否锁定订单(针对维权,锁定不可操作)',
`is_evaluate` int(11) NOT NULL DEFAULT 0 COMMENT '是否允许订单评价',
`is_delete` int(11) NOT NULL DEFAULT 0 COMMENT '是否删除(针对后台)',
`is_enable_refund` int(11) NOT NULL DEFAULT 0 COMMENT '是否允许退款',
`remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '卖家留言',
`goods_num` int(11) NOT NULL DEFAULT 0 COMMENT '商品件数',
`delivery_store_id` int(11) NOT NULL DEFAULT 0 COMMENT '门店id',
`delivery_status_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '发货状态',
`is_settlement` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否进行结算',
`store_settlement_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 '门店名称',
`promotion_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '营销类型',
`promotion_type_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '营销类型名称',
`promotion_status_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 '' COMMENT '门店信息(json)',
`virtual_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '虚拟商品码',
`evaluate_status` int(11) NOT NULL DEFAULT 0 COMMENT '评价状态,0:未评价,1:已评价,2:已追评',
`evaluate_status_name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '评价状态名称,未评价,已评价,已追评',
`refund_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '订单退款金额',
`commission` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '总支出佣金',
`is_invoice` int(11) NOT NULL DEFAULT 0 COMMENT '是否需要发票 0 无发票 1 有发票',
`invoice_type` int(11) NOT NULL DEFAULT 1 COMMENT '发票类型 1 纸质发票 2 电子发票',
`invoice_title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '发票抬头',
`taxpayer_number` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '纳税人识别号',
`invoice_rate` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '发票税率',
`invoice_content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '发票内容',
`invoice_delivery_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '发票邮寄费用',
`invoice_full_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '发票邮寄地址',
`is_tax_invoice` int(11) NOT NULL DEFAULT 0 COMMENT '是否需要增值税专用发票',
`invoice_email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '发票发送邮件',
`invoice_title_type` int(11) NOT NULL DEFAULT 0 COMMENT '发票抬头类型 1 个人 2 企业',
`is_fenxiao` int(1) NOT NULL DEFAULT 1 COMMENT '是否参与分销 0不参与 1参与',
`point_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '积分抵现金额',
PRIMARY KEY (`order_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 852 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ns_order_goods
-- ----------------------------
DROP TABLE IF EXISTS `ns_order_goods`;
CREATE TABLE `ns_order_goods` (
`order_goods_id` int(11) NOT NULL AUTO_INCREMENT,
`order_id` int(11) NOT NULL DEFAULT 0 COMMENT '订单id',
`order_no` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单编号',
`site_id` int(11) NOT NULL DEFAULT 0 COMMENT '商家id',
`member_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',
`sku_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商品名称',
`sku_image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商品图片',
`sku_no` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商品编码',
`is_virtual` int(11) NOT NULL DEFAULT 0 COMMENT '是否是虚拟商品',
`goods_class` int(11) NOT NULL DEFAULT 0 COMMENT '商品种类(1.实物 2.虚拟3.卡券)',
`goods_class_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商品类型名称',
`price` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '商品卖价',
`cost_price` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '成本价',
`num` int(11) NOT NULL DEFAULT 0 COMMENT '购买数量',
`goods_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '商品总价',
`cost_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '成本总价',
`delivery_status` int(11) NOT NULL DEFAULT 0 COMMENT '配送状态',
`delivery_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '配送单号',
`gift_flag` int(11) NOT NULL DEFAULT 0 COMMENT '赠品标识',
`refund_no` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '退款编号(申请产生)',
`refund_status` int(11) NOT NULL DEFAULT 0 COMMENT '退款状态',
`refund_status_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '退款状态名称',
`refund_status_action` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '退款操作',
`refund_type` int(11) NOT NULL DEFAULT 0 COMMENT '退款方式',
`refund_apply_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '退款申请金额',
`refund_reason` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '退款原因',
`refund_real_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '实际退款金额',
`refund_delivery_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '退款公司名称',
`refund_delivery_no` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '退款单号',
`refund_time` int(11) NOT NULL DEFAULT 0 COMMENT '实际退款时间',
`refund_refuse_reason` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '退款拒绝原因',
`refund_action_time` int(11) NOT NULL DEFAULT 0 COMMENT '退款时间',
`delivery_status_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '配送状态名称',
`real_goods_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '实际商品购买价',
`refund_remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '退款说明',
`refund_delivery_remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '买家退货说明',
`refund_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '退货地址',
`is_refund_stock` int(11) NOT NULL DEFAULT 0 COMMENT '是否返还库存',
`refund_money_type` int(11) NOT NULL DEFAULT 1 COMMENT '退款方式 1 原路退款 2线下退款',
`promotion_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '优惠金额',
`coupon_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '优惠券金额',
`adjust_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '调整金额',
`goods_name` varchar(400) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商品名称',
`sku_spec_format` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'sku规格格式',
`is_fenxiao` int(1) NOT NULL DEFAULT 1,
`use_point` int(11) NOT NULL DEFAULT 0 COMMENT '积分抵扣所用积分数',
`point_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '积分抵扣金额',
PRIMARY KEY (`order_goods_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 481 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单商品表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ns_order_log
-- ----------------------------
DROP TABLE IF EXISTS `ns_order_log`;
CREATE TABLE `ns_order_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`order_id` int(11) NOT NULL DEFAULT 0 COMMENT '订单id',
`action` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '操作',
`uid` int(11) NOT NULL DEFAULT 0 COMMENT '操作人id',
`nick_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '操作元',
`order_status` int(11) NOT NULL DEFAULT 0 COMMENT '订单状态',
`action_way` bigint(2) NOT NULL DEFAULT 0,
`order_status_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单状态名称',
`action_time` int(11) NOT NULL DEFAULT 0 COMMENT '操作时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单操作表(传统表,不用设计)' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ns_order_promotion_detail
-- ----------------------------
DROP TABLE IF EXISTS `ns_order_promotion_detail`;
CREATE TABLE `ns_order_promotion_detail` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`site_id` int(11) NOT NULL COMMENT '站点id',
`order_id` int(11) NOT NULL DEFAULT 0 COMMENT '订单id',
`promotion_text` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单优惠说明',
`sku_list` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '参与的商品项',
`type` int(11) NOT NULL DEFAULT 0 COMMENT '类型 1优惠,2赠送',
`num` int(11) NOT NULL DEFAULT 0 COMMENT '相关数量',
`money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '相关金额',
`type_event` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '相关执行事件',
`create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 528 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单满减优惠表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ns_order_refund_log
-- ----------------------------
DROP TABLE IF EXISTS `ns_order_refund_log`;
CREATE TABLE `ns_order_refund_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`site_id` int(11) NOT NULL DEFAULT 0 COMMENT '站点id',
`order_goods_id` int(11) NOT NULL DEFAULT 0 COMMENT '订单项id',
`refund_status` int(11) NOT NULL DEFAULT 0 COMMENT '退款状态',
`refund_status_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '退款状态名称',
`action` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '操作内容',
`action_way` int(11) NOT NULL DEFAULT 2 COMMENT '操作类型1买家2卖家',
`action_userid` int(11) NOT NULL DEFAULT 0 COMMENT '操作人id',
`username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '操作人名称',
`action_time` int(11) NOT NULL DEFAULT 0 COMMENT '操作时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 153 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单退款操作表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ns_pay
-- ----------------------------
DROP TABLE IF EXISTS `ns_pay`;
CREATE TABLE `ns_pay` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
`site_id` int(11) NOT NULL DEFAULT 0 COMMENT '站点id',
`out_trade_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '支付流水号',
`pay_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '支付方式',
`trade_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '交易单号',
`pay_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '支付账号',
`pay_body` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '支付主体',
`pay_detail` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '支付详情',
`pay_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '支付金额',
`pay_addon` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '支付插件',
`pay_voucher` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '支付票据',
`pay_status` int(11) NOT NULL DEFAULT 0 COMMENT '支付状态(0.待支付 1. 支付中 2. 已支付 -1已取消)',
`return_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '同步回调网址',
`event` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '支付成功后事件(事件,网址)',
`mch_info` varchar(1000) 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 '支付时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 307 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '支付记录' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ns_pay_refund
-- ----------------------------
DROP TABLE IF EXISTS `ns_pay_refund`;
CREATE TABLE `ns_pay_refund` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
`site_id` int(11) NOT NULL DEFAULT 0 COMMENT '站点id',
`refund_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '退款编号',
`out_trade_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '对应支付流水号',
`refund_detail` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '退款详情',
`refund_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '退款类型',
`refund_fee` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '退款金额',
`total_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '实际支付金额',
`create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 297 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '退款记录' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ns_verifier
-- ----------------------------
DROP TABLE IF EXISTS `ns_verifier`;
CREATE TABLE `ns_verifier` (
`verifier_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '核销员id',
`verifier_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '核销员姓名',
`site_id` int(11) NOT NULL DEFAULT 0 COMMENT '商家id',
`member_id` int(11) NOT NULL DEFAULT 0 COMMENT '前台会员id',
`uid` int(11) NOT NULL DEFAULT 0 COMMENT '后台用户id',
`create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT 0 COMMENT '修改时间',
PRIMARY KEY (`verifier_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 1092 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '核销员(商品或订单商品)' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ns_verify
-- ----------------------------
DROP TABLE IF EXISTS `ns_verify`;
CREATE TABLE `ns_verify` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
`site_id` int(11) NOT NULL DEFAULT 0 COMMENT '站点id',
`site_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '站点名称',
`verify_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '核销码',
`verify_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '核销类型',
`verify_type_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '核销类型名称',
`verify_content_json` varchar(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '核销相关数据',
`verifier_id` int(11) NOT NULL DEFAULT 0 COMMENT '核销员id',
`verifier_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '核销员姓名',
`is_verify` int(11) NOT NULL DEFAULT 0 COMMENT '是否已经核销',
`create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间',
`verify_time` int(11) NOT NULL DEFAULT 0 COMMENT '核销时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 1024 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '核销编码管理' ROW_FORMAT = Compact;
- 序言
- 商城简介
- 代码规范
- model层命名规范
- 前端(管理页面)命名
- 控制器命名规范
- 入门指导
- 伪静态配置
- 数据库配置
- 系统环境
- 系统框架
- 目录结构
- 数据库操作
- 标准代码(前端)
- 提示面板
- 表单
- 插件开发
- 插件目录
- 插件开发说明
- 事件开发
- 常用事件
- 数据字典
- 系统基础表
- 微信小程序相关
- 微信公众号相关
- 配送相关表
- 商品相关表
- 店铺网站设置相关
- 门店相关表
- 会员相关表
- 订单相关表
- 营销(组合套餐)
- 营销(砍价)
- 营销(优惠券)
- 营销(限时折扣)
- 营销(满额包邮)
- 营销(互动游戏)
- 营销(团购)
- 营销(满减送)
- 营销(拼团)
- 营销(秒杀)
- 营销(专题)
- 应用(分销)
- 应用(店铺笔记)
- 应用(小票打印)
- 应用(积分兑换)