多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
```[sql] CREATE TABLE ns_adv ( adv_id int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', site_id int(11) NOT NULL DEFAULT 0 COMMENT '站点id', ap_id int(11) NOT NULL DEFAULT 0 COMMENT '广告位id', adv_title varchar(255) NOT NULL DEFAULT '' COMMENT '广告内容描述', adv_url varchar(255) NOT NULL DEFAULT '' COMMENT '广告链接', adv_image varchar(255) NOT NULL DEFAULT '' COMMENT '广告内容图片', slide_sort int(11) NOT NULL DEFAULT 0 COMMENT '排序号', price decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '广告价格/月', background varchar(255) NOT NULL DEFAULT '#FFFFFF' COMMENT '背景色', PRIMARY KEY (adv_id) ) ENGINE = INNODB, CHARACTER SET utf8, COLLATE utf8_general_ci, COMMENT = '广告表'; CREATE TABLE ns_adv_position ( ap_id mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '广告位置id', site_id int(11) NOT NULL DEFAULT 0 COMMENT '站点id', ap_name varchar(100) NOT NULL DEFAULT '' COMMENT '广告位置名', ap_intro varchar(255) NOT NULL DEFAULT '' COMMENT '广告位简介', ap_height int(10) NOT NULL DEFAULT 0 COMMENT '广告位高度', ap_width int(10) NOT NULL DEFAULT 0 COMMENT '广告位宽度', default_content varchar(300) NOT NULL DEFAULT '', ap_background_color varchar(50) NOT NULL DEFAULT '#FFFFFF' COMMENT '广告位背景色 默认白色', type tinyint(4) NOT NULL DEFAULT 1 COMMENT '广告位所在位置类型 1 pc端 2 手机端', keyword varchar(255) NOT NULL DEFAULT '' COMMENT '关键字', PRIMARY KEY (ap_id) ) ENGINE = INNODB, CHARACTER SET utf8, COLLATE utf8_general_ci, COMMENT = '广告位表'; CREATE TABLE ns_help ( id int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键id', app_module varchar(255) NOT NULL DEFAULT '' COMMENT '应用模块', title varchar(255) NOT NULL DEFAULT '' COMMENT '帮助主题', link_address varchar(1000) NOT NULL DEFAULT '' COMMENT '链接地址', content text DEFAULT NULL COMMENT '帮助内容', class_id int(11) NOT NULL DEFAULT 0 COMMENT '帮助类型id', class_name varchar(50) NOT NULL DEFAULT '' COMMENT '帮助类型名称', sort 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) ) ENGINE = INNODB, CHARACTER SET utf8, COLLATE utf8_general_ci, COMMENT = '帮助文章表'; CREATE TABLE ns_help_class ( class_id int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键', app_module varchar(255) NOT NULL DEFAULT '' COMMENT '应用模块', class_name varchar(50) NOT NULL DEFAULT '' COMMENT '帮助类型名称', sort 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 (class_id) ) ENGINE = INNODB, CHARACTER SET utf8, COLLATE utf8_general_ci, COMMENT = '帮助类型'; -- ---------------------------- -- Table structure for ns_notice -- ---------------------------- DROP TABLE IF EXISTS `ns_notice`; CREATE TABLE `ns_notice` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键', `site_id` int(10) NOT NULL DEFAULT 0 COMMENT '站点id', `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '主题', `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '内容', `is_top` 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 '修改时间', `receiving_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '接受对象', `receiving_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '接受对象名称', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 43 AVG_ROW_LENGTH = 1024 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '公告' ROW_FORMAT = Compact; -- ---------------------------- -- Table structure for ns_shop -- ---------------------------- DROP TABLE IF EXISTS `ns_shop`; CREATE TABLE `ns_shop` ( `site_id` int(11) NOT NULL, `shop_status` int(11) NOT NULL DEFAULT 1 COMMENT '店铺经营状态(0.关闭,1正常)', `close_info` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '店铺关闭原因', `sort` 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 '关闭时间', `avatar` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '店铺头像(大图)', `banner` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '店铺条幅', `qq` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '联系人qq', `ww` varchar(20) 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 '联系人姓名', `telephone` varchar(20) 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 '联系手机号', `workingtime` int(11) NOT NULL DEFAULT 0 COMMENT '工作时间', `province` int(11) NOT NULL DEFAULT 0 COMMENT '省id', `province_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '省名称', `city` int(11) NOT NULL DEFAULT 0 COMMENT '城市id', `city_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '城市名称', `district` int(11) NOT NULL DEFAULT 0 COMMENT '区县id', `district_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '区县地址', `community` int(11) NOT NULL DEFAULT 0 COMMENT '乡镇地址id', `community_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '乡镇地址名称', `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(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '经度', `latitude` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '纬度', `email` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', `create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间', `store_settlement_time` int(11) NOT NULL DEFAULT 0 COMMENT '门店最后结算时间', `work_week` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '工作日', PRIMARY KEY (`site_id`) USING BTREE ) ENGINE = InnoDB AVG_ROW_LENGTH = 512 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '店铺表' ROW_FORMAT = Compact; -- ---------------------------- -- Table structure for ns_shop_address -- ---------------------------- DROP TABLE IF EXISTS `ns_shop_address`; CREATE TABLE `ns_shop_address` ( `id` int(11) NOT NULL AUTO_INCREMENT, `site_id` int(11) NOT NULL DEFAULT 0, `contact_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '联系人', `mobile` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '联系人手机号', `postcode` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '邮政编码', `province_id` int(11) NOT NULL DEFAULT 0 COMMENT '省', `city_id` int(11) NOT NULL DEFAULT 0 COMMENT '市', `district_id` int(11) NOT NULL DEFAULT 0 COMMENT '县', `community_id` int(11) NOT NULL DEFAULT 0 COMMENT '乡镇', `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 '收票地址', `is_return` tinyint(1) NOT NULL DEFAULT 0 COMMENT '退货地址', `is_return_default` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否是默认退货地址', `is_delivery` tinyint(1) NOT NULL DEFAULT 0 COMMENT '发货地址', `update_time` int(11) NOT NULL DEFAULT 0, 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_site -- ---------------------------- DROP TABLE IF EXISTS `ns_site`; CREATE TABLE `ns_site` ( `site_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '站点id', `site_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '站点类型', `site_domain` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '站点域名', `create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间', `site_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '站点名称', `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '站点用户', `logo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '站点logo', `seo_keywords` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '站点关键字', `seo_description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '站点描述', PRIMARY KEY (`site_id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 2 AVG_ROW_LENGTH = 114 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '站点基础表' ROW_FORMAT = Compact; -- ---------------------------- -- Table structure for ns_site_diy_view -- ---------------------------- DROP TABLE IF EXISTS `ns_site_diy_view`; CREATE TABLE `ns_site_diy_view` ( `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `site_id` int(11) NOT NULL DEFAULT 0 COMMENT '站点id', `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', `addon_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '插件名称', `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '模板名称', `value` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '配置值', `create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间', `update_time` int(11) NOT NULL DEFAULT 0 COMMENT '修改时间', `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'shop' COMMENT '应用模块:shop、store', `icon` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '图标', `template_id` int(11) NOT NULL DEFAULT 0 COMMENT '模板id', PRIMARY KEY (`id`) USING BTREE, INDEX `IDX_nc_site_diy_view`(`site_id`, `name`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 742 AVG_ROW_LENGTH = 1866 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '店铺自定义模板表' ROW_FORMAT = Compact; -- ---------------------------- -- Table structure for ns_stat_shop -- ---------------------------- DROP TABLE IF EXISTS `ns_stat_shop`; CREATE TABLE `ns_stat_shop` ( `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `site_id` int(11) NOT NULL DEFAULT 0 COMMENT '站点id', `year` int(11) NOT NULL DEFAULT 0 COMMENT '年', `month` int(11) NOT NULL DEFAULT 0 COMMENT '月', `day` int(11) NOT NULL DEFAULT 0 COMMENT '日', `day_time` int(11) NOT NULL DEFAULT 0 COMMENT '当日时间', `order_total` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '订单金额', `shipping_total` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '运费金额', `refund_total` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '退款金额', `order_pay_count` int(11) NOT NULL DEFAULT 0 COMMENT '订单总数', `goods_pay_count` int(11) NOT NULL DEFAULT 0 COMMENT '订单商品总数', `shop_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '店铺金额', `platform_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '平台金额', `create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间', `modify_time` int(11) NOT NULL DEFAULT 0 COMMENT '修改时间', `collect_shop` int(11) NOT NULL DEFAULT 0 COMMENT '店铺收藏量', `collect_goods` int(11) NOT NULL DEFAULT 0 COMMENT '商品收藏量', `visit_count` int(11) NOT NULL DEFAULT 0 COMMENT '浏览量', `order_count` int(11) NOT NULL DEFAULT 0 COMMENT '订单量(总)', `goods_count` int(11) NOT NULL DEFAULT 0 COMMENT '订单商品量(总)', `add_goods_count` int(11) NOT NULL DEFAULT 0 COMMENT '添加商品数', `member_count` int(11) NOT NULL DEFAULT 0 COMMENT '会员统计', PRIMARY KEY (`id`) USING BTREE, INDEX `IDX_ns_stat_shop_day`(`day`) USING BTREE, INDEX `IDX_ns_stat_shop_day_time`(`day_time`) USING BTREE, INDEX `IDX_ns_stat_shop_month`(`month`) USING BTREE, INDEX `IDX_ns_stat_shop_site_id`(`site_id`) USING BTREE, INDEX `IDX_ns_stat_shop_year`(`year`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 3 AVG_ROW_LENGTH = 154 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; ```