
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
DROP TABLE IF EXISTS `yutou_address`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_address` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL COMMENT '会员ID',
  `name` varchar(50) NOT NULL COMMENT '收货人',
  `mobile` varchar(20) NOT NULL COMMENT '手机号',
  `province` varchar(50) NOT NULL COMMENT '省份',
  `city` varchar(50) NOT NULL COMMENT '城市',
  `district` varchar(50) NOT NULL COMMENT '区县',
  `address` varchar(255) NOT NULL COMMENT '详细地址',
  `is_default` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否默认：0否 1是',
  `create_time` int(11) NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='收货地址表';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_admin`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_admin` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户名',
  `password` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '密码（MD5）',
  `realname` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '真实姓名',
  `phone` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '手机号',
  `email` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '邮箱',
  `pen_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '笔名',
  `job_content` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '工作内容',
  `avatar` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '头像',
  `role_id` int(11) DEFAULT '0' COMMENT '角色ID',
  `is_enabled` tinyint(4) DEFAULT '1' COMMENT '是否启用：0禁用 1启用',
  `last_login_time` int(11) DEFAULT NULL COMMENT '最后登录时间',
  `last_login_ip` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '最后登录IP',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_ads`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_ads` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `position_id` int(11) NOT NULL COMMENT '广告位ID',
  `title` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '标题',
  `position` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `ad_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `ad_code` text COLLATE utf8mb4_unicode_ci,
  `ad_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `ad_position` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `ad_link` varchar(512) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `ads_type` tinyint(4) DEFAULT '0' COMMENT '类型：0图片 1文字 2代码 3悬浮',
  `content` text COLLATE utf8mb4_unicode_ci COMMENT '内容',
  `link` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '链接',
  `start_time` int(11) DEFAULT NULL COMMENT '开始时间',
  `end_time` int(11) DEFAULT NULL COMMENT '结束时间',
  `click_count` int(11) DEFAULT '0' COMMENT '点击次数',
  `sort_order` int(11) DEFAULT '100' COMMENT '排序',
  `is_show` tinyint(1) NOT NULL DEFAULT '1',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_ads_position`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_ads_position` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `position_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '广告位名称',
  `position_mark` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '标识',
  `width` int(11) DEFAULT NULL COMMENT '宽度',
  `height` int(11) DEFAULT NULL COMMENT '高度',
  `position_desc` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '描述',
  `sort_order` int(11) DEFAULT '100' COMMENT '排序',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_article`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_article` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `channel_id` int(11) NOT NULL COMMENT '所属栏目',
  `title` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '标题',
  `short_title` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '短标题',
  `litpic` mediumtext COLLATE utf8mb4_unicode_ci,
  `flag` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '标记：top/recommend/hot',
  `tags` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '标签',
  `source` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '来源',
  `author` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '作者',
  `summary` text COLLATE utf8mb4_unicode_ci COMMENT '摘要',
  `content` longtext COLLATE utf8mb4_unicode_ci,
  `seo_title` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SEO标题',
  `seo_keywords` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SEO关键词',
  `seo_description` text COLLATE utf8mb4_unicode_ci COMMENT 'SEO描述',
  `click` int(11) DEFAULT '0' COMMENT '点击数',
  `sort_order` int(11) DEFAULT '100' COMMENT '排序',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态：0草稿 1已发布',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  `release_time` int(11) DEFAULT NULL COMMENT '发布时间',
  `view` int(11) NOT NULL DEFAULT '0',
  `redirect_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_backup`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_backup` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `file_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '文件名',
  `file_path` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '文件路径',
  `file_size` int(11) DEFAULT NULL COMMENT '文件大小',
  `backup_type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT 'manual' COMMENT '备份类型',
  `remark` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注',
  `create_time` int(11) DEFAULT NULL COMMENT '备份时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_balance_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_balance_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL COMMENT '会员ID',
  `amount` decimal(10,2) NOT NULL COMMENT '变动金额',
  `type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '类型：recharge/consume/refund',
  `note` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注',
  `add_time` int(11) DEFAULT NULL COMMENT '变动时间',
  `balance` decimal(10,2) NOT NULL DEFAULT '0.00',
  `remark` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
  `create_time` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_cart`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_cart` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL COMMENT '会员ID',
  `product_id` int(11) NOT NULL COMMENT '产品ID',
  `quantity` int(11) NOT NULL DEFAULT '1' COMMENT '购买数量',
  `price` decimal(10,2) NOT NULL COMMENT '单价',
  `create_time` int(11) NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`),
  KEY `product_id` (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='购物车表';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_channel`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_channel` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) DEFAULT '0' COMMENT '上级栏目ID',
  `channel_name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '栏目名称',
  `channel_type` tinyint(4) DEFAULT '1' COMMENT '类型：1文章 2产品 3单页 4图集 5下载',
  `channel_dir` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '目录名称',
  `seo_title` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SEO标题',
  `seo_keywords` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SEO关键词',
  `seo_description` text COLLATE utf8mb4_unicode_ci COMMENT 'SEO描述',
  `list_template` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT 'list.html' COMMENT '列表页模板',
  `article_template` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `detail_template` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT 'article.html' COMMENT '详情页模板',
  `list_order` int(11) DEFAULT '100' COMMENT '排序',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态：0禁用 1启用',
  `is_show` tinyint(4) DEFAULT '1' COMMENT '是否显示：0隐藏 1显示',
  `is_top` tinyint(1) NOT NULL DEFAULT '0',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  `redirect_url` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '跳转链接',
  `view_level` tinyint(4) DEFAULT '0' COMMENT '浏览权限：0游客1会员2初级3中级4高级',
  `channel_thumb` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '栏目缩略图',
  `channel_intro` text COLLATE utf8mb4_unicode_ci COMMENT '栏目简介',
  `view_count` int(11) DEFAULT '0' COMMENT '栏目浏览量',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_comment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_comment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `channel_id` int(11) DEFAULT '0' COMMENT '栏目ID',
  `content_id` int(11) DEFAULT '0' COMMENT '内容ID',
  `content_type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT 'article' COMMENT '内容类型',
  `pid` int(11) DEFAULT '0' COMMENT '父评论ID',
  `name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '评论者',
  `email` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '邮箱',
  `content` text COLLATE utf8mb4_unicode_ci COMMENT '评论内容',
  `is_show` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `ip` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'IP地址',
  `is_check` tinyint(4) DEFAULT '0' COMMENT '审核状态：0待审 1通过 2拒绝',
  `check_time` int(11) DEFAULT NULL COMMENT '审核时间',
  `create_time` int(11) DEFAULT NULL COMMENT '评论时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `config_key` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '配置键',
  `config_value` text COLLATE utf8mb4_unicode_ci COMMENT '配置值',
  `config_type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT 'text' COMMENT '类型：text/textarea/select/radio/checkbox',
  `config_group` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT 'basic' COMMENT '配置分组',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `config_key` (`config_key`)
) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_contribute`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_contribute` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL COMMENT '会员ID',
  `title` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '标题',
  `channel_id` int(11) DEFAULT '0' COMMENT '栏目ID',
  `channel_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '栏目名称',
  `content_type` tinyint(4) DEFAULT '1' COMMENT '类型：1文章 2产品',
  `content` text COLLATE utf8mb4_unicode_ci COMMENT '内容',
  `description` text COLLATE utf8mb4_unicode_ci COMMENT '简介',
  `litpic` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '封面图',
  `price` decimal(10,2) DEFAULT '0.00' COMMENT '价格',
  `status` tinyint(4) DEFAULT '0' COMMENT '状态：0待审 1通过 2拒绝',
  `add_time` int(11) DEFAULT NULL COMMENT '投稿时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_custom_var`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_custom_var` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `var_name` varchar(100) NOT NULL COMMENT '变量名称',
  `var_key` varchar(50) NOT NULL COMMENT '变量标识',
  `var_type` varchar(20) NOT NULL DEFAULT 'text',
  `var_value` text NOT NULL COMMENT '变量值',
  `create_time` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_var_key` (`var_key`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='自定义变量';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_download`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_download` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `channel_id` int(11) NOT NULL COMMENT '所属栏目',
  `title` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '标题',
  `file_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '文件名',
  `file_path` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '文件路径',
  `file_size` int(11) DEFAULT NULL COMMENT '文件大小',
  `file_ext` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '文件扩展名',
  `seo_title` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SEO标题',
  `seo_keywords` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SEO关键词',
  `seo_description` text COLLATE utf8mb4_unicode_ci COMMENT 'SEO描述',
  `content` text COLLATE utf8mb4_unicode_ci,
  `down_count` int(11) DEFAULT '0' COMMENT '下载次数',
  `click` int(11) NOT NULL DEFAULT '0' COMMENT '点击量',
  `need_login` tinyint(4) DEFAULT '0' COMMENT '是否需要登录',
  `sort_order` int(11) DEFAULT '100' COMMENT '排序',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  `litpic` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
  `view` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_download_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_download_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL COMMENT '会员ID',
  `download_id` int(11) NOT NULL COMMENT '资源ID',
  `add_time` int(11) DEFAULT NULL COMMENT '下载时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_faq`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_faq` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '分类',
  `question` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '问题',
  `answer` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '回答',
  `tags` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '标签',
  `is_top` tinyint(4) DEFAULT '0' COMMENT '置顶：0否 1是',
  `click` int(11) DEFAULT '0' COMMENT '点击数',
  `sort_order` int(11) DEFAULT '100' COMMENT '排序',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态：0隐藏 1显示',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_guestbook`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_guestbook` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `channel_id` int(11) DEFAULT NULL COMMENT '所属栏目',
  `title` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '标题',
  `content` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '留言内容',
  `name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '姓名',
  `phone` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '电话',
  `email` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '邮箱',
  `company` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '公司',
  `reply` text COLLATE utf8mb4_unicode_ci COMMENT '回复内容',
  `reply_time` int(11) DEFAULT NULL COMMENT '回复时间',
  `ip` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'IP地址',
  `status` tinyint(4) DEFAULT '0' COMMENT '状态：0未回复 1已回复',
  `is_show` tinyint(4) DEFAULT '1' COMMENT '是否显示',
  `sort_order` int(11) DEFAULT '100' COMMENT '排序',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_icon`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_icon` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `channel_id` int(11) NOT NULL,
  `title` varchar(200) NOT NULL,
  `litpic` varchar(255) DEFAULT NULL,
  `file_path` varchar(255) DEFAULT NULL,
  `file_ext` varchar(10) DEFAULT NULL,
  `file_original` varchar(255) DEFAULT NULL,
  `seo_title` varchar(200) DEFAULT NULL,
  `seo_keywords` varchar(200) DEFAULT NULL,
  `seo_description` text,
  `click` int(11) DEFAULT '0',
  `sort_order` int(11) DEFAULT '100',
  `status` tinyint(4) DEFAULT '1',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_image`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_image` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `channel_id` int(11) NOT NULL COMMENT '所属栏目',
  `title` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '标题',
  `litpic` longtext COLLATE utf8mb4_unicode_ci,
  `albums` text COLLATE utf8mb4_unicode_ci COMMENT '图片JSON',
  `seo_title` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SEO标题',
  `seo_keywords` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SEO关键词',
  `seo_description` text COLLATE utf8mb4_unicode_ci COMMENT 'SEO描述',
  `content` text COLLATE utf8mb4_unicode_ci,
  `click` int(11) DEFAULT '0' COMMENT '点击数',
  `sort_order` int(11) DEFAULT '100' COMMENT '排序',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_installation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_installation` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `step` int(11) NOT NULL COMMENT '步骤序号',
  `title` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '标题',
  `content` text COLLATE utf8mb4_unicode_ci COMMENT '内容',
  `image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '配图',
  `icon` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '图标',
  `step_type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT 'step' COMMENT '类型：step/warning/tip/success',
  `sort_order` int(11) DEFAULT '100' COMMENT '排序',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_license`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_license` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_code` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '授权码',
  `license_domain` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '授权域名',
  `license_level` tinyint(4) DEFAULT '0' COMMENT '级别：0体验 1免费 2商业 3旗舰',
  `license_expire` date DEFAULT NULL COMMENT '到期日期',
  `license_status` tinyint(4) DEFAULT '1' COMMENT '状态：0失效 1有效',
  `site_id` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '站点ID',
  `bind_count` int(11) DEFAULT '0' COMMENT '绑定域名次数',
  `max_domains` int(11) DEFAULT '1' COMMENT '最大绑定数',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_link`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_link` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `link_name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '网站名称',
  `link_url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '网址',
  `link_logo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Logo',
  `link_type` tinyint(4) DEFAULT '0' COMMENT '类型：0文字 1图片',
  `target` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT '_blank' COMMENT '目标',
  `sort_order` int(11) DEFAULT '100' COMMENT '排序',
  `is_show` tinyint(1) NOT NULL DEFAULT '1',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL COMMENT '操作用户ID',
  `username` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用户名',
  `action` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '动作',
  `module` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '模块',
  `content` text COLLATE utf8mb4_unicode_ci COMMENT '详情',
  `ip` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'IP地址',
  `user_agent` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '浏览器信息',
  `create_time` int(11) DEFAULT NULL COMMENT '操作时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=538 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_member`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_member` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户名',
  `password` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '密码',
  `nickname` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '昵称',
  `email` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '邮箱',
  `phone` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '手机号',
  `avatar` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '头像',
  `group_id` int(11) DEFAULT '1' COMMENT '会员组ID',
  `points` int(11) DEFAULT '0' COMMENT '积分',
  `balance` decimal(10,2) DEFAULT '0.00' COMMENT '余额',
  `is_enabled` tinyint(4) DEFAULT '1' COMMENT '是否启用',
  `last_login_time` int(11) DEFAULT NULL COMMENT '最后登录时间',
  `last_login_ip` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '最后登录IP',
  `reg_ip` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '注册IP',
  `reg_time` int(11) DEFAULT NULL COMMENT '注册时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_member_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_member_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `group_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '组名称',
  `group_desc` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '组描述',
  `points_rate` int(11) DEFAULT '100' COMMENT '积分比率%',
  `discount_rate` decimal(4,1) DEFAULT '10.0' COMMENT '购物折扣率%',
  `is_default` tinyint(4) DEFAULT '0' COMMENT '是否默认组',
  `sort_order` int(11) DEFAULT '100' COMMENT '排序',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_member_message`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_member_message` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `from_id` int(11) DEFAULT '0' COMMENT '发送者ID',
  `from_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '发送者',
  `to_id` int(11) DEFAULT '0' COMMENT '接收者ID',
  `to_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '接收者',
  `title` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '标题',
  `content` text COLLATE utf8mb4_unicode_ci COMMENT '内容',
  `is_read` tinyint(4) DEFAULT '0' COMMENT '是否已读：0未读 1已读',
  `read_time` int(11) DEFAULT NULL COMMENT '读取时间',
  `create_time` int(11) DEFAULT NULL COMMENT '发送时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_message`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_message` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `from_id` int(11) NOT NULL DEFAULT '0',
  `from_name` varchar(64) NOT NULL DEFAULT '',
  `to_id` int(11) NOT NULL DEFAULT '0',
  `to_name` varchar(64) NOT NULL DEFAULT '',
  `title` varchar(256) NOT NULL DEFAULT '',
  `content` text,
  `is_read` tinyint(1) NOT NULL DEFAULT '0',
  `create_time` int(11) NOT NULL DEFAULT '0',
  `read_time` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `idx_to_id` (`to_id`),
  KEY `idx_is_read` (`is_read`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COMMENT='站内消息表';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_order`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_sn` varchar(32) NOT NULL COMMENT '订单编号',
  `member_id` int(11) DEFAULT '0' COMMENT '买家ID',
  `subject` varchar(255) DEFAULT '' COMMENT '订单标题',
  `consignee` varchar(64) DEFAULT '' COMMENT '收货人',
  `mobile` varchar(20) DEFAULT '' COMMENT '联系电话',
  `address` varchar(255) DEFAULT '' COMMENT '收货地址',
  `product_amount` decimal(10,2) DEFAULT '0.00' COMMENT '商品金额',
  `shipping_fee` decimal(10,2) DEFAULT '0.00' COMMENT '运费',
  `discount_amount` decimal(10,2) DEFAULT '0.00' COMMENT '优惠金额',
  `total_amount` decimal(10,2) DEFAULT '0.00' COMMENT '应付总额',
  `pay_type` tinyint(1) DEFAULT '0' COMMENT '支付方式 1=微信 2=支付宝 3=余额',
  `status` tinyint(1) DEFAULT '0' COMMENT '状态 0=待付款 1=已付款 2=已发货 3=已完成 4=售后中 5=已取消',
  `source` tinyint(1) DEFAULT '1' COMMENT '来源 1=PC 2=H5 3=小程序 4=APP',
  `remark` varchar(500) DEFAULT '' COMMENT '订单备注',
  `ship_no` varchar(64) DEFAULT '' COMMENT '快递单号',
  `pay_time` int(11) DEFAULT '0' COMMENT '支付时间',
  `ship_time` int(11) DEFAULT '0' COMMENT '发货时间',
  `complete_time` int(11) DEFAULT '0' COMMENT '完成时间',
  `create_time` int(11) DEFAULT '0' COMMENT '创建时间',
  `total_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '订单总金额',
  `pay_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '实付金额',
  `delivery_time` int(11) DEFAULT '0' COMMENT '发货时间',
  `finish_time` int(11) DEFAULT '0' COMMENT '完成时间',
  `express_no` varchar(64) DEFAULT '' COMMENT '快递单号',
  `express_company` varchar(64) DEFAULT '' COMMENT '快递公司',
  `name` varchar(50) DEFAULT '' COMMENT '收货人',
  `update_time` int(11) DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_order_sn` (`order_sn`),
  KEY `idx_member_id` (`member_id`),
  KEY `idx_status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COMMENT='产品订单表';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_order_product`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_order_product` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) DEFAULT '0' COMMENT '订单ID',
  `product_id` int(11) DEFAULT '0' COMMENT '商品ID',
  `product_title` varchar(255) DEFAULT '' COMMENT '商品名称',
  `specs` varchar(255) DEFAULT '' COMMENT '规格',
  `litpic` varchar(255) DEFAULT '' COMMENT '图片',
  `quantity` int(11) DEFAULT '1' COMMENT '数量',
  `price` decimal(10,2) DEFAULT '0.00' COMMENT '单价',
  `product_name` varchar(200) DEFAULT '' COMMENT '商品名称',
  `product_image` varchar(255) DEFAULT '' COMMENT '商品图片',
  `total_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '小计金额',
  PRIMARY KEY (`id`),
  KEY `idx_order_id` (`order_id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COMMENT='订单商品表';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_page`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_page` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `channel_id` int(11) DEFAULT NULL COMMENT '关联栏目ID',
  `page_title` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '页面标题',
  `page_content` text COLLATE utf8mb4_unicode_ci COMMENT '页面内容',
  `status` tinyint(4) NOT NULL DEFAULT '1',
  `seo_title` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SEO标题',
  `seo_keywords` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SEO关键词',
  `seo_description` text COLLATE utf8mb4_unicode_ci COMMENT 'SEO描述',
  `template` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT 'page.html' COMMENT '模板',
  `is_system` tinyint(4) DEFAULT '0' COMMENT '是否系统预置',
  `sort_order` int(11) DEFAULT '100' COMMENT '排序',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  `view` int(11) NOT NULL DEFAULT '0',
  `litpic` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_pay_order`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_pay_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_sn` varchar(32) NOT NULL COMMENT '订单编号',
  `user_id` int(11) DEFAULT '0' COMMENT '用户ID',
  `subject` varchar(255) DEFAULT '' COMMENT '订单标题',
  `body` text COMMENT '订单描述',
  `amount` decimal(10,2) DEFAULT '0.00' COMMENT '支付金额',
  `pay_type` tinyint(1) DEFAULT '1' COMMENT '支付方式 1=微信 2=支付宝',
  `status` tinyint(1) DEFAULT '0' COMMENT '状态 0=待支付 1=已支付 2=已退款 -1=已关闭',
  `transaction_id` varchar(64) DEFAULT '' COMMENT '第三方交易号',
  `return_url` varchar(255) DEFAULT '' COMMENT '支付成功跳转URL',
  `notify_data` text COMMENT '回调数据',
  `pay_time` int(11) DEFAULT '0' COMMENT '支付时间',
  `create_time` int(11) DEFAULT '0' COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_order_sn` (`order_sn`),
  KEY `idx_user_id` (`user_id`),
  KEY `idx_status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='支付订单表';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_product`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_product` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `channel_id` int(11) NOT NULL COMMENT '所属栏目',
  `title` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '产品名称',
  `product_code` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '产品编号',
  `litpic` longtext COLLATE utf8mb4_unicode_ci,
  `pictures` text COLLATE utf8mb4_unicode_ci COMMENT '多图JSON',
  `flag` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '标记',
  `tags` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '标签',
  `summary` text COLLATE utf8mb4_unicode_ci COMMENT '摘要',
  `content` longtext COLLATE utf8mb4_unicode_ci,
  `seo_title` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SEO标题',
  `seo_keywords` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SEO关键词',
  `seo_description` text COLLATE utf8mb4_unicode_ci COMMENT 'SEO描述',
  `price` decimal(10,2) DEFAULT '0.00' COMMENT '价格',
  `market_price` decimal(10,2) DEFAULT '0.00' COMMENT '市场价',
  `cost_price` decimal(10,2) DEFAULT '0.00' COMMENT '成本价',
  `unit` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT '个' COMMENT '单位',
  `stock` int(11) DEFAULT '999' COMMENT '库存',
  `specs` text COLLATE utf8mb4_unicode_ci COMMENT '规格JSON',
  `attrs` text COLLATE utf8mb4_unicode_ci COMMENT '属性JSON',
  `click` int(11) DEFAULT '0' COMMENT '点击数',
  `sort_order` int(11) DEFAULT '100' COMMENT '排序',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态：0下架 1上架',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  `redirect_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
  `weight` decimal(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_recharge`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_recharge` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL COMMENT '会员ID',
  `amount` decimal(10,2) NOT NULL COMMENT '充值金额',
  `pay_type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '支付方式',
  `trade_no` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '交易单号',
  `status` tinyint(4) DEFAULT '0' COMMENT '状态：0待支付 1已充值',
  `add_time` int(11) DEFAULT NULL COMMENT '充值时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_recruit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_recruit` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `channel_id` int(11) NOT NULL,
  `title` varchar(200) NOT NULL,
  `department` varchar(100) DEFAULT NULL,
  `region` varchar(100) DEFAULT NULL,
  `salary` varchar(50) DEFAULT NULL,
  `quantity` int(11) DEFAULT '1',
  `experience` varchar(50) DEFAULT NULL,
  `education` varchar(50) DEFAULT NULL,
  `work_type` varchar(20) DEFAULT '全职',
  `summary` text,
  `content` text NOT NULL,
  `seo_title` varchar(200) DEFAULT NULL,
  `seo_keywords` varchar(200) DEFAULT NULL,
  `seo_description` text,
  `click` int(11) DEFAULT '0',
  `apply_count` int(11) DEFAULT '0',
  `sort_order` int(11) DEFAULT '100',
  `status` tinyint(4) DEFAULT '1',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `litpic` varchar(255) DEFAULT '',
  `view` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_role`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `role_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '角色名称',
  `role_desc` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '角色描述',
  `permissions` text COLLATE utf8mb4_unicode_ci COMMENT '权限JSON',
  `is_default` tinyint(4) DEFAULT '0' COMMENT '是否默认角色',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_search`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_search` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `keywords` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '搜索词',
  `result_count` int(11) DEFAULT '0' COMMENT '结果数',
  `ip` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'IP地址',
  `create_time` int(11) DEFAULT NULL COMMENT '搜索时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_slide`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_slide` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `group_id` int(11) DEFAULT '1' COMMENT '分组ID',
  `title` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '标题',
  `litpic` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '图片',
  `link` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '链接地址',
  `target` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT '_self' COMMENT '链接目标',
  `sort_order` int(11) DEFAULT '100' COMMENT '排序',
  `is_show` tinyint(1) NOT NULL DEFAULT '1',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_slide_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_slide_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `group_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '分组名称',
  `group_desc` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '分组描述',
  `sort_order` int(11) DEFAULT '100' COMMENT '排序',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_tag`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_tag` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tag_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '标签名',
  `tag_alias` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '别名',
  `click` int(11) DEFAULT '0' COMMENT '点击数',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_template`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_template` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `template_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '模板名称',
  `template_dir` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '模板目录',
  `template_type` tinyint(4) DEFAULT '1' COMMENT '类型：1免费 2授权',
  `thumb` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '缩略图',
  `author` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '作者',
  `version` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '版本',
  `description` text COLLATE utf8mb4_unicode_ci COMMENT '描述',
  `is_used` tinyint(4) DEFAULT '0' COMMENT '是否当前使用',
  `sort_order` int(11) DEFAULT '100' COMMENT '排序',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `template_dir` (`template_dir`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_template_showcase`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_template_showcase` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '模板名称',
  `subtitle` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '副标题/简介',
  `thumb` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '缩略图',
  `images` text COLLATE utf8mb4_unicode_ci COMMENT '多张图片JSON',
  `template_dir` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '关联模板目录',
  `template_type` tinyint(4) DEFAULT '1' COMMENT '类型：1免费 2授权',
  `author` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '作者',
  `version` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '版本',
  `demo_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '演示地址',
  `download_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '下载/购买地址',
  `description` text COLLATE utf8mb4_unicode_ci COMMENT '详细介绍',
  `seo_title` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SEO标题',
  `seo_keywords` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SEO关键词',
  `seo_description` text COLLATE utf8mb4_unicode_ci COMMENT 'SEO描述',
  `click` int(11) DEFAULT '0' COMMENT '点击数',
  `collect_count` int(11) DEFAULT '0' COMMENT '收藏数',
  `use_count` int(11) DEFAULT '0' COMMENT '使用数',
  `sort_order` int(11) DEFAULT '100' COMMENT '排序',
  `is_recommend` tinyint(4) DEFAULT '0' COMMENT '推荐：0否 1是',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态：0下架 1上架',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_video`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_video` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `channel_id` int(11) NOT NULL,
  `title` varchar(200) NOT NULL,
  `litpic` varchar(255) DEFAULT NULL,
  `video_path` varchar(255) DEFAULT NULL,
  `video_duration` int(11) DEFAULT '0',
  `video_cover` varchar(255) DEFAULT NULL,
  `seo_title` varchar(200) DEFAULT NULL,
  `seo_keywords` varchar(200) DEFAULT NULL,
  `seo_description` text,
  `content` text,
  `click` int(11) DEFAULT '0',
  `sort_order` int(11) DEFAULT '100',
  `status` tinyint(4) DEFAULT '1',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `view` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_vote`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_vote` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vote_title` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '投票标题',
  `vote_type` tinyint(4) DEFAULT '1' COMMENT '类型：1单选 2多选',
  `vote_options` text COLLATE utf8mb4_unicode_ci COMMENT '选项JSON',
  `start_time` int(11) DEFAULT NULL COMMENT '开始时间',
  `end_time` int(11) DEFAULT NULL COMMENT '结束时间',
  `is_enabled` tinyint(4) DEFAULT '1' COMMENT '是否启用',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `yutou_vote_option`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `yutou_vote_option` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vote_id` int(11) DEFAULT '0' COMMENT '投票ID',
  `option_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '选项名称',
  `option_count` int(11) DEFAULT '0' COMMENT '投票数',
  `sort_order` int(11) DEFAULT '100' COMMENT '排序',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

