```[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層命名規范
- 前端(管理頁面)命名
- 控制器命名規范
- 入門指導
- 偽靜態配置
- 數據庫配置
- 系統環境
- 系統框架
- 目錄結構
- 數據庫操作
- 標準代碼(前端)
- 提示面板
- 表單
- 插件開發
- 插件目錄
- 插件開發說明
- 事件開發
- 常用事件
- 數據字典
- 系統基礎表
- 微信小程序相關
- 微信公眾號相關
- 配送相關表
- 商品相關表
- 店鋪網站設置相關
- 門店相關表
- 會員相關表
- 訂單相關表
- 營銷(組合套餐)
- 營銷(砍價)
- 營銷(優惠券)
- 營銷(限時折扣)
- 營銷(滿額包郵)
- 營銷(互動游戲)
- 營銷(團購)
- 營銷(滿減送)
- 營銷(拼團)
- 營銷(秒殺)
- 營銷(專題)
- 應用(分銷)
- 應用(店鋪筆記)
- 應用(小票打印)
- 應用(積分兌換)