
/*!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 AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='收货地址表';
/*!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_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_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_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_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_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 */;
/*!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 */;

