thinkphp博客系统

-# thinkphp博客系统

mysql设计

创建管理员表tp_admin

create table tp_admin(
  id int primary key not null auto_increment comment '自增id',
  username varchar(20) not null comment '用户名',
  password varchar(20) not null comment '密码',
  nickname varchar(20) not null comment '昵称',
  email varchar(20) not null comment '邮箱',
  status enum('0','1') not null comment '0是禁用,1是可用',
  is_super enum('0','1') not null comment '0是普通管理员,1是超级管理员',
  create_time varchar(20) not null comment '创建时间',
  update_time varchar(20) not null comment '更改时间',
  delete_time varchar(20) comment '软删除'
)

创建会员表tp_member

create table tp_member(
  id int primary key not null auto_increment comment '自增id',
  username varchar(20) not null comment '用户名',
  password varchar(20) not null comment '密码',
  nickname varchar(20) not null comment '昵称',
  email varchar(20) not null comment '邮箱',
  create_time varchar(20) not null comment '注册时间',
  update_time varchar(20) not null comment '更新时间',
  delete_time varchar(20) comment '软删除'
)

创建导航表tp_cate

create table tp_cate(
  id int primary key not null auto_increment comment '自增id',
  catename varchar(20) not null comment '导航名称',
  sort int not null comment '排序',
  create_time varchar(20) not null comment '添加时间',
  updata_time varchar(20) not null comment '更新时间',
  delete_time varchar(20) comment '软删除'
)

创建文章表tp_article

create table tp_article(
  id int primary key not null auto_increment comment '自增id',
  title varchar(20) not null comment '文章标题',
  summary varchar(20) not null comment '文章概要',
  tags varchar(20) not null comment '标签',
  content varchar(20) not null comment '内容',
  is_top  enum('0','1') not null comment '0是不推荐,1是推荐',
  cate_id int not null comment '所属导航',
  create_time varchar(20) not null comment '添加时间',
  update_time varchar(20) not null comment '修改时间',
  delete_time varchar(20) not null comment '软删除'
)

delete_time应该可以为空
执行以下语句设置为可空

alter table tp_article modify delete_time varchar(20) null;

添加评论表tp_comment

create table tp_comment(
  id int not null primary key auto_increment comment '自增id',
  content varchar(20) not null comment '评论内容',
  article_id int not null comment '评论文章',
  member_id int not null comment '评论用户',
  create_time varchar(20) not null comment '评论时间',
  update_time varchar(20) not null comment '修改时间',
  delete_time varchar(20) comment '软删除'
)

添加系统设置表tp_system

create table tp_system(
  id int not null primary key auto_increment comment '自增id',
  webname varchar(20) not null comment '网站名字',
  copyright varchar(20) not null comment '版权信息',
  create_time varchar(20) not null comment '设置时间',
  update_time varchar(20) not null comment '更新时间',
  delete_time varchar(20) comment '软删除'
)
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值