更新数据库模型
This commit is contained in:
parent
4211e1f648
commit
94f78f9164
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?PowerDesigner AppLocale="UTF16" ID="{22E867D0-73E2-4C77-BB68-28135519D681}" Label="" LastModificationDate="1478153577" Name="zheng" Objects="195" Symbols="19" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
|
||||
<?PowerDesigner AppLocale="UTF16" ID="{22E867D0-73E2-4C77-BB68-28135519D681}" Label="" LastModificationDate="1478153815" Name="zheng" Objects="195" Symbols="19" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
|
||||
<!-- do not edit this file -->
|
||||
|
||||
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
|
||||
|
@ -12,7 +12,7 @@
|
|||
<a:Code>zheng</a:Code>
|
||||
<a:CreationDate>1478091682</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478153486</a:ModificationDate>
|
||||
<a:ModificationDate>1478153741</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:PackageOptionsText>[FolderOptions]
|
||||
|
||||
|
@ -87,7 +87,7 @@ GenScriptName6=
|
|||
GenScriptName7=
|
||||
GenScriptName8=
|
||||
GenScriptName9=
|
||||
GenPathName=C:\Users\shuzheng\Desktop\
|
||||
GenPathName=C:\Users\admin\Desktop\
|
||||
GenSingleFile=Yes
|
||||
GenODBC=No
|
||||
GenCheckModel=Yes
|
||||
|
@ -4569,12 +4569,12 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
<c:Tables>
|
||||
<o:Table Id="o34">
|
||||
<a:ObjectID>E44EC95B-C39E-4250-9105-F687FD1FDEDD</a:ObjectID>
|
||||
<a:Name>book 书</a:Name>
|
||||
<a:Code>book</a:Code>
|
||||
<a:Name>test_book 书</a:Name>
|
||||
<a:Code>test_book</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478094599</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153649</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:PhysicalOptions>ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8mb4 COMMENT='用户书籍表'</a:PhysicalOptions>
|
||||
<a:TotalSavingCurrency/>
|
||||
<c:Columns>
|
||||
|
@ -4963,8 +4963,9 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
<a:Code>article_category_id</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478093381</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153815</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:Comment>编号</a:Comment>
|
||||
<a:DataType>int(10)</a:DataType>
|
||||
<a:Length>10</a:Length>
|
||||
<a:Identity>1</a:Identity>
|
||||
|
@ -4979,8 +4980,9 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
<a:Code>article_id</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478093381</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153815</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:Comment>文章编号</a:Comment>
|
||||
<a:DataType>int(10)</a:DataType>
|
||||
<a:Length>10</a:Length>
|
||||
<a:Column.Mandatory>1</a:Column.Mandatory>
|
||||
|
@ -4994,8 +4996,9 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
<a:Code>category_id</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478093381</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153815</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:Comment>类目编号</a:Comment>
|
||||
<a:DataType>int(10)</a:DataType>
|
||||
<a:Length>10</a:Length>
|
||||
<a:Column.Mandatory>1</a:Column.Mandatory>
|
||||
|
@ -5829,12 +5832,12 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
</o:Table>
|
||||
<o:Table Id="o42">
|
||||
<a:ObjectID>82A32332-0F7E-41C0-91D3-8E359F5EA2F6</a:ObjectID>
|
||||
<a:Name>user 用户</a:Name>
|
||||
<a:Code>user</a:Code>
|
||||
<a:Name>test_user 用户</a:Name>
|
||||
<a:Code>test_user</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478093309</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153656</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:PhysicalOptions>ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 COMMENT='用户表'</a:PhysicalOptions>
|
||||
<a:TotalSavingCurrency/>
|
||||
<c:Columns>
|
||||
|
@ -5844,8 +5847,9 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
<a:Code>user_id</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478095542</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153796</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:Comment>编号</a:Comment>
|
||||
<a:DataType>int(10)</a:DataType>
|
||||
<a:Length>10</a:Length>
|
||||
<a:Identity>1</a:Identity>
|
||||
|
@ -5860,8 +5864,9 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
<a:Code>username</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478093337</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153796</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:Comment>账号</a:Comment>
|
||||
<a:DefaultValue>NULL</a:DefaultValue>
|
||||
<a:DataType>varchar(32)</a:DataType>
|
||||
<a:Length>32</a:Length>
|
||||
|
@ -5872,8 +5877,9 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
<a:Code>password</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478093337</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153796</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:Comment>密码</a:Comment>
|
||||
<a:DefaultValue>NULL</a:DefaultValue>
|
||||
<a:DataType>varchar(32)</a:DataType>
|
||||
<a:Length>32</a:Length>
|
||||
|
@ -5884,8 +5890,9 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
<a:Code>nickname</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478093337</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153796</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:Comment>昵称</a:Comment>
|
||||
<a:DefaultValue>NULL</a:DefaultValue>
|
||||
<a:DataType>varchar(32)</a:DataType>
|
||||
<a:Length>32</a:Length>
|
||||
|
@ -5909,8 +5916,9 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
<a:Code>ctime</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478093337</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153796</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:Comment>创建时间</a:Comment>
|
||||
<a:DefaultValue>NULL</a:DefaultValue>
|
||||
<a:DataType>bigint(20)</a:DataType>
|
||||
<a:Length>20</a:Length>
|
||||
|
@ -5921,8 +5929,9 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
<a:Code>content</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478093337</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153796</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:Comment>备注</a:Comment>
|
||||
<a:DataType>text</a:DataType>
|
||||
</o:Column>
|
||||
</c:Columns>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?PowerDesigner AppLocale="UTF16" ID="{22E867D0-73E2-4C77-BB68-28135519D681}" Label="" LastModificationDate="1478153577" Name="zheng" Objects="195" Symbols="19" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
|
||||
<?PowerDesigner AppLocale="UTF16" ID="{22E867D0-73E2-4C77-BB68-28135519D681}" Label="" LastModificationDate="1478153815" Name="zheng" Objects="195" Symbols="19" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
|
||||
<!-- do not edit this file -->
|
||||
|
||||
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
|
||||
|
@ -12,7 +12,7 @@
|
|||
<a:Code>zheng</a:Code>
|
||||
<a:CreationDate>1478091682</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478153486</a:ModificationDate>
|
||||
<a:ModificationDate>1478153741</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:PackageOptionsText>[FolderOptions]
|
||||
|
||||
|
@ -87,7 +87,7 @@ GenScriptName6=
|
|||
GenScriptName7=
|
||||
GenScriptName8=
|
||||
GenScriptName9=
|
||||
GenPathName=C:\Users\shuzheng\Desktop\
|
||||
GenPathName=C:\Users\admin\Desktop\
|
||||
GenSingleFile=Yes
|
||||
GenODBC=No
|
||||
GenCheckModel=Yes
|
||||
|
@ -4569,12 +4569,12 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
<c:Tables>
|
||||
<o:Table Id="o34">
|
||||
<a:ObjectID>E44EC95B-C39E-4250-9105-F687FD1FDEDD</a:ObjectID>
|
||||
<a:Name>book 书</a:Name>
|
||||
<a:Code>book</a:Code>
|
||||
<a:Name>test_book 书</a:Name>
|
||||
<a:Code>test_book</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478094599</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153649</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:PhysicalOptions>ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8mb4 COMMENT='用户书籍表'</a:PhysicalOptions>
|
||||
<a:TotalSavingCurrency/>
|
||||
<c:Columns>
|
||||
|
@ -4963,8 +4963,9 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
<a:Code>article_category_id</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478093381</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153815</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:Comment>编号</a:Comment>
|
||||
<a:DataType>int(10)</a:DataType>
|
||||
<a:Length>10</a:Length>
|
||||
<a:Identity>1</a:Identity>
|
||||
|
@ -4979,8 +4980,9 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
<a:Code>article_id</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478093381</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153815</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:Comment>文章编号</a:Comment>
|
||||
<a:DataType>int(10)</a:DataType>
|
||||
<a:Length>10</a:Length>
|
||||
<a:Column.Mandatory>1</a:Column.Mandatory>
|
||||
|
@ -4994,8 +4996,9 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
<a:Code>category_id</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478093381</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153815</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:Comment>类目编号</a:Comment>
|
||||
<a:DataType>int(10)</a:DataType>
|
||||
<a:Length>10</a:Length>
|
||||
<a:Column.Mandatory>1</a:Column.Mandatory>
|
||||
|
@ -5829,12 +5832,12 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
</o:Table>
|
||||
<o:Table Id="o42">
|
||||
<a:ObjectID>82A32332-0F7E-41C0-91D3-8E359F5EA2F6</a:ObjectID>
|
||||
<a:Name>user 用户</a:Name>
|
||||
<a:Code>user</a:Code>
|
||||
<a:Name>test_user 用户</a:Name>
|
||||
<a:Code>test_user</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478093309</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153656</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:PhysicalOptions>ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 COMMENT='用户表'</a:PhysicalOptions>
|
||||
<a:TotalSavingCurrency/>
|
||||
<c:Columns>
|
||||
|
@ -5844,8 +5847,9 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
<a:Code>user_id</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478095542</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153796</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:Comment>编号</a:Comment>
|
||||
<a:DataType>int(10)</a:DataType>
|
||||
<a:Length>10</a:Length>
|
||||
<a:Identity>1</a:Identity>
|
||||
|
@ -5860,8 +5864,9 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
<a:Code>username</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478093337</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153796</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:Comment>账号</a:Comment>
|
||||
<a:DefaultValue>NULL</a:DefaultValue>
|
||||
<a:DataType>varchar(32)</a:DataType>
|
||||
<a:Length>32</a:Length>
|
||||
|
@ -5872,8 +5877,9 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
<a:Code>password</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478093337</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153796</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:Comment>密码</a:Comment>
|
||||
<a:DefaultValue>NULL</a:DefaultValue>
|
||||
<a:DataType>varchar(32)</a:DataType>
|
||||
<a:Length>32</a:Length>
|
||||
|
@ -5884,8 +5890,9 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
<a:Code>nickname</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478093337</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153796</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:Comment>昵称</a:Comment>
|
||||
<a:DefaultValue>NULL</a:DefaultValue>
|
||||
<a:DataType>varchar(32)</a:DataType>
|
||||
<a:Length>32</a:Length>
|
||||
|
@ -5909,8 +5916,9 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
<a:Code>ctime</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478093337</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153796</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:Comment>创建时间</a:Comment>
|
||||
<a:DefaultValue>NULL</a:DefaultValue>
|
||||
<a:DataType>bigint(20)</a:DataType>
|
||||
<a:Length>20</a:Length>
|
||||
|
@ -5921,8 +5929,9 @@ LABL 0 新宋体,8,N</a:FontList>
|
|||
<a:Code>content</a:Code>
|
||||
<a:CreationDate>1478091704</a:CreationDate>
|
||||
<a:Creator>shuzheng</a:Creator>
|
||||
<a:ModificationDate>1478093337</a:ModificationDate>
|
||||
<a:Modifier>shuzheng</a:Modifier>
|
||||
<a:ModificationDate>1478153796</a:ModificationDate>
|
||||
<a:Modifier>admin</a:Modifier>
|
||||
<a:Comment>备注</a:Comment>
|
||||
<a:DataType>text</a:DataType>
|
||||
</o:Column>
|
||||
</c:Columns>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 162 KiB |
|
@ -1,11 +1,9 @@
|
|||
/*==============================================================*/
|
||||
/* DBMS name: MySQL 5.0 */
|
||||
/* Created on: 2016/11/2 22:31:07 */
|
||||
/* Created on: 2016/11/3 14:17:39 */
|
||||
/*==============================================================*/
|
||||
|
||||
|
||||
drop table if exists book;
|
||||
|
||||
drop table if exists cms_article;
|
||||
|
||||
drop table if exists cms_article_category;
|
||||
|
@ -20,22 +18,9 @@ drop table if exists cms_comment;
|
|||
|
||||
drop table if exists cms_tag;
|
||||
|
||||
drop table if exists user;
|
||||
drop table if exists test_book;
|
||||
|
||||
/*==============================================================*/
|
||||
/* Table: book */
|
||||
/*==============================================================*/
|
||||
create table book
|
||||
(
|
||||
book_id int(10) unsigned not null auto_increment comment '编号',
|
||||
user_id int(10) unsigned not null comment '用户编号',
|
||||
name varchar(45) not null comment '书名',
|
||||
primary key (book_id),
|
||||
key FK_book_1 (user_id)
|
||||
)
|
||||
ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8mb4 COMMENT='用户书籍表';
|
||||
|
||||
alter table book comment 'book 书';
|
||||
drop table if exists test_user;
|
||||
|
||||
/*==============================================================*/
|
||||
/* Table: cms_article */
|
||||
|
@ -71,9 +56,9 @@ alter table cms_article comment 'cms_article 文章表';
|
|||
/*==============================================================*/
|
||||
create table cms_article_category
|
||||
(
|
||||
article_category_id int(10) unsigned not null auto_increment,
|
||||
article_id int(10) unsigned not null,
|
||||
category_id int(10) unsigned not null,
|
||||
article_category_id int(10) unsigned not null auto_increment comment '编号',
|
||||
article_id int(10) unsigned not null comment '文章编号',
|
||||
category_id int(10) unsigned not null comment '类目编号',
|
||||
primary key (article_category_id),
|
||||
key cms_article_category_article_id (article_id),
|
||||
key cms_article_category_category_id (category_id)
|
||||
|
@ -182,25 +167,37 @@ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='标签表';
|
|||
alter table cms_tag comment 'cms_tag 标签表';
|
||||
|
||||
/*==============================================================*/
|
||||
/* Table: user */
|
||||
/* Table: test_book */
|
||||
/*==============================================================*/
|
||||
create table user
|
||||
create table test_book
|
||||
(
|
||||
user_id int(10) unsigned not null auto_increment,
|
||||
username varchar(32) default NULL,
|
||||
password varchar(32) default NULL,
|
||||
nickname varchar(32) default NULL,
|
||||
book_id int(10) unsigned not null auto_increment comment '编号',
|
||||
user_id int(10) unsigned not null comment '用户编号',
|
||||
name varchar(45) not null comment '书名',
|
||||
primary key (book_id),
|
||||
key FK_book_1 (user_id)
|
||||
)
|
||||
ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8mb4 COMMENT='用户书籍表';
|
||||
|
||||
alter table test_book comment 'test_book 书';
|
||||
|
||||
/*==============================================================*/
|
||||
/* Table: test_user */
|
||||
/*==============================================================*/
|
||||
create table test_user
|
||||
(
|
||||
user_id int(10) unsigned not null auto_increment comment '编号',
|
||||
username varchar(32) default NULL comment '账号',
|
||||
password varchar(32) default NULL comment '密码',
|
||||
nickname varchar(32) default NULL comment '昵称',
|
||||
sex int(11) default NULL comment '0未知,1男,2女',
|
||||
ctime bigint(20) default NULL,
|
||||
content text,
|
||||
ctime bigint(20) default NULL comment '创建时间',
|
||||
content text comment '备注',
|
||||
primary key (user_id)
|
||||
)
|
||||
ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 COMMENT='用户表';
|
||||
|
||||
alter table user comment 'user 用户';
|
||||
|
||||
alter table book add constraint FK_Reference_9 foreign key (user_id)
|
||||
references user (user_id) on delete restrict on update restrict;
|
||||
alter table test_user comment 'test_user 用户';
|
||||
|
||||
alter table cms_article_category add constraint FK_Reference_7 foreign key (category_id)
|
||||
references cms_category (category_id) on delete restrict on update restrict;
|
||||
|
@ -214,6 +211,9 @@ alter table cms_article_tag add constraint FK_Reference_3 foreign key (article_i
|
|||
alter table cms_article_tag add constraint FK_Reference_4 foreign key (tag_id)
|
||||
references cms_tag (tag_id) on delete restrict on update restrict;
|
||||
|
||||
alter table cms_category add constraint FK_Reference_10 foreign key (pid)
|
||||
references cms_category (category_id) on delete restrict on update restrict;
|
||||
|
||||
alter table cms_category_tag add constraint FK_Reference_5 foreign key (category_id)
|
||||
references cms_category (category_id) on delete restrict on update restrict;
|
||||
|
||||
|
@ -226,3 +226,6 @@ alter table cms_comment add constraint cms_comment_article_id foreign key (artic
|
|||
alter table cms_comment add constraint cms_comment_pid foreign key (pid)
|
||||
references cms_comment (comment_id) on delete cascade on update cascade;
|
||||
|
||||
alter table test_book add constraint FK_Reference_9 foreign key (user_id)
|
||||
references test_user (user_id) on delete restrict on update restrict;
|
||||
|
||||
|
|
|
@ -0,0 +1,328 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="311mm" xmlns="http://www.w3.org/2000/svg" height="142mm" version="1.1" viewBox="0 0 1176 539" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<polyline fill="none" points="844,147 844,331" stroke="#0080c0" stroke-width="1"/>
|
||||
<polygon fill="#0080c0" points="844,331 841,318 847,318" stroke="#0080c0" stroke-width="1" stroke-linejoin="miter"/>
|
||||
<polyline fill="none" points="551,399 584,399" stroke="#0080c0" stroke-width="1"/>
|
||||
<polygon fill="#0080c0" points="584,399 571,402 571,396" stroke="#0080c0" stroke-width="1" stroke-linejoin="miter"/>
|
||||
<polyline fill="none" points="325,412 290,412" stroke="#0080c0" stroke-width="1"/>
|
||||
<polygon fill="#0080c0" points="290,412 303,409 303,415" stroke="#0080c0" stroke-width="1" stroke-linejoin="miter"/>
|
||||
<polyline fill="none" points="381,237 381,160" stroke="#0080c0" stroke-width="1"/>
|
||||
<polygon fill="#0080c0" points="381,160 384,174 378,174" stroke="#0080c0" stroke-width="1" stroke-linejoin="miter"/>
|
||||
<polyline fill="none" points="282,291 282,358" stroke="#0080c0" stroke-width="1"/>
|
||||
<polygon fill="#0080c0" points="282,358 279,345 285,345" stroke="#0080c0" stroke-width="1" stroke-linejoin="miter"/>
|
||||
<polyline fill="none" points="478,239 478,160" stroke="#0080c0" stroke-width="1"/>
|
||||
<polygon fill="#0080c0" points="478,160 481,174 475,174" stroke="#0080c0" stroke-width="1" stroke-linejoin="miter"/>
|
||||
<polyline fill="none" points="626,292 626,331" stroke="#0080c0" stroke-width="1"/>
|
||||
<polygon fill="#0080c0" points="626,331 623,318 629,318" stroke="#0080c0" stroke-width="1" stroke-linejoin="miter"/>
|
||||
<polyline fill="none" points="174,56 174,96" stroke="#0080c0" stroke-width="1"/>
|
||||
<polygon fill="#0080c0" points="174,96 171,83 177,83" stroke="#0080c0" stroke-width="1" stroke-linejoin="miter"/>
|
||||
<polyline fill="none" points="1097,29 1097,13 1168,13 1168,60 1123,60" stroke="#0080c0" stroke-width="1"/>
|
||||
<polygon fill="#0080c0" points="1123,60 1136,57 1136,63" stroke="#0080c0" stroke-width="1" stroke-linejoin="miter"/>
|
||||
<polyline fill="none" points="598,31 598,11 673,11 673,63 629,63" stroke="#0080c0" stroke-width="1"/>
|
||||
<polygon fill="#0080c0" points="629,63 642,60 642,66" stroke="#0080c0" stroke-width="1" stroke-linejoin="miter"/>
|
||||
<rect x="78" y="2" fill="#ffffff" width="0" height="0" stroke="none" stroke-width="0"/>
|
||||
<defs>
|
||||
<linearGradient id="Gradient1" x1="0%" x2="100%" y1="0%" y2="100%" gradientUnits="objectBoundingBox">
|
||||
<stop offset="5%" stop-color="#ffffff"/>
|
||||
<stop offset="95%" stop-color="#b2d6fc"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect x="78" y="2" fill="url(#Gradient1)" width="198" height="54" stroke="#0080c0" stroke-width="1"/>
|
||||
<text x="177" y="12" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-anchor="middle">test_book 书</text>
|
||||
<line x1="78" x2="276" y1="17" y2="17" stroke="#0080c0" stroke-width="1"/>
|
||||
<text x="83" y="27" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">book_id</text>
|
||||
<text x="83" y="38" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">user_id</text>
|
||||
<text x="83" y="49" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">name</text>
|
||||
<text x="126" y="27" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">int(10)</text>
|
||||
<text x="126" y="38" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">int(10)</text>
|
||||
<text x="126" y="49" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">varchar(45)</text>
|
||||
<text x="189" y="27" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">编号</text>
|
||||
<text x="189" y="38" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">用户编号</text>
|
||||
<text x="189" y="49" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">书名</text>
|
||||
<text x="237" y="27" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline"><pk></text>
|
||||
<text x="237" y="38" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'"><ak,fk></text>
|
||||
<rect x="584" y="331" fill="#ffffff" width="0" height="0" stroke="none" stroke-width="0"/>
|
||||
<defs>
|
||||
<linearGradient id="Gradient2" x1="0%" x2="100%" y1="0%" y2="100%" gradientUnits="objectBoundingBox">
|
||||
<stop offset="5%" stop-color="#ffffff"/>
|
||||
<stop offset="95%" stop-color="#b2d6fc"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect x="584" y="331" fill="url(#Gradient2)" width="519" height="206" stroke="#0080c0" stroke-width="1"/>
|
||||
<text x="843" y="341" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-anchor="middle">cms_article 文章表</text>
|
||||
<line x1="584" x2="1103" y1="346" y2="346" stroke="#0080c0" stroke-width="1"/>
|
||||
<text x="589" y="356" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">article_id</text>
|
||||
<text x="589" y="367" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">title</text>
|
||||
<text x="589" y="378" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">author</text>
|
||||
<text x="589" y="389" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">fromurl</text>
|
||||
<text x="589" y="400" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">image</text>
|
||||
<text x="589" y="411" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">keywords</text>
|
||||
<text x="589" y="422" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">description</text>
|
||||
<text x="589" y="433" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">type</text>
|
||||
<text x="589" y="444" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">allowcomments</text>
|
||||
<text x="589" y="455" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">status</text>
|
||||
<text x="589" y="466" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">content</text>
|
||||
<text x="589" y="477" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">user_id</text>
|
||||
<text x="589" y="488" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">up</text>
|
||||
<text x="589" y="499" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">down</text>
|
||||
<text x="589" y="510" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">readnumber</text>
|
||||
<text x="589" y="521" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">ctime</text>
|
||||
<text x="589" y="532" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">orders</text>
|
||||
<text x="662" y="356" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">int(10)</text>
|
||||
<text x="662" y="367" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">varchar(200)</text>
|
||||
<text x="662" y="378" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">varchar(50)</text>
|
||||
<text x="662" y="389" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">varchar(300)</text>
|
||||
<text x="662" y="400" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">varchar(300)</text>
|
||||
<text x="662" y="411" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">varchar(100)</text>
|
||||
<text x="662" y="422" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">varchar(500)</text>
|
||||
<text x="662" y="433" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">tinyint(4)</text>
|
||||
<text x="662" y="444" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">tinyint(4)</text>
|
||||
<text x="662" y="455" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">tinyint(4)</text>
|
||||
<text x="662" y="466" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">mediumtext</text>
|
||||
<text x="662" y="477" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">int(10)</text>
|
||||
<text x="662" y="488" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">int(10)</text>
|
||||
<text x="662" y="499" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">int(10)</text>
|
||||
<text x="662" y="510" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">int(10)</text>
|
||||
<text x="662" y="521" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">bigint(20)</text>
|
||||
<text x="662" y="532" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">bigint(20)</text>
|
||||
<text x="730" y="356" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">编号</text>
|
||||
<text x="730" y="367" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">文章标题</text>
|
||||
<text x="730" y="378" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">文章原作者</text>
|
||||
<text x="730" y="389" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">转载来源网址</text>
|
||||
<text x="730" y="400" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">封面图</text>
|
||||
<text x="730" y="411" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">关键字</text>
|
||||
<text x="730" y="422" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">简介</text>
|
||||
<text x="730" y="433" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">类型(1:普通,2:热门...)</text>
|
||||
<text x="730" y="444" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">是否允许评论(0:不允许,1:允许)</text>
|
||||
<text x="730" y="455" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">状态(-1:审核不通过回收站,0:刚发布未审核,1:已审核公开,2:已审核个人)</text>
|
||||
<text x="730" y="466" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">内容</text>
|
||||
<text x="730" y="477" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">发布人id</text>
|
||||
<text x="730" y="488" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">顶</text>
|
||||
<text x="730" y="499" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">踩</text>
|
||||
<text x="730" y="510" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">阅读数量</text>
|
||||
<text x="730" y="521" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">创建时间</text>
|
||||
<text x="730" y="532" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">排序</text>
|
||||
<text x="1068" y="356" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline"><pk></text>
|
||||
<text x="1068" y="532" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'"><ak></text>
|
||||
<rect x="459" y="239" fill="#ffffff" width="0" height="0" stroke="none" stroke-width="0"/>
|
||||
<defs>
|
||||
<linearGradient id="Gradient3" x1="0%" x2="100%" y1="0%" y2="100%" gradientUnits="objectBoundingBox">
|
||||
<stop offset="5%" stop-color="#ffffff"/>
|
||||
<stop offset="95%" stop-color="#c0c0c0"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect x="459" y="239" fill="url(#Gradient3)" width="251" height="53" stroke="#0080c0" stroke-width="1"/>
|
||||
<text x="584" y="249" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-anchor="middle">cms_article_category 文章类目关联表</text>
|
||||
<line x1="459" x2="710" y1="254" y2="254" stroke="#0080c0" stroke-width="1"/>
|
||||
<text x="463" y="264" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">article_category_id</text>
|
||||
<text x="463" y="275" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">article_id</text>
|
||||
<text x="463" y="286" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">category_id</text>
|
||||
<text x="566" y="264" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">int(10)</text>
|
||||
<text x="566" y="275" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">int(10)</text>
|
||||
<text x="566" y="286" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">int(10)</text>
|
||||
<text x="609" y="264" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">编号</text>
|
||||
<text x="609" y="275" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">文章编号</text>
|
||||
<text x="609" y="286" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">类目编号</text>
|
||||
<text x="657" y="264" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline"><pk></text>
|
||||
<text x="657" y="275" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'"><ak1,fk2></text>
|
||||
<text x="657" y="286" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'"><ak2,fk1></text>
|
||||
<rect x="325" y="372" fill="#ffffff" width="0" height="0" stroke="none" stroke-width="0"/>
|
||||
<defs>
|
||||
<linearGradient id="Gradient4" x1="0%" x2="100%" y1="0%" y2="100%" gradientUnits="objectBoundingBox">
|
||||
<stop offset="5%" stop-color="#ffffff"/>
|
||||
<stop offset="95%" stop-color="#c0c0c0"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect x="325" y="372" fill="url(#Gradient4)" width="226" height="54" stroke="#0080c0" stroke-width="1"/>
|
||||
<text x="438" y="382" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-anchor="middle">cms_article_tag 文章标签关联表</text>
|
||||
<line x1="325" x2="551" y1="387" y2="387" stroke="#0080c0" stroke-width="1"/>
|
||||
<text x="330" y="397" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">article_tag_id</text>
|
||||
<text x="330" y="408" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">article_id</text>
|
||||
<text x="330" y="419" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">tag_id</text>
|
||||
<text x="408" y="397" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">int(10)</text>
|
||||
<text x="408" y="408" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">int(10)</text>
|
||||
<text x="408" y="419" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">int(10)</text>
|
||||
<text x="451" y="397" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">编号</text>
|
||||
<text x="451" y="408" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">文章编号</text>
|
||||
<text x="451" y="419" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">标签编号</text>
|
||||
<text x="499" y="397" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline"><pk></text>
|
||||
<text x="499" y="408" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'"><ak1,fk1></text>
|
||||
<text x="499" y="419" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'"><ak2,fk2></text>
|
||||
<rect x="326" y="31" fill="#ffffff" width="0" height="0" stroke="none" stroke-width="0"/>
|
||||
<defs>
|
||||
<linearGradient id="Gradient5" x1="0%" x2="100%" y1="0%" y2="100%" gradientUnits="objectBoundingBox">
|
||||
<stop offset="5%" stop-color="#ffffff"/>
|
||||
<stop offset="95%" stop-color="#b2d6fc"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect x="326" y="31" fill="url(#Gradient5)" width="303" height="129" stroke="#0080c0" stroke-width="1"/>
|
||||
<text x="477" y="41" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-anchor="middle">cms_category 类目表</text>
|
||||
<line x1="326" x2="629" y1="46" y2="46" stroke="#0080c0" stroke-width="1"/>
|
||||
<text x="331" y="56" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">category_id</text>
|
||||
<text x="331" y="67" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">pid</text>
|
||||
<text x="331" y="78" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">level</text>
|
||||
<text x="331" y="89" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">name</text>
|
||||
<text x="331" y="100" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">description</text>
|
||||
<text x="331" y="111" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">icon</text>
|
||||
<text x="331" y="122" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">type</text>
|
||||
<text x="331" y="133" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">alias</text>
|
||||
<text x="331" y="144" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">ctime</text>
|
||||
<text x="331" y="155" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">orders</text>
|
||||
<text x="394" y="56" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">int(10)</text>
|
||||
<text x="394" y="67" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">int(10)</text>
|
||||
<text x="394" y="78" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">tinyint(3)</text>
|
||||
<text x="394" y="89" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">varchar(20)</text>
|
||||
<text x="394" y="100" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">varchar(200)</text>
|
||||
<text x="394" y="111" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">varchar(50)</text>
|
||||
<text x="394" y="122" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">tinyint(3)</text>
|
||||
<text x="394" y="133" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">varchar(20)</text>
|
||||
<text x="394" y="144" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">bigint(20)</text>
|
||||
<text x="394" y="155" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">bigint(255)</text>
|
||||
<text x="462" y="56" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">编号</text>
|
||||
<text x="462" y="67" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">上级编号</text>
|
||||
<text x="462" y="78" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">层级</text>
|
||||
<text x="462" y="89" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">名称</text>
|
||||
<text x="462" y="100" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">描述</text>
|
||||
<text x="462" y="111" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">图标</text>
|
||||
<text x="462" y="122" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">类型(1:普通,2:热门...)</text>
|
||||
<text x="462" y="133" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">别名</text>
|
||||
<text x="462" y="144" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">创建时间</text>
|
||||
<text x="462" y="155" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">排序</text>
|
||||
<text x="580" y="56" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline"><pk></text>
|
||||
<text x="580" y="67" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'"><ak2,fk></text>
|
||||
<text x="580" y="78" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'"><ak4></text>
|
||||
<text x="580" y="133" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'"><ak3></text>
|
||||
<text x="580" y="155" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'"><ak1></text>
|
||||
<rect x="198" y="237" fill="#ffffff" width="0" height="0" stroke="none" stroke-width="0"/>
|
||||
<defs>
|
||||
<linearGradient id="Gradient6" x1="0%" x2="100%" y1="0%" y2="100%" gradientUnits="objectBoundingBox">
|
||||
<stop offset="5%" stop-color="#ffffff"/>
|
||||
<stop offset="95%" stop-color="#c0c0c0"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect x="198" y="237" fill="url(#Gradient6)" width="231" height="54" stroke="#0080c0" stroke-width="1"/>
|
||||
<text x="313" y="247" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-anchor="middle">cms_category_tag 类目标签关联表</text>
|
||||
<line x1="198" x2="429" y1="252" y2="252" stroke="#0080c0" stroke-width="1"/>
|
||||
<text x="203" y="262" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">category_tag_id</text>
|
||||
<text x="203" y="273" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">category_id</text>
|
||||
<text x="203" y="284" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">tag_id</text>
|
||||
<text x="286" y="262" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">int(10)</text>
|
||||
<text x="286" y="273" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">int(10)</text>
|
||||
<text x="286" y="284" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">int(10)</text>
|
||||
<text x="329" y="262" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">编号</text>
|
||||
<text x="329" y="273" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">类目编号</text>
|
||||
<text x="329" y="284" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">标签编号</text>
|
||||
<text x="377" y="262" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline"><pk></text>
|
||||
<text x="377" y="273" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'"><ak2,fk1></text>
|
||||
<text x="377" y="284" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'"><ak1,fk2></text>
|
||||
<rect x="727" y="29" fill="#ffffff" width="0" height="0" stroke="none" stroke-width="0"/>
|
||||
<defs>
|
||||
<linearGradient id="Gradient7" x1="0%" x2="100%" y1="0%" y2="100%" gradientUnits="objectBoundingBox">
|
||||
<stop offset="5%" stop-color="#ffffff"/>
|
||||
<stop offset="95%" stop-color="#b2d6fc"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect x="727" y="29" fill="url(#Gradient7)" width="396" height="118" stroke="#0080c0" stroke-width="1"/>
|
||||
<text x="925" y="39" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-anchor="middle">cms_comment 评论表</text>
|
||||
<line x1="727" x2="1123" y1="44" y2="44" stroke="#0080c0" stroke-width="1"/>
|
||||
<text x="731" y="54" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">comment_id</text>
|
||||
<text x="731" y="65" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">pid</text>
|
||||
<text x="731" y="76" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">article_id</text>
|
||||
<text x="731" y="87" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">user_id</text>
|
||||
<text x="731" y="98" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">content</text>
|
||||
<text x="731" y="109" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">status</text>
|
||||
<text x="731" y="120" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">ip</text>
|
||||
<text x="731" y="131" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">agent</text>
|
||||
<text x="731" y="142" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">ctime</text>
|
||||
<text x="789" y="54" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">int(10)</text>
|
||||
<text x="789" y="65" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">int(10)</text>
|
||||
<text x="789" y="76" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">int(10)</text>
|
||||
<text x="789" y="87" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">int(10)</text>
|
||||
<text x="789" y="98" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">text</text>
|
||||
<text x="789" y="109" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">tinyint(4)</text>
|
||||
<text x="789" y="120" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">varchar(30)</text>
|
||||
<text x="789" y="131" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">varchar(200)</text>
|
||||
<text x="789" y="142" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">bigint(20)</text>
|
||||
<text x="857" y="54" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">编号</text>
|
||||
<text x="857" y="65" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">回复楼中楼编号回复楼中楼编号</text>
|
||||
<text x="857" y="76" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">文章编号</text>
|
||||
<text x="857" y="87" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">用户编号</text>
|
||||
<text x="857" y="98" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">评论内容</text>
|
||||
<text x="857" y="109" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">状态(-1:审核不通过,0:未审核,1:已审核通过)</text>
|
||||
<text x="857" y="120" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">评论人ip地址</text>
|
||||
<text x="857" y="131" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">评论人终端信息</text>
|
||||
<text x="857" y="142" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">创建时间</text>
|
||||
<text x="1070" y="54" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline"><pk></text>
|
||||
<text x="1070" y="65" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'"><fk2></text>
|
||||
<text x="1070" y="76" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'"><ak,fk1></text>
|
||||
<rect x="2" y="358" fill="#ffffff" width="0" height="0" stroke="none" stroke-width="0"/>
|
||||
<defs>
|
||||
<linearGradient id="Gradient8" x1="0%" x2="100%" y1="0%" y2="100%" gradientUnits="objectBoundingBox">
|
||||
<stop offset="5%" stop-color="#ffffff"/>
|
||||
<stop offset="95%" stop-color="#b2d6fc"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect x="2" y="358" fill="url(#Gradient8)" width="288" height="107" stroke="#0080c0" stroke-width="1"/>
|
||||
<text x="146" y="368" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-anchor="middle">cms_tag 标签表</text>
|
||||
<line x1="2" x2="290" y1="373" y2="373" stroke="#0080c0" stroke-width="1"/>
|
||||
<text x="7" y="383" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">tag_id</text>
|
||||
<text x="7" y="394" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">name</text>
|
||||
<text x="7" y="405" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">description</text>
|
||||
<text x="7" y="416" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">icon</text>
|
||||
<text x="7" y="427" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">type</text>
|
||||
<text x="7" y="438" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">alias</text>
|
||||
<text x="7" y="449" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">ctime</text>
|
||||
<text x="7" y="460" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">orders</text>
|
||||
<text x="70" y="383" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">int(10)</text>
|
||||
<text x="70" y="394" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">varchar(20)</text>
|
||||
<text x="70" y="405" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">varchar(200)</text>
|
||||
<text x="70" y="416" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">varchar(50)</text>
|
||||
<text x="70" y="427" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">tinyint(4)</text>
|
||||
<text x="70" y="438" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">varchar(20)</text>
|
||||
<text x="70" y="449" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">bigint(20)</text>
|
||||
<text x="70" y="460" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">bigint(20)</text>
|
||||
<text x="138" y="383" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">编号</text>
|
||||
<text x="138" y="394" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">名称</text>
|
||||
<text x="138" y="405" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">描述</text>
|
||||
<text x="138" y="416" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">图标</text>
|
||||
<text x="138" y="427" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">类型(1:普通,2:热门...)</text>
|
||||
<text x="138" y="438" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">别名</text>
|
||||
<text x="138" y="449" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">创建时间</text>
|
||||
<text x="138" y="460" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">排序</text>
|
||||
<text x="256" y="383" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline"><pk></text>
|
||||
<text x="256" y="438" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'"><ak2></text>
|
||||
<text x="256" y="460" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'"><ak1></text>
|
||||
<rect x="79" y="96" fill="#ffffff" width="0" height="0" stroke="none" stroke-width="0"/>
|
||||
<defs>
|
||||
<linearGradient id="Gradient9" x1="0%" x2="100%" y1="0%" y2="100%" gradientUnits="objectBoundingBox">
|
||||
<stop offset="5%" stop-color="#ffffff"/>
|
||||
<stop offset="95%" stop-color="#b2d6fc"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect x="79" y="96" fill="url(#Gradient9)" width="190" height="96" stroke="#0080c0" stroke-width="1"/>
|
||||
<text x="174" y="106" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-anchor="middle">test_user 用户</text>
|
||||
<line x1="79" x2="269" y1="111" y2="111" stroke="#0080c0" stroke-width="1"/>
|
||||
<text x="84" y="121" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">user_id</text>
|
||||
<text x="84" y="132" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">username</text>
|
||||
<text x="84" y="143" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">password</text>
|
||||
<text x="84" y="154" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">nickname</text>
|
||||
<text x="84" y="165" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">sex</text>
|
||||
<text x="84" y="176" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">ctime</text>
|
||||
<text x="84" y="187" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">content</text>
|
||||
<text x="132" y="121" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">int(10)</text>
|
||||
<text x="132" y="132" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">varchar(32)</text>
|
||||
<text x="132" y="143" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">varchar(32)</text>
|
||||
<text x="132" y="154" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">varchar(32)</text>
|
||||
<text x="132" y="165" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">int(11)</text>
|
||||
<text x="132" y="176" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">bigint(20)</text>
|
||||
<text x="132" y="187" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">text</text>
|
||||
<text x="195" y="121" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline">编号</text>
|
||||
<text x="195" y="132" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">账号</text>
|
||||
<text x="195" y="143" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">密码</text>
|
||||
<text x="195" y="154" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">昵称</text>
|
||||
<text x="195" y="165" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">性别</text>
|
||||
<text x="195" y="176" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">创建时间</text>
|
||||
<text x="195" y="187" fill="#000000" font-size="10" font-family="'Arial Unicode MS','新宋体'">备注</text>
|
||||
<text x="243" y="121" fill="#ff0000" font-size="10" font-family="'Arial Unicode MS','新宋体'" text-decoration="underline"><pk></text>
|
||||
</svg>
|
After Width: | Height: | Size: 34 KiB |
|
@ -1,170 +0,0 @@
|
|||
/*
|
||||
Navicat MySQL Data Transfer
|
||||
|
||||
Source Server : localhost
|
||||
Source Server Version : 50528
|
||||
Source Host : localhost:3306
|
||||
Source Database : zheng
|
||||
|
||||
Target Server Type : MYSQL
|
||||
Target Server Version : 50528
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 2016-10-17 17:23:58
|
||||
*/
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for book
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `book`;
|
||||
CREATE TABLE `book` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`userid` int(10) unsigned NOT NULL,
|
||||
`name` varchar(45) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `FK_book_1` (`userid`),
|
||||
CONSTRAINT `book_ibfk_1` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8mb4 COMMENT='用户书籍表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for cms_article
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `cms_article`;
|
||||
CREATE TABLE `cms_article` (
|
||||
`article_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '文章编号',
|
||||
`title` varchar(200) NOT NULL COMMENT '文章标题',
|
||||
`author` varchar(50) DEFAULT NULL COMMENT '文章原作者',
|
||||
`fromurl` varchar(300) DEFAULT NULL COMMENT '转载来源网址',
|
||||
`image` varchar(300) DEFAULT NULL COMMENT '封面图',
|
||||
`keywords` varchar(100) DEFAULT NULL COMMENT '关键字',
|
||||
`description` varchar(500) DEFAULT NULL COMMENT '简介',
|
||||
`type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '类型(1:普通,2:热门...)',
|
||||
`allowcomments` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否允许评论(0:不允许,1:允许)',
|
||||
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态(-1:审核不通过回收站,0:刚发布未审核,1:已审核公开,2:已审核个人)',
|
||||
`content` mediumtext COMMENT '内容',
|
||||
`user_id` int(10) unsigned NOT NULL COMMENT '发布人id',
|
||||
`up` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '顶',
|
||||
`down` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '踩',
|
||||
`readnumber` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '阅读数量',
|
||||
`ctime` bigint(20) unsigned NOT NULL COMMENT '创建时间',
|
||||
`orders` bigint(20) unsigned NOT NULL COMMENT '排序',
|
||||
PRIMARY KEY (`article_id`),
|
||||
KEY `cms_article_orders` (`orders`) USING BTREE COMMENT '排序索引'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文章表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for cms_article_category
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `cms_article_category`;
|
||||
CREATE TABLE `cms_article_category` (
|
||||
`article_category_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`article_id` int(10) unsigned NOT NULL,
|
||||
`category_id` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`article_category_id`),
|
||||
KEY `cms_article_category_article_id` (`article_id`) USING BTREE COMMENT '文章id索引',
|
||||
KEY `cms_article_category_category_id` (`category_id`) USING BTREE COMMENT '类目id索引'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文章类目表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for cms_article_tag
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `cms_article_tag`;
|
||||
CREATE TABLE `cms_article_tag` (
|
||||
`article_tag_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`article_id` int(10) unsigned NOT NULL,
|
||||
`tag_id` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`article_tag_id`),
|
||||
KEY `cms_article_tag_article_id` (`article_id`) USING BTREE COMMENT '文章id索引',
|
||||
KEY `cms_article_tag_tag_id` (`tag_id`) USING BTREE COMMENT '标签id索引'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文章标签表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for cms_category
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `cms_category`;
|
||||
CREATE TABLE `cms_category` (
|
||||
`category_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '类目编号',
|
||||
`pid` int(10) unsigned NOT NULL COMMENT '上级编号',
|
||||
`level` tinyint(3) NOT NULL COMMENT '层级',
|
||||
`name` varchar(20) NOT NULL COMMENT '名称',
|
||||
`description` varchar(200) DEFAULT NULL COMMENT '描述',
|
||||
`icon` varchar(50) DEFAULT NULL COMMENT '图标',
|
||||
`type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '类型(1:普通,2:热门...)',
|
||||
`alias` varchar(20) DEFAULT NULL COMMENT '别名',
|
||||
`ctime` bigint(20) unsigned NOT NULL COMMENT '创建时间',
|
||||
`orders` bigint(255) unsigned NOT NULL COMMENT '排序',
|
||||
PRIMARY KEY (`category_id`),
|
||||
KEY `cms_category_orders` (`orders`) USING BTREE COMMENT '排序字段索引',
|
||||
KEY `cms_category_pid` (`pid`) USING BTREE COMMENT '父类目索引',
|
||||
KEY `cms_category_alias` (`alias`) USING BTREE COMMENT '别名索引',
|
||||
KEY `cms_category_level` (`level`) USING BTREE COMMENT '类目层级索引'
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='类目表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for cms_category_tag
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `cms_category_tag`;
|
||||
CREATE TABLE `cms_category_tag` (
|
||||
`category_tag_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`category_id` int(10) unsigned NOT NULL,
|
||||
`tag_id` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`category_tag_id`),
|
||||
KEY `cms_category_tag_tag_id` (`tag_id`) USING BTREE COMMENT '标签id索引',
|
||||
KEY `cms_category_tag_category_id` (`category_id`) USING BTREE COMMENT '类目id索引'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT=' 分类标签表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for cms_comment
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `cms_comment`;
|
||||
CREATE TABLE `cms_comment` (
|
||||
`comment_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
|
||||
`pid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '回复楼中楼id',
|
||||
`article_id` int(10) unsigned NOT NULL COMMENT '文章id',
|
||||
`user_id` int(10) unsigned NOT NULL COMMENT '用户id',
|
||||
`content` text NOT NULL COMMENT '评论内容',
|
||||
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态(-1:审核不通过,0:未审核,1:已审核通过)',
|
||||
`ip` varchar(30) DEFAULT NULL COMMENT '评论人ip地址',
|
||||
`agent` varchar(200) DEFAULT NULL COMMENT '评论人终端信息',
|
||||
`ctime` bigint(20) NOT NULL COMMENT '创建时间',
|
||||
PRIMARY KEY (`comment_id`),
|
||||
KEY `cms_comment_article_id` (`article_id`),
|
||||
KEY `cms_comment_pid` (`pid`),
|
||||
CONSTRAINT `cms_comment_article_id` FOREIGN KEY (`article_id`) REFERENCES `cms_article` (`article_id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `cms_comment_pid` FOREIGN KEY (`pid`) REFERENCES `cms_comment` (`comment_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for cms_tag
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `cms_tag`;
|
||||
CREATE TABLE `cms_tag` (
|
||||
`tag_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '标签编号',
|
||||
`name` varchar(20) NOT NULL COMMENT '名称',
|
||||
`description` varchar(200) DEFAULT NULL COMMENT '描述',
|
||||
`icon` varchar(50) DEFAULT NULL COMMENT '图标',
|
||||
`type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '类型(1:普通,2:热门...)',
|
||||
`alias` varchar(20) DEFAULT NULL COMMENT '别名',
|
||||
`ctime` bigint(20) unsigned NOT NULL COMMENT '创建时间',
|
||||
`orders` bigint(20) unsigned NOT NULL COMMENT 'orders',
|
||||
PRIMARY KEY (`tag_id`),
|
||||
KEY `cms_tag_orders` (`orders`) USING BTREE COMMENT '排序索引',
|
||||
KEY `cms_tag_alias` (`alias`) USING BTREE COMMENT '别名索引'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='标签表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for user
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `user`;
|
||||
CREATE TABLE `user` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`username` varchar(32) DEFAULT NULL,
|
||||
`password` varchar(32) DEFAULT NULL,
|
||||
`nickname` varchar(32) DEFAULT NULL,
|
||||
`sex` int(11) DEFAULT NULL COMMENT '0未知,1男,2女',
|
||||
`ctime` bigint(20) DEFAULT NULL,
|
||||
`content` text,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 COMMENT='用户表';
|
Loading…
Reference in New Issue