专辑信息表 album
albumId 专辑id int(5)
albumName 专辑名称 varchar(30)
albumCreateTime 创建时间 timestamp
albumStatus 专辑状态 int(1)
albumCover 专辑封面 varchar(40)
albumDescription 专辑描述 varchar(180)
works 作品的集合 外键到作品表 workid
=================================================
基本配置表 basicconfiguration
配置信息id basicConfigurationId int(5)
网站关闭状态 webSiteClose int(1)
网站关闭原因 closeWebSiteReason varchar(100)
网站名称 webSiteName varchar(30)
网站url webSiteUrl varchar(50)
文件名称 indexFileName varchar(100)
===============================
动态信息表 dynamic
动态编号 dynamicId int(8)
动态图片 dynamicImg varchar(180)
动态的日期 dynamicDate timestamp
动态内容 dynamicContent text
动态标题 dynamicTitle varchar(50)
============================================
小屋信息表 house
小屋编号 houseId int(5)
小屋创建日期 houseCreateTime timestamp
小屋状态 houseStatus int(1)
小屋的封面头像url houseImgsrc varchar(140)
小屋的描述 houseDescription varchar(280)
=======================================
留言信息表 leavemessage
留言编号 leaveMessageId int(8)
留言者 leaveMessageName varchar(50)
留言的日期 leaveMessageDate timestamp
留言内容 leaveMessageContent text
留言者的头像 leaveHeadPhoto varchar(240)
============================================================================
留言回复信息表 leavemessagereply
留言回复编号 leaveMessageReplyId int(8)
回复留言者 leaveMessageReplyName varchar(50)
回复留言的日期 leaveMessageReplyDate timestamp
回复留言内容 leaveMessageReplyContent text
被回复的留言 leaveMessage leaveMessageId
==============================================================
用户信息表 user
用户编号 userId int(5)
用户名 userName varchar(50)
用户密码 passWord varchar(30)
用户的权限 1为管理员0为普通用户 power int(1)
帐号是否被封 1为被封 0为没有被封 isClosed int(1)
1为禁止评论 0为不禁止评论 noComments int(1)
1为禁止点赞 0为不禁止 noPraise int (1)
用户的详细信息 userDetails userDetailsId
=================================================================================
用户详细信息表 userdetails
用户详细信息编号 userDetailsId int(5)
性别 sex varchar(2)
邮件 email varchar(100)
手机 phone varchar(11)
地址 address varchar(300)
年龄 age int(3)
腾序QQ qq varchar(18)
用户自我介绍 introduce text
用户头像 headPhoto varchar(240)
==========================================================
作品信息类 works
作品id
workId int(8)
作品名称 workName varchar(50)
作品上传日期 workUploadDate timestamp
被赞次数 workPraiseCount int(8)
作品描述 workDescription varchar(240)
作品地址 workSrc varchar(120)
作品类型 workType varchar(20)
所属专辑 album albumId
alter table leavemessagereply
drop
foreign key FKFCA2F37AC1912799
alter table userdetails
drop
foreign key FKE7A23C17E3E7456F
alter table works
drop
foreign key FK6C11B82EC8F74A1
drop table if exists album
drop table if exists basicconfiguration
drop table if exists dynamic
drop table if exists house
drop table if exists leavemessage
drop table if exists leavemessagereply
drop table if exists user
drop table if exists userdetails
drop table if exists works
create table album (
albumId integer not null auto_increment,
albumCover varchar(255),
albumCreateTime datetime,
albumDescription varchar(255),
albumName varchar(255),
albumStatus integer,
primary key (albumId)
)
create table basicconfiguration (
basicConfigurationId integer not null auto_increment,
closeWebSiteReason varchar(255),
indexFileName varchar(255),
webSiteClose integer,
webSiteName varchar(255),
webSiteUrl varchar(255),
primary key (basicConfigurationId)
)
create table dynamic (
dynamicId integer not null auto_increment,
dynamicContent longtext,
dynamicDate datetime,
dynamicImg varchar(255),
dynamicTitle varchar(255),
primary key (dynamicId)
)
create table house (
houseId integer not null auto_increment,
houseCreateTime datetime,
houseDescription varchar(255),
houseImgsrc varchar(255),
houseStatus integer,
primary key (houseId)
)
create table leavemessage (
leaveMessageId integer not null auto_increment,
leaveHeadPhoto varchar(255),
leaveMessageContent longtext,
leaveMessageDate datetime,
leaveMessageName varchar(255),
primary key (leaveMessageId)
)
create table leavemessagereply (
leaveMessageReplyId integer not null auto_increment,
leaveMessageReplyContent longtext,
leaveMessageReplyDate datetime,
leaveMessageReplyName varchar(255),
LeaveMessage integer unique,
primary key (leaveMessageReplyId)
)
create table user (
userId integer not null auto_increment,
isClosed integer,
noComments integer,
noPraise integer,
passWord varchar(255),
power integer,
userName varchar(255) unique,
primary key (userId)
)
create table userdetails (
userDetailsId integer not null auto_increment,
address varchar(255),
age integer,
email varchar(255),
headPhoto varchar(255),
introduce varchar(255),
phone varchar(255),
qq varchar(255),
sex varchar(255),
User integer unique,
primary key (userDetailsId)
)
create table works (
workId integer not null auto_increment,
workDescription varchar(255),
workName varchar(255),
workPraiseCount bigint,
workSrc varchar(255),
workType varchar(255),
workUploadDate datetime,
album_Id integer,
primary key (workId)
)
alter table leavemessagereply
add index FKFCA2F37AC1912799 (LeaveMessage),
add constraint FKFCA2F37AC1912799
foreign key (LeaveMessage)
references leavemessage (leaveMessageId)
alter table userdetails
add index FKE7A23C17E3E7456F (User),
add constraint FKE7A23C17E3E7456F
foreign key (User)
references user (userId)
alter table works
add index FK6C11B82EC8F74A1 (album_Id),
add constraint FK6C11B82EC8F74A1
foreign key (album_Id)
references album (albumId)