ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
```[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;