```[sql]
-- ----------------------------
-- Table structure for ns_store
-- ----------------------------
DROP TABLE IF EXISTS `ns_store`;
CREATE TABLE `ns_store` (
`store_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '门店站点id',
`store_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '门店名称',
`telphone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '联系电话',
`store_image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' 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 '站点名称',
`status` int(11) NOT NULL DEFAULT 0 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 '纬度',
`is_pickup` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否启用自提',
`is_o2o` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否启用本地配送',
`open_date` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '营业时间',
`o2o_fee_json` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '配送费用设置',
`create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT 0 COMMENT '修改时间',
`username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '门店管理员',
`order_money` decimal(10,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '付款后订单金额',
`order_complete_money` decimal(10,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '订单完成-订单金额',
`order_num` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '订单数',
`order_complete_num` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '订单完成数量',
`is_frozen` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否冻结0-未冻结 1已冻结',
`uid` int(11) NULL DEFAULT 0 COMMENT '门店管理员id',
PRIMARY KEY (`store_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 963 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '线下门店表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ns_store_goods
-- ----------------------------
DROP TABLE IF EXISTS `ns_store_goods`;
CREATE TABLE `ns_store_goods` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
`goods_id` int(11) NOT NULL DEFAULT 0 COMMENT '商品id',
`store_id` int(11) NOT NULL DEFAULT 0 COMMENT '门店id',
`store_goods_stock` int(11) NOT NULL DEFAULT 0 COMMENT '商品库存',
`store_sale_num` int(11) NOT NULL DEFAULT 0 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 = 2048 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '门店商品表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ns_store_goods_sku
-- ----------------------------
DROP TABLE IF EXISTS `ns_store_goods_sku`;
CREATE TABLE `ns_store_goods_sku` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id',
`sku_id` int(11) NOT NULL DEFAULT 0 COMMENT 'sku_id',
`goods_id` int(11) NOT NULL DEFAULT 0 COMMENT '商品id',
`store_stock` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '库存',
`store_sale_num` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '销量',
`store_id` 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 (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 963 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '门店sku表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ns_store_member
-- ----------------------------
DROP TABLE IF EXISTS `ns_store_member`;
CREATE TABLE `ns_store_member` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
`member_id` int(11) NOT NULL DEFAULT 0 COMMENT '会员id',
`store_id` int(11) NOT NULL DEFAULT 0 COMMENT '门店站点id',
`order_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '付款后-消费金额',
`order_complete_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '订单完成-消费金额',
`order_num` int(11) NOT NULL DEFAULT 0 COMMENT '付款后-消费次数',
`order_complete_num` int(11) NOT NULL DEFAULT 0 COMMENT '订单完成-消费次数',
`create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 5461 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '门店会员管理' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ns_store_settlement
-- ----------------------------
DROP TABLE IF EXISTS `ns_store_settlement`;
CREATE TABLE `ns_store_settlement` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`settlement_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' 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 '站点名称',
`store_id` int(11) NOT NULL DEFAULT 0 COMMENT '门店id',
`store_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '门店名称',
`order_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '订单总金额',
`shop_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '店铺金额',
`refund_platform_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '平台退款抽成',
`platform_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '平台抽成',
`refund_shop_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '店铺退款金额',
`refund_money` decimal(10,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '退款金额',
`create_time` 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 '账期结束时间',
`commission` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '佣金支出',
`is_settlement` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否结算',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '备注',
`offline_order_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '线下支付的订单金额',
`offline_refund_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '线下退款金额',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 183 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
- 序言
- 商城简介
- 代码规范
- model层命名规范
- 前端(管理页面)命名
- 控制器命名规范
- 入门指导
- 伪静态配置
- 数据库配置
- 系统环境
- 系统框架
- 目录结构
- 数据库操作
- 标准代码(前端)
- 提示面板
- 表单
- 插件开发
- 插件目录
- 插件开发说明
- 事件开发
- 常用事件
- 数据字典
- 系统基础表
- 微信小程序相关
- 微信公众号相关
- 配送相关表
- 商品相关表
- 店铺网站设置相关
- 门店相关表
- 会员相关表
- 订单相关表
- 营销(组合套餐)
- 营销(砍价)
- 营销(优惠券)
- 营销(限时折扣)
- 营销(满额包邮)
- 营销(互动游戏)
- 营销(团购)
- 营销(满减送)
- 营销(拼团)
- 营销(秒杀)
- 营销(专题)
- 应用(分销)
- 应用(店铺笔记)
- 应用(小票打印)
- 应用(积分兑换)