标签:innodb pass table systems lse serve name value 上线
java建站系统开发教程系列之设计表结构
根据需求设计表结构如下:
SET FOREIGN_KEY_CHECKS=0;
-- Table structure for tbl_articles
-- ----------------------------
DROP TABLE IF EXISTS tbl_articles
;
CREATE TABLE tbl_articles
(
id
int(11) NOT NULL AUTO_INCREMENT,
cid
int(11) DEFAULT NULL COMMENT ‘文章分类id‘,
title
varchar(255) DEFAULT NULL,
user
varchar(255) DEFAULT NULL,
state
int(11) DEFAULT ‘1‘ COMMENT ‘0上线 1待审核 ‘,
top
int(11) DEFAULT ‘0‘ COMMENT ‘0 默认 1置顶‘,
pageview
int(11) DEFAULT NULL,
imgurl
varchar(255) DEFAULT NULL,
content
varchar(5000) DEFAULT NULL,
keywords
varchar(255) DEFAULT NULL,
description
varchar(255) DEFAULT NULL,
create_time
timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8;
-- Table structure for tbl_banner
-- ----------------------------
DROP TABLE IF EXISTS tbl_banner
;
CREATE TABLE tbl_banner
(
id
int(11) NOT NULL AUTO_INCREMENT,
title
varchar(255) DEFAULT NULL,
imgurl
varchar(255) DEFAULT NULL,
link
varchar(255) DEFAULT NULL,
seq
int(11) DEFAULT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
-- Table structure for tbl_category
-- ----------------------------
DROP TABLE IF EXISTS tbl_category
;
CREATE TABLE tbl_category
(
id
int(11) NOT NULL AUTO_INCREMENT,
pid
int(11) DEFAULT NULL,
type
int(11) DEFAULT NULL COMMENT ‘0栏目 1文章‘,
name
varchar(255) DEFAULT NULL,
title
varchar(255) DEFAULT NULL,
description
varchar(255) DEFAULT NULL,
keywords
varchar(255) DEFAULT NULL,
link
varchar(255) DEFAULT NULL,
seq
int(11) DEFAULT NULL,
top
int(11) DEFAULT 0,
create_time
timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8;
-- Table structure for tbl_friendslink
-- ----------------------------
DROP TABLE IF EXISTS tbl_friendslink
;
CREATE TABLE tbl_friendslink
(
id
int(11) NOT NULL AUTO_INCREMENT,
name
varchar(255) DEFAULT NULL,
link
varchar(255) DEFAULT NULL,
type
int(11) DEFAULT NULL COMMENT ‘0首页 1栏目‘,
seq
int(11) DEFAULT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8;
-- Table structure for tbl_innerlink
-- ----------------------------
DROP TABLE IF EXISTS tbl_innerlink
;
CREATE TABLE tbl_innerlink
(
id
int(11) NOT NULL AUTO_INCREMENT,
name
varchar(255) DEFAULT NULL,
link
varchar(255) DEFAULT NULL,
seq
int(11) DEFAULT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8;
-- Table structure for tbl_systemsettings
-- ----------------------------
DROP TABLE IF EXISTS tbl_systemsettings
;
CREATE TABLE tbl_systemsettings
(
id
int(11) NOT NULL AUTO_INCREMENT,
webname
varchar(255) DEFAULT NULL,
domainname
varchar(255) DEFAULT NULL,
logo
varchar(255) DEFAULT NULL,
qrcode
varchar(255) DEFAULT NULL,
aboutus
varchar(255) DEFAULT NULL,
copyright
varchar(255) DEFAULT NULL,
storepic
varchar(255) DEFAULT NULL,
title
varchar(255) DEFAULT NULL,
description
varchar(255) DEFAULT NULL,
keywords
varchar(255) DEFAULT NULL,
pagesize
int(11) DEFAULT NULL,
newarticlecount
int(11) DEFAULT NULL,
randomnews
int(11) DEFAULT NULL,
catecount
int(11) DEFAULT NULL,
templatename
varchar(255) DEFAULT NULL,
absolutepathflag
varchar(255) DEFAULT NULL,
metavalidate
varchar(255) DEFAULT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- Table structure for tbl_tags
-- ----------------------------
DROP TABLE IF EXISTS tbl_tags
;
CREATE TABLE tbl_tags
(
id
int(11) NOT NULL AUTO_INCREMENT,
cateid
int(11) DEFAULT NULL,
name
varchar(255) DEFAULT NULL,
link
varchar(255) DEFAULT NULL,
seq
varchar(255) DEFAULT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS tbl_juhes
;
CREATE TABLE tbl_juhes
(
id
int(11) NOT NULL AUTO_INCREMENT,
title
varchar(255) DEFAULT NULL,
articleids
varchar(255) DEFAULT NULL,
keywords
varchar(255) DEFAULT NULL,
description
varchar(512) DEFAULT NULL,
create_time
timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
-- Table structure for tbl_user
-- ----------------------------
DROP TABLE IF EXISTS tbl_user
;
CREATE TABLE tbl_user
(
id
int(11) NOT NULL AUTO_INCREMENT,
loginname
varchar(255) DEFAULT NULL,
password
varchar(255) DEFAULT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-----初始化数据
INSERT INTO tbl_user
(id
, loginname
, password
) VALUES (‘1‘, ‘admin‘, ‘B4B8DAF4B8EA9D39568719E1E320076F‘);
INSERT INTO tbl_systemsettings
VALUES (‘2‘, ‘无聊网站建设‘, ‘http://jianzhan.wuliaokankan.cn‘, ‘/image/201807/65822811F52B76DC4BDF04D6E8367FAB.png‘, ‘/image/201807/5CD1497EDBC94B53EDC440F8E9CD2D3.jpg‘, ‘关注作者,随时来互动!‘, ‘Copyright ? 2017-2019 无聊建站 All Rights Reserved 浙ICP备16042040号-2 ‘, ‘/image/201807/3816B095BF05ECD5301FD5154CCC4114.jpg‘, ‘java建站系统_无聊建站‘, ‘无聊建站专注于网站建设、网站优化,拥有自主研发的免费建站系统可快速自主建站,使用java建站系统搭建网站更安全、更高效!‘, ‘免费建站系统,自助建站,java建站系统,‘, 10, 8, 5, 8, ‘skin‘,‘false‘,null);
标签:innodb pass table systems lse serve name value 上线
原文地址:https://www.cnblogs.com/wuliaojava/p/11118966.html