## 数据字典
```[sql]
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1_3306
Source Server Version : 50724
Source Host : 127.0.0.1:3306
Source Database : shopxo
Target Server Type : MYSQL
Target Server Version : 50724
File Encoding : 65001
Date: 2019-02-26 11:40:21
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `s_admin`
-- ----------------------------
DROP TABLE IF EXISTS `s_admin`;
CREATE TABLE `s_admin` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '管理员id' ,
`username` char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户名' ,
`login_pwd` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '登录密码' ,
`login_salt` char(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '登录密码配合加密字符串' ,
`mobile` char(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '手机号码' ,
`gender` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '性别(0保密,1女,2男)' ,
`login_total` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '登录次数' ,
`login_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最后登录时间' ,
`role_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '所属角色组' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='管理员'
AUTO_INCREMENT=4
;
-- ----------------------------
-- Table structure for `s_answer`
-- ----------------------------
DROP TABLE IF EXISTS `s_answer`;
CREATE TABLE `s_answer` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`user_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户id' ,
`name` char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '联系人' ,
`tel` char(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '联系电话' ,
`content` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '详细内容' ,
`reply` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '回复内容' ,
`is_reply` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否已回复(0否, 1是)' ,
`is_show` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否显示(0不显示, 1显示)' ,
`is_delete_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否已删除(0否, 大于0删除时间)' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
INDEX `user_id` (`name`) USING BTREE ,
INDEX `is_delete_time` (`is_delete_time`) USING BTREE ,
INDEX `is_show` (`is_show`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='用户留言/问答'
AUTO_INCREMENT=1
;
-- ----------------------------
-- Table structure for `s_app_home_nav`
-- ----------------------------
DROP TABLE IF EXISTS `s_app_home_nav`;
CREATE TABLE `s_app_home_nav` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`platform` char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'pc' COMMENT '所属平台(pc PC网站, h5 H5手机网站, app 手机APP, alipay 支付宝小程序, weixin 微信小程序, baidu 百度小程序)' ,
`event_type` tinyint(2) NOT NULL DEFAULT '-1' COMMENT '事件类型(0 WEB页面, 1 内部页面(小程序或APP内部地址), 2 外部小程序(同一个主体下的小程序appid), 3 打开地图, 4 拨打电话)' ,
`event_value` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '事件值' ,
`images_url` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '图片地址' ,
`name` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '别名' ,
`is_enable` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否启用(0否,1是)' ,
`bg_color` char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'css背景色值' ,
`sort` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
INDEX `platform` (`platform`) USING BTREE ,
INDEX `is_enable` (`is_enable`) USING BTREE ,
INDEX `sort` (`sort`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='手机 - 首页导航'
AUTO_INCREMENT=5
;
-- ----------------------------
-- Table structure for `s_article`
-- ----------------------------
DROP TABLE IF EXISTS `s_article`;
CREATE TABLE `s_article` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`title` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '标题' ,
`article_category_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '文章分类' ,
`title_color` char(7) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '标题颜色' ,
`jump_url` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '跳转url地址' ,
`is_enable` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否启用(0否,1是)' ,
`content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容' ,
`image` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '图片数据(一维数组json)' ,
`image_count` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '文章图片数量' ,
`access_count` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '访问次数' ,
`is_home_recommended` tinyint(2) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否首页推荐(0否, 1是)' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
INDEX `title` (`title`) USING BTREE ,
INDEX `is_enable` (`is_enable`) USING BTREE ,
INDEX `access_count` (`access_count`) USING BTREE ,
INDEX `image_count` (`image_count`) USING BTREE ,
INDEX `article_category_id` (`article_category_id`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='文章'
AUTO_INCREMENT=30
;
-- ----------------------------
-- Table structure for `s_article_category`
-- ----------------------------
DROP TABLE IF EXISTS `s_article_category`;
CREATE TABLE `s_article_category` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '分类id' ,
`pid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父id' ,
`name` char(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称' ,
`is_enable` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否启用(0否,1是)' ,
`sort` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '顺序' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
INDEX `pid` (`pid`) USING BTREE ,
INDEX `is_enable` (`is_enable`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='文章分类'
AUTO_INCREMENT=25
;
-- ----------------------------
-- Table structure for `s_brand`
-- ----------------------------
DROP TABLE IF EXISTS `s_brand`;
CREATE TABLE `s_brand` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`brand_category_id` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '品牌分类id' ,
`logo` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'logo图标' ,
`name` char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称' ,
`website_url` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '官网地址' ,
`is_enable` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否启用(0否,1是)' ,
`sort` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '顺序' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
INDEX `is_enable` (`is_enable`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='品牌'
AUTO_INCREMENT=3
;
-- ----------------------------
-- Table structure for `s_brand_category`
-- ----------------------------
DROP TABLE IF EXISTS `s_brand_category`;
CREATE TABLE `s_brand_category` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '分类id' ,
`pid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父id' ,
`name` char(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称' ,
`is_enable` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否启用(0否,1是)' ,
`sort` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '顺序' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
INDEX `pid` (`pid`) USING BTREE ,
INDEX `is_enable` (`is_enable`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='品牌分类'
AUTO_INCREMENT=32
;
-- ----------------------------
-- Table structure for `s_cart`
-- ----------------------------
DROP TABLE IF EXISTS `s_cart`;
CREATE TABLE `s_cart` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`user_id` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '用户id' ,
`goods_id` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '商品id' ,
`title` char(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '标题' ,
`images` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '封面图片' ,
`original_price` decimal(10,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '原价' ,
`price` decimal(10,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '销售价格' ,
`stock` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '购买数量' ,
`spec` char(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '规格' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
INDEX `user_id` (`user_id`) USING BTREE ,
INDEX `goods_id` (`goods_id`) USING BTREE ,
INDEX `title` (`title`) USING BTREE ,
INDEX `stock` (`stock`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='购物车'
AUTO_INCREMENT=1
;
-- ----------------------------
-- Table structure for `s_config`
-- ----------------------------
DROP TABLE IF EXISTS `s_config`;
CREATE TABLE `s_config` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '基本设置id' ,
`value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '值' ,
`name` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '名称' ,
`describe` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '描述' ,
`error_tips` char(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '错误提示' ,
`type` char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '类型(admin后台, home前台)' ,
`only_tag` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '唯一的标记' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `only_tag` (`only_tag`) USING BTREE
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='基本配置参数'
AUTO_INCREMENT=86
;
-- ----------------------------
-- Table structure for `s_custom_view`
-- ----------------------------
DROP TABLE IF EXISTS `s_custom_view`;
CREATE TABLE `s_custom_view` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`title` char(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '标题' ,
`content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '内容' ,
`is_enable` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否启用(0否,1是)' ,
`is_header` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否包含头部(0否, 1是)' ,
`is_footer` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否包含尾部(0否, 1是)' ,
`is_full_screen` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否满屏(0否, 1是)' ,
`image` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '图片数据(一维数组json)' ,
`image_count` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '文章图片数量' ,
`access_count` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '访问次数' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
INDEX `title` (`title`) USING BTREE ,
INDEX `is_enable` (`is_enable`) USING BTREE ,
INDEX `access_count` (`access_count`) USING BTREE ,
INDEX `image_count` (`image_count`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='自定义页面'
AUTO_INCREMENT=2
;
-- ----------------------------
-- Table structure for `s_express`
-- ----------------------------
DROP TABLE IF EXISTS `s_express`;
CREATE TABLE `s_express` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`pid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父id' ,
`icon` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'icon图标' ,
`name` char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称' ,
`is_enable` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否启用(0否,1是)' ,
`sort` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '顺序' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
INDEX `is_enable` (`is_enable`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='快递公司'
AUTO_INCREMENT=15
;
-- ----------------------------
-- Table structure for `s_goods`
-- ----------------------------
DROP TABLE IF EXISTS `s_goods`;
CREATE TABLE `s_goods` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`brand_id` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '品牌id' ,
`title` char(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '标题' ,
`title_color` char(7) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '标题颜色' ,
`model` char(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '型号' ,
`place_origin` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '产地(地区省id)' ,
`inventory` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '库存(所有规格库存总和)' ,
`inventory_unit` char(15) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '库存单位' ,
`images` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '封面图片' ,
`original_price` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '原价(单值:10, 区间:10.00-20.00)一般用于展示使用' ,
`min_original_price` decimal(10,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '最低原价' ,
`max_original_price` decimal(10,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '最大原价' ,
`price` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '销售价格(单值:10, 区间:10.00-20.00)一般用于展示使用' ,
`min_price` decimal(10,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '最低价格' ,
`max_price` decimal(10,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '最高价格' ,
`give_integral` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '购买赠送积分' ,
`buy_min_number` int(11) UNSIGNED NOT NULL DEFAULT 1 COMMENT '最低起购数量 (默认1)' ,
`buy_max_number` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最大购买数量(最大数值 100000000, 小于等于0或空则不限)' ,
`is_deduction_inventory` tinyint(2) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否扣减库存(0否, 1是)' ,
`is_shelves` tinyint(2) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否上架(下架后用户不可见, 0否, 1是)' ,
`is_home_recommended` tinyint(2) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否首页推荐(0否, 1是)' ,
`content_web` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '电脑端详情内容' ,
`photo_count` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '相册图片数量' ,
`sales_count` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '销量' ,
`access_count` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '访问次数' ,
`video` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '短视频' ,
`home_recommended_images` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '首页推荐图片' ,
`is_delete_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否已删除(0 未删除, 大于0则是删除时间)' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
INDEX `title` (`title`) USING BTREE ,
INDEX `access_count` (`access_count`) USING BTREE ,
INDEX `photo_count` (`photo_count`) USING BTREE ,
INDEX `is_shelves` (`is_shelves`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='商品'
AUTO_INCREMENT=13
;
-- ----------------------------
-- Table structure for `s_goods_browse`
-- ----------------------------
DROP TABLE IF EXISTS `s_goods_browse`;
CREATE TABLE `s_goods_browse` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`goods_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商品id' ,
`user_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户id' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='用户商品浏览'
AUTO_INCREMENT=1
;
-- ----------------------------
-- Table structure for `s_goods_category`
-- ----------------------------
DROP TABLE IF EXISTS `s_goods_category`;
CREATE TABLE `s_goods_category` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`pid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父id' ,
`icon` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'icon图标' ,
`name` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '名称' ,
`vice_name` char(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '副标题' ,
`describe` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '描述' ,
`bg_color` char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'css背景色值' ,
`big_images` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '大图片' ,
`is_home_recommended` tinyint(2) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否首页推荐(0否, 1是)' ,
`sort` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序' ,
`is_enable` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否启用(0否,1是)' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
INDEX `pid` (`pid`) USING BTREE ,
INDEX `is_enable` (`is_enable`) USING BTREE ,
INDEX `sort` (`sort`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='商品分类'
AUTO_INCREMENT=893
;
-- ----------------------------
-- Table structure for `s_goods_category_join`
-- ----------------------------
DROP TABLE IF EXISTS `s_goods_category_join`;
CREATE TABLE `s_goods_category_join` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`goods_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商品id' ,
`category_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '分类id' ,
`add_time` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '添加时间' ,
PRIMARY KEY (`id`),
INDEX `goods_id` (`goods_id`) USING BTREE ,
INDEX `category_id` (`category_id`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='商品分类关联'
AUTO_INCREMENT=58
;
-- ----------------------------
-- Table structure for `s_goods_content_app`
-- ----------------------------
DROP TABLE IF EXISTS `s_goods_content_app`;
CREATE TABLE `s_goods_content_app` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`goods_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商品id' ,
`images` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '图片' ,
`content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容' ,
`sort` tinyint(3) UNSIGNED NULL DEFAULT 0 COMMENT '顺序' ,
`add_time` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '添加时间' ,
PRIMARY KEY (`id`),
INDEX `goods_id` (`goods_id`) USING BTREE ,
INDEX `sort` (`sort`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='商品手机详情'
AUTO_INCREMENT=102
;
-- ----------------------------
-- Table structure for `s_goods_favor`
-- ----------------------------
DROP TABLE IF EXISTS `s_goods_favor`;
CREATE TABLE `s_goods_favor` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`goods_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商品id' ,
`user_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户id' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='用户商品收藏'
AUTO_INCREMENT=1
;
-- ----------------------------
-- Table structure for `s_goods_photo`
-- ----------------------------
DROP TABLE IF EXISTS `s_goods_photo`;
CREATE TABLE `s_goods_photo` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`goods_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商品id' ,
`images` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '图片' ,
`is_show` tinyint(3) UNSIGNED NULL DEFAULT 1 COMMENT '是否显示(0否, 1是)' ,
`sort` tinyint(3) UNSIGNED NULL DEFAULT 0 COMMENT '顺序' ,
`add_time` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '添加时间' ,
PRIMARY KEY (`id`),
INDEX `goods_id` (`goods_id`) USING BTREE ,
INDEX `is_show` (`is_show`) USING BTREE ,
INDEX `sort` (`sort`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='商品相册图片'
AUTO_INCREMENT=78
;
-- ----------------------------
-- Table structure for `s_goods_spec_base`
-- ----------------------------
DROP TABLE IF EXISTS `s_goods_spec_base`;
CREATE TABLE `s_goods_spec_base` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`goods_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商品id' ,
`price` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '销售价格' ,
`inventory` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '库存' ,
`weight` decimal(10,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '重量(kg) ' ,
`coding` char(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '编码' ,
`barcode` char(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '条形码' ,
`original_price` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '原价' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
PRIMARY KEY (`id`),
INDEX `attribute_type_id` (`price`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='商品规格基础'
AUTO_INCREMENT=114
;
-- ----------------------------
-- Table structure for `s_goods_spec_type`
-- ----------------------------
DROP TABLE IF EXISTS `s_goods_spec_type`;
CREATE TABLE `s_goods_spec_type` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`goods_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商品id' ,
`value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类型值(json字符串存储)' ,
`name` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '类型名称' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
PRIMARY KEY (`id`),
INDEX `goods_id` (`goods_id`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='商品规格类型'
AUTO_INCREMENT=34
;
-- ----------------------------
-- Table structure for `s_goods_spec_value`
-- ----------------------------
DROP TABLE IF EXISTS `s_goods_spec_value`;
CREATE TABLE `s_goods_spec_value` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`goods_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商品id' ,
`goods_spec_base_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商品规格基础id' ,
`value` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '规格值' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
PRIMARY KEY (`id`),
INDEX `goods_id` (`goods_id`) USING BTREE ,
INDEX `goods_spec_base_id` (`goods_spec_base_id`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='商品规格值'
AUTO_INCREMENT=221
;
-- ----------------------------
-- Table structure for `s_link`
-- ----------------------------
DROP TABLE IF EXISTS `s_link`;
CREATE TABLE `s_link` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`name` char(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '导航名称' ,
`url` char(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'url地址' ,
`describe` char(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '描述' ,
`sort` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序' ,
`is_enable` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否启用(0否,1是)' ,
`is_new_window_open` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否新窗口打开(0否,1是)' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
INDEX `sort` (`sort`) USING BTREE ,
INDEX `is_enable` (`is_enable`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='友情链接'
AUTO_INCREMENT=18
;
-- ----------------------------
-- Table structure for `s_message`
-- ----------------------------
DROP TABLE IF EXISTS `s_message`;
CREATE TABLE `s_message` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`user_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户id' ,
`title` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '标题' ,
`detail` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '详情' ,
`business_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '业务id' ,
`business_type` tinyint(2) UNSIGNED NOT NULL DEFAULT 0 COMMENT '业务类型(0默认, 1订单, ...)' ,
`type` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '消息类型(0普通通知, ...)' ,
`is_read` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否已读(0否, 1是)' ,
`is_delete_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否已删除(0否, 大于0删除时间)' ,
`user_is_delete_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户是否已删除(0否, 大于0删除时间)' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
PRIMARY KEY (`id`),
INDEX `user_id` (`user_id`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='消息'
AUTO_INCREMENT=1
;
-- ----------------------------
-- Table structure for `s_navigation`
-- ----------------------------
DROP TABLE IF EXISTS `s_navigation`;
CREATE TABLE `s_navigation` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`pid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父id' ,
`name` char(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '导航名称' ,
`url` char(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'url地址' ,
`value` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '分类id' ,
`data_type` char(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '数据类型(custom:自定义导航, article_class:文章分类, customview:自定义页面)' ,
`nav_type` char(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '导航类型(header:顶部导航, footer:底部导航)' ,
`sort` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序' ,
`is_show` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否显示(0否,1是)' ,
`is_new_window_open` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否新窗口打开(0否,1是)' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
INDEX `is_show` (`is_show`) USING BTREE ,
INDEX `sort` (`sort`) USING BTREE ,
INDEX `nav_type` (`nav_type`) USING BTREE ,
INDEX `pid` (`pid`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='导航'
AUTO_INCREMENT=32
;
-- ----------------------------
-- Table structure for `s_order`
-- ----------------------------
DROP TABLE IF EXISTS `s_order`;
CREATE TABLE `s_order` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`order_no` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '订单号' ,
`user_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户id' ,
`shop_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '店铺id' ,
`receive_address_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '收件地址id' ,
`receive_name` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '收件人-姓名' ,
`receive_tel` char(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '收件人-电话' ,
`receive_province` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '收件人-省' ,
`receive_city` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '收件人-市' ,
`receive_county` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '收件人-县/区' ,
`receive_address` char(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '收件人-详细地址' ,
`user_note` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户备注' ,
`express_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '快递id' ,
`express_number` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '快递单号' ,
`payment_id` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '支付方式id' ,
`status` tinyint(2) UNSIGNED NOT NULL DEFAULT 0 COMMENT '订单状态(0待确认, 1已确认/待支付, 2已支付/待发货, 3已发货/待收货, 4已完成, 5已取消, 6已关闭)' ,
`pay_status` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '支付状态(0未支付, 1已支付, 2已退款)' ,
`preferential_price` decimal(10,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '优惠金额' ,
`price` decimal(10,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '订单单价' ,
`total_price` decimal(10,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '订单总价(订单最终价格)' ,
`pay_price` decimal(10,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '已支付金额' ,
`pay_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '支付时间' ,
`confirm_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '确认时间' ,
`delivery_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '发货时间' ,
`cancel_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '取消时间' ,
`collect_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '收货时间' ,
`close_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '关闭时间' ,
`comments_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '评论时间' ,
`is_comments` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商家是否已评论(0否, 大于0评论时间)' ,
`user_is_comments` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户是否已评论(0否, 大于0评论时间)' ,
`is_delete_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商家是否已删除(0否, 大于0删除时间)' ,
`user_is_delete_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户是否已删除(0否, 大于0删除时间)' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `order_no` (`order_no`) USING BTREE ,
INDEX `user_id` (`user_id`) USING BTREE ,
INDEX `shop_id` (`shop_id`) USING BTREE ,
INDEX `status` (`status`) USING BTREE ,
INDEX `pay_status` (`pay_status`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='订单'
AUTO_INCREMENT=1
;
-- ----------------------------
-- Table structure for `s_order_comments`
-- ----------------------------
DROP TABLE IF EXISTS `s_order_comments`;
CREATE TABLE `s_order_comments` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`user_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户id' ,
`shop_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '店铺id' ,
`order_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '订单id' ,
`goods_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商品id' ,
`content` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '评价内容' ,
`rating` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '评价级别(默认0 1~5)' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
PRIMARY KEY (`id`),
INDEX `user_id` (`user_id`) USING BTREE ,
INDEX `shop_id` (`shop_id`) USING BTREE ,
INDEX `order_id` (`order_id`) USING BTREE ,
INDEX `goods_id` (`goods_id`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='订单评价'
AUTO_INCREMENT=1
;
-- ----------------------------
-- Table structure for `s_order_detail`
-- ----------------------------
DROP TABLE IF EXISTS `s_order_detail`;
CREATE TABLE `s_order_detail` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`user_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户id' ,
`order_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '订单id' ,
`goods_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商品id' ,
`shop_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '店铺id' ,
`title` char(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '标题' ,
`images` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '封面图片' ,
`original_price` decimal(10,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '原价' ,
`price` decimal(10,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '订单价格' ,
`spec` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '规格' ,
`buy_number` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '购买数量' ,
`spec_weight` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '重量(kg)' ,
`spec_coding` char(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '编码' ,
`spec_barcode` char(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '条形码' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
INDEX `user_id` (`user_id`) USING BTREE ,
INDEX `order_id` (`order_id`) USING BTREE ,
INDEX `goods_id` (`goods_id`) USING BTREE ,
INDEX `shop_id` (`shop_id`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='订单详情'
AUTO_INCREMENT=1
;
-- ----------------------------
-- Table structure for `s_order_goods_inventory_log`
-- ----------------------------
DROP TABLE IF EXISTS `s_order_goods_inventory_log`;
CREATE TABLE `s_order_goods_inventory_log` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`order_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '订单id' ,
`goods_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商品id' ,
`order_status` tinyint(2) UNSIGNED NOT NULL DEFAULT 0 COMMENT '订单状态(0待确认, 1已确认/待支付, 2已支付/待发货, 3已发货/待收货, 4已完成, 5已取消, 6已关闭)' ,
`original_inventory` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '原库存' ,
`new_inventory` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最新库存' ,
`is_rollback` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否回滚(0否, 1是)' ,
`rollback_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '回滚时间' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间' ,
PRIMARY KEY (`id`),
INDEX `order_id` (`order_id`) USING BTREE ,
INDEX `goods_id` (`goods_id`) USING BTREE ,
INDEX `order_status` (`order_status`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='订单商品库存变更日志'
AUTO_INCREMENT=1
;
-- ----------------------------
-- Table structure for `s_order_status_history`
-- ----------------------------
DROP TABLE IF EXISTS `s_order_status_history`;
CREATE TABLE `s_order_status_history` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`order_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '订单id' ,
`original_status` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '原始状态' ,
`new_status` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '最新状态' ,
`msg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作描述' ,
`creator` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建-用户id' ,
`creator_name` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '创建人-姓名' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间' ,
PRIMARY KEY (`id`),
INDEX `order_id` (`order_id`) USING BTREE ,
INDEX `original_status` (`original_status`) USING BTREE ,
INDEX `new_status` (`new_status`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='订单状态历史纪录'
AUTO_INCREMENT=1
;
-- ----------------------------
-- Table structure for `s_pay_log`
-- ----------------------------
DROP TABLE IF EXISTS `s_pay_log`;
CREATE TABLE `s_pay_log` (
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '支付日志id' ,
`user_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户id' ,
`order_id` int(11) UNSIGNED NOT NULL COMMENT '订单id' ,
`trade_no` char(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '支付平台交易号' ,
`buyer_user` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '支付平台用户帐号' ,
`pay_price` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '支付金额' ,
`total_price` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '订单实际金额' ,
`subject` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '订单名称' ,
`payment` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '支付方式标记' ,
`payment_name` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '支付方式名称' ,
`business_type` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '业务类型(0默认, 1订单, ...)' ,
`add_time` int(11) UNSIGNED NOT NULL COMMENT '添加时间' ,
PRIMARY KEY (`id`),
INDEX `pay_type` (`payment`) USING BTREE ,
INDEX `order_id` (`order_id`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='支付日志'
AUTO_INCREMENT=1
;
-- ----------------------------
-- Table structure for `s_payment`
-- ----------------------------
DROP TABLE IF EXISTS `s_payment`;
CREATE TABLE `s_payment` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`name` char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称' ,
`payment` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '唯一标记' ,
`logo` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'logo' ,
`version` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '插件版本' ,
`apply_version` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '适用系统版本' ,
`desc` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '插件描述' ,
`author` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '作者' ,
`author_url` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '作者主页' ,
`element` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '配置项规则' ,
`config` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '配置数据' ,
`apply_terminal` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '适用终端 php一维数组json字符串存储(pc, wap, app, alipay, weixin, baidu)' ,
`is_enable` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否启用(0否,1是)' ,
`is_open_user` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否对用户开放' ,
`sort` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '顺序' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `payment` (`payment`) USING BTREE ,
INDEX `is_enable` (`is_enable`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='支付方式'
AUTO_INCREMENT=1
;
-- ----------------------------
-- Table structure for `s_plugins`
-- ----------------------------
DROP TABLE IF EXISTS `s_plugins`;
CREATE TABLE `s_plugins` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`plugins` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '唯一标记' ,
`data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '应用数据' ,
`is_enable` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否启用(0否,1是)' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `plugins` (`plugins`) USING BTREE ,
INDEX `is_enable` (`is_enable`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='应用'
AUTO_INCREMENT=20
;
-- ----------------------------
-- Table structure for `s_power`
-- ----------------------------
DROP TABLE IF EXISTS `s_power`;
CREATE TABLE `s_power` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '权限id' ,
`pid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '权限父级id' ,
`name` char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '权限名称' ,
`control` char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '控制器名称' ,
`action` char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '方法名称' ,
`sort` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序' ,
`is_show` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否显示(0否,1是)' ,
`icon` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '图标class' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='权限'
AUTO_INCREMENT=351
;
-- ----------------------------
-- Table structure for `s_region`
-- ----------------------------
DROP TABLE IF EXISTS `s_region`;
CREATE TABLE `s_region` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`pid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父id' ,
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '名称' ,
`level` tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '级别类型(1:一级[所有省], 2:二级[所有市], 3:三级[所有区县], 4:街道[所有街道])' ,
`letters` char(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '城市首字母' ,
`sort` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序' ,
`is_enable` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否启用(0否,1是)' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
INDEX `pid` (`pid`) USING BTREE ,
INDEX `is_enable` (`is_enable`) USING BTREE ,
INDEX `sort` (`sort`) USING BTREE
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='地区'
AUTO_INCREMENT=45057
;
-- ----------------------------
-- Table structure for `s_role`
-- ----------------------------
DROP TABLE IF EXISTS `s_role`;
CREATE TABLE `s_role` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '角色组id' ,
`name` char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '角色名称' ,
`is_enable` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否启用(0否,1是)' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间' ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='角色组'
AUTO_INCREMENT=14
;
-- ----------------------------
-- Table structure for `s_role_power`
-- ----------------------------
DROP TABLE IF EXISTS `s_role_power`;
CREATE TABLE `s_role_power` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '关联id' ,
`role_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '角色id' ,
`power_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '权限id' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
PRIMARY KEY (`id`),
INDEX `role_id` (`role_id`) USING BTREE ,
INDEX `power_id` (`power_id`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='角色与权限管理'
AUTO_INCREMENT=2604
;
-- ----------------------------
-- Table structure for `s_screening_price`
-- ----------------------------
DROP TABLE IF EXISTS `s_screening_price`;
CREATE TABLE `s_screening_price` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '分类id' ,
`pid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父id' ,
`name` char(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称' ,
`min_price` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最小价格' ,
`max_price` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最大价格' ,
`is_enable` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否启用(0否,1是)' ,
`sort` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '顺序' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
INDEX `pid` (`pid`) USING BTREE ,
INDEX `is_enable` (`is_enable`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='筛选价格'
AUTO_INCREMENT=32
;
-- ----------------------------
-- Table structure for `s_search_history`
-- ----------------------------
DROP TABLE IF EXISTS `s_search_history`;
CREATE TABLE `s_search_history` (
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`user_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户id' ,
`brand_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '品牌id' ,
`category_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '分类id' ,
`keywords` char(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '搜索关键字' ,
`screening_price` char(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '搜索价格区间' ,
`order_by_field` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '排序类型(字段名称)' ,
`order_by_type` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '排序方式(asc, desc)' ,
`ymd` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '日期 ymd' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='搜索日志'
AUTO_INCREMENT=1
;
-- ----------------------------
-- Table structure for `s_slide`
-- ----------------------------
DROP TABLE IF EXISTS `s_slide`;
CREATE TABLE `s_slide` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`platform` char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'pc' COMMENT '所属平台(pc PC网站, h5 H5手机网站, alipay 支付宝小程序, weixin 微信小程序, baidu 百度小程序)' ,
`event_type` tinyint(2) NOT NULL DEFAULT '-1' COMMENT '事件类型(0 WEB页面, 1 内部页面(小程序或APP内部地址), 2 外部小程序(同一个主体下的小程序appid), 3 打开地图, 4 拨打电话)' ,
`event_value` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '事件值' ,
`images_url` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '图片地址' ,
`name` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '别名' ,
`bg_color` char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'css背景色值' ,
`is_enable` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否启用(0否,1是)' ,
`sort` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
INDEX `is_enable` (`is_enable`) USING BTREE ,
INDEX `sort` (`sort`) USING BTREE ,
INDEX `platform` (`platform`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='轮播图片'
AUTO_INCREMENT=14
;
-- ----------------------------
-- Table structure for `s_user`
-- ----------------------------
DROP TABLE IF EXISTS `s_user`;
CREATE TABLE `s_user` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`alipay_openid` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '支付宝openid' ,
`weixin_openid` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '微信openid' ,
`baidu_openid` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '百度openid' ,
`status` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '状态(0正常, 1禁止发言, 2禁止登录)' ,
`salt` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '配合密码加密串' ,
`pwd` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '登录密码' ,
`username` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户名' ,
`nickname` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户昵称' ,
`mobile` char(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '手机号码' ,
`email` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '电子邮箱(最大长度60个字符)' ,
`gender` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '性别(0保密,1女,2男)' ,
`avatar` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户头像地址' ,
`province` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '所在省' ,
`city` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '所在市' ,
`birthday` int(11) NOT NULL DEFAULT 0 COMMENT '生日' ,
`address` char(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '详细地址' ,
`integral` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '积分' ,
`referrer` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '推荐人用户id' ,
`referrer_giving_integral_count` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '推荐赠送积分次数(0未赠送, 大于0则是赠送次数)' ,
`is_delete_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否已删除(0否, 大于0删除时间)' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
INDEX `alipay_openid` (`alipay_openid`) USING BTREE ,
INDEX `weixin_openid` (`weixin_openid`) USING BTREE ,
INDEX `mobile` (`mobile`) USING BTREE ,
INDEX `username` (`username`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='用户'
AUTO_INCREMENT=91
;
-- ----------------------------
-- Table structure for `s_user_address`
-- ----------------------------
DROP TABLE IF EXISTS `s_user_address`;
CREATE TABLE `s_user_address` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '站点id' ,
`user_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '站点所属用户id' ,
`alias` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '别名' ,
`name` char(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '姓名' ,
`tel` char(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '电话' ,
`province` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '所在省' ,
`city` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '所在市' ,
`county` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '所在县/区' ,
`address` char(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '详细地址' ,
`lng` decimal(13,10) UNSIGNED NOT NULL DEFAULT 0.0000000000 COMMENT '经度' ,
`lat` decimal(13,10) UNSIGNED NOT NULL DEFAULT 0.0000000000 COMMENT '纬度' ,
`is_default` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否默认地址(0否, 1是)' ,
`is_delete_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除(0否,1删除时间戳)' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
`upd_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' ,
PRIMARY KEY (`id`),
INDEX `user_id` (`user_id`) USING BTREE ,
INDEX `is_enable` (`is_delete_time`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='用户地址'
AUTO_INCREMENT=1
;
-- ----------------------------
-- Table structure for `s_user_integral_log`
-- ----------------------------
DROP TABLE IF EXISTS `s_user_integral_log`;
CREATE TABLE `s_user_integral_log` (
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id' ,
`user_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户id' ,
`type` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '操作类型(0减少, 1增加)' ,
`original_integral` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '原始积分' ,
`new_integral` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最新积分' ,
`msg` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '操作原因' ,
`operation_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '操作人员id' ,
`add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间' ,
PRIMARY KEY (`id`),
INDEX `user_id` (`user_id`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='用户积分日志'
AUTO_INCREMENT=1
;
-- ----------------------------
-- Auto increment value for `s_admin`
-- ----------------------------
ALTER TABLE `s_admin` AUTO_INCREMENT=4;
-- ----------------------------
-- Auto increment value for `s_answer`
-- ----------------------------
ALTER TABLE `s_answer` AUTO_INCREMENT=1;
-- ----------------------------
-- Auto increment value for `s_app_home_nav`
-- ----------------------------
ALTER TABLE `s_app_home_nav` AUTO_INCREMENT=5;
-- ----------------------------
-- Auto increment value for `s_article`
-- ----------------------------
ALTER TABLE `s_article` AUTO_INCREMENT=30;
-- ----------------------------
-- Auto increment value for `s_article_category`
-- ----------------------------
ALTER TABLE `s_article_category` AUTO_INCREMENT=25;
-- ----------------------------
-- Auto increment value for `s_brand`
-- ----------------------------
ALTER TABLE `s_brand` AUTO_INCREMENT=3;
-- ----------------------------
-- Auto increment value for `s_brand_category`
-- ----------------------------
ALTER TABLE `s_brand_category` AUTO_INCREMENT=32;
-- ----------------------------
-- Auto increment value for `s_cart`
-- ----------------------------
ALTER TABLE `s_cart` AUTO_INCREMENT=1;
-- ----------------------------
-- Auto increment value for `s_config`
-- ----------------------------
ALTER TABLE `s_config` AUTO_INCREMENT=86;
-- ----------------------------
-- Auto increment value for `s_custom_view`
-- ----------------------------
ALTER TABLE `s_custom_view` AUTO_INCREMENT=2;
-- ----------------------------
-- Auto increment value for `s_express`
-- ----------------------------
ALTER TABLE `s_express` AUTO_INCREMENT=15;
-- ----------------------------
-- Auto increment value for `s_goods`
-- ----------------------------
ALTER TABLE `s_goods` AUTO_INCREMENT=13;
-- ----------------------------
-- Auto increment value for `s_goods_browse`
-- ----------------------------
ALTER TABLE `s_goods_browse` AUTO_INCREMENT=1;
-- ----------------------------
-- Auto increment value for `s_goods_category`
-- ----------------------------
ALTER TABLE `s_goods_category` AUTO_INCREMENT=893;
-- ----------------------------
-- Auto increment value for `s_goods_category_join`
-- ----------------------------
ALTER TABLE `s_goods_category_join` AUTO_INCREMENT=58;
-- ----------------------------
-- Auto increment value for `s_goods_content_app`
-- ----------------------------
ALTER TABLE `s_goods_content_app` AUTO_INCREMENT=102;
-- ----------------------------
-- Auto increment value for `s_goods_favor`
-- ----------------------------
ALTER TABLE `s_goods_favor` AUTO_INCREMENT=1;
-- ----------------------------
-- Auto increment value for `s_goods_photo`
-- ----------------------------
ALTER TABLE `s_goods_photo` AUTO_INCREMENT=78;
-- ----------------------------
-- Auto increment value for `s_goods_spec_base`
-- ----------------------------
ALTER TABLE `s_goods_spec_base` AUTO_INCREMENT=114;
-- ----------------------------
-- Auto increment value for `s_goods_spec_type`
-- ----------------------------
ALTER TABLE `s_goods_spec_type` AUTO_INCREMENT=34;
-- ----------------------------
-- Auto increment value for `s_goods_spec_value`
-- ----------------------------
ALTER TABLE `s_goods_spec_value` AUTO_INCREMENT=221;
-- ----------------------------
-- Auto increment value for `s_link`
-- ----------------------------
ALTER TABLE `s_link` AUTO_INCREMENT=18;
-- ----------------------------
-- Auto increment value for `s_message`
-- ----------------------------
ALTER TABLE `s_message` AUTO_INCREMENT=1;
-- ----------------------------
-- Auto increment value for `s_navigation`
-- ----------------------------
ALTER TABLE `s_navigation` AUTO_INCREMENT=32;
-- ----------------------------
-- Auto increment value for `s_order`
-- ----------------------------
ALTER TABLE `s_order` AUTO_INCREMENT=1;
-- ----------------------------
-- Auto increment value for `s_order_comments`
-- ----------------------------
ALTER TABLE `s_order_comments` AUTO_INCREMENT=1;
-- ----------------------------
-- Auto increment value for `s_order_detail`
-- ----------------------------
ALTER TABLE `s_order_detail` AUTO_INCREMENT=1;
-- ----------------------------
-- Auto increment value for `s_order_goods_inventory_log`
-- ----------------------------
ALTER TABLE `s_order_goods_inventory_log` AUTO_INCREMENT=1;
-- ----------------------------
-- Auto increment value for `s_order_status_history`
-- ----------------------------
ALTER TABLE `s_order_status_history` AUTO_INCREMENT=1;
-- ----------------------------
-- Auto increment value for `s_pay_log`
-- ----------------------------
ALTER TABLE `s_pay_log` AUTO_INCREMENT=1;
-- ----------------------------
-- Auto increment value for `s_payment`
-- ----------------------------
ALTER TABLE `s_payment` AUTO_INCREMENT=1;
-- ----------------------------
-- Auto increment value for `s_plugins`
-- ----------------------------
ALTER TABLE `s_plugins` AUTO_INCREMENT=20;
-- ----------------------------
-- Auto increment value for `s_power`
-- ----------------------------
ALTER TABLE `s_power` AUTO_INCREMENT=351;
-- ----------------------------
-- Auto increment value for `s_region`
-- ----------------------------
ALTER TABLE `s_region` AUTO_INCREMENT=45057;
-- ----------------------------
-- Auto increment value for `s_role`
-- ----------------------------
ALTER TABLE `s_role` AUTO_INCREMENT=14;
-- ----------------------------
-- Auto increment value for `s_role_power`
-- ----------------------------
ALTER TABLE `s_role_power` AUTO_INCREMENT=2604;
-- ----------------------------
-- Auto increment value for `s_screening_price`
-- ----------------------------
ALTER TABLE `s_screening_price` AUTO_INCREMENT=32;
-- ----------------------------
-- Auto increment value for `s_search_history`
-- ----------------------------
ALTER TABLE `s_search_history` AUTO_INCREMENT=1;
-- ----------------------------
-- Auto increment value for `s_slide`
-- ----------------------------
ALTER TABLE `s_slide` AUTO_INCREMENT=14;
-- ----------------------------
-- Auto increment value for `s_user`
-- ----------------------------
ALTER TABLE `s_user` AUTO_INCREMENT=91;
-- ----------------------------
-- Auto increment value for `s_user_address`
-- ----------------------------
ALTER TABLE `s_user_address` AUTO_INCREMENT=1;
-- ----------------------------
-- Auto increment value for `s_user_integral_log`
-- ----------------------------
ALTER TABLE `s_user_integral_log` AUTO_INCREMENT=1;
```