CREATE TABLE `tizi_ad_positions` (
`positionld` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`position Type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '广告类型1:电脑端 2:微信端3:手机端4:App端5:小程序端',
`positionName` varchar(100) NOT NULL COMMENT '广告位置名称',
`positionWidth` int(11) NOT NULL DEFAULT '0' COMMENT '建议宽度',
`positionHeight` int(11) NOT NULL DEFAULT '0' COMMENT '建议高度',
`dataFlag` tinyint(4) NOT NULL DEFAULT '1' COMMENT '有效状态 1:有效 -1:无效',
`positionCode` varchar(20) DEFAULT NULL COMMENT '广告位置代码',
`apSort` int(11) NOT NULL COMMENT '排序号',
PRIMARY KEY (`positionld`),
KEY `position Type` (`position Type`),
KEY `adSort` (`apSort`),
CONSTRAINT `adSort` FOREIGN KEY (`apSort`) REFERENCES `tizi_ads` (`adSort`),
CONSTRAINT `position Type` FOREIGN KEY (`position Type`) REFERENCES `tizi_ads` (`positionType`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='广告位置表--tizi';
区域
CREATE TABLE `tizi_areas` (
`areald` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`parentld` int(11) NOT NULL COMMENT '父ID',
`areaName` varchar(100) NOT NULL COMMENT '地区名称',
`isShow` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否显示 0:是1:否',
`areaSort` int(11) NOT NULL DEFAULT '0' COMMENT '排序号',
`areaKey` char(10) NOT NULL COMMENT '地区首字母',
`area Type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '级别标志1:省 2:市 3:县区',
`data Flag` tinyint(4) NOT NULL DEFAULT '1' COMMENT '删除标志-1:删除1:有效',
`create Time` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`areald`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='区域表--tizi';
文章记录表
CREATE TABLE `tizi_article_cats` (
`catld` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`parentld` int(11) NOT NULL DEFAULT '0' COMMENT '父ID',
`cat Type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '分类类型0:普通类型1:系统菜单',
`is Show` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否显示0:隐藏1:显示',
`catName` varchar(20) NOT NULL COMMENT '分类名称',
`catSort` int(11) NOT NULL DEFAULT '0' COMMENT '排序号',
`dataFlag` tinyint(4) NOT NULL DEFAULT '1' COMMENT '删除标志',
`creatTime` datetime NOT NULL COMMENT '创建时间',
PRIMARY KEY (`catld`),
KEY `isShow` (`is Show`),
KEY `createTime` (`creatTime`),
KEY `catSort` (`catSort`),
CONSTRAINT `catSort` FOREIGN KEY (`catSort`) REFERENCES `tizi_articles` (`catSort`),
CONSTRAINT `createTime` FOREIGN KEY (`creatTime`) REFERENCES `tizi_articles` (`create Time`),
CONSTRAINT `isShow` FOREIGN KEY (`is Show`) REFERENCES `tizi_articles` (`isShow`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='文章分类表--tizi';
文章记录表
CREATE TABLE `tizi_articles` (
`articleld` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`catld` int(11) NOT NULL COMMENT '分类ID',
`article Title` varchar(200) NOT NULL COMMENT '文章标题',
`isShow` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否显示0:隐藏1:显示',
`article Content` longtext NOT NULL COMMENT '文章内容',
`articleKey` varchar(200) DEFAULT NULL COMMENT '关键字',
`staffld` int(11) NOT NULL COMMENT '创建者',
`dataFlag` tinyint(4) NOT NULL DEFAULT '1' COMMENT '有效状态',
`create Time` datetime NOT NULL COMMENT '创建时间',
`solve` int(10) unsigned DEFAULT '0' COMMENT '觉得文章有帮助的次数',
`unsolve` int(10) unsigned DEFAULT '0' COMMENT '觉得文章没帮助的次数',
`coverimg` varchar(150) DEFAULT NULL COMMENT '文章封面图片',
`visitorNum` int(10) unsigned DEFAULT '0' COMMENT '浏览数',
`TypeStatus` int(10) DEFAULT '1' COMMENT '布局类型1:左图右文2:左文右图3:上文下图4:全文',
`likeNum` int(10) DEFAULT '0' COMMENT '点赞数',
`catSort` int(11) DEFAULT '0' COMMENT '排序号',
`articleDesc` varchar(600) NOT NULL COMMENT '文章描述',
`isHide` tinyint(4) DEFAULT '0' COMMENT '是否隐藏不可编辑/删除的文章1:是0:否',
PRIMARY KEY (`articleld`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='文章记录表--tizi';