-
Notifications
You must be signed in to change notification settings - Fork 0
Book.Design
Lin Liu edited this page Oct 11, 2013
·
18 revisions
TODO
- BookController
- listAction
- Description: 书籍管理列表
- Template: book-list.phtml
- listAction
- CatalogueController
- editAction
- Description: 书籍目录修改页面
- Template: catalogue-edit.phtml
- editItemAction
- Description: 修改书籍某一目录项的文章(增删文章)
- Template: catalogue-edit-item.phtml
- editAction
- ArticleController
- editAction
- Description: 文章修改、新增页面
- Template: article-edit.phtml
- editAction
- BookController
- listAction
- Description: 书籍管理列表
- Template: book-list.phtml
- viewAction
- Description: 书籍目录查看页面(书籍简介、目录)
- Template: book-view.phtml
- listAction
- ArticleController
- viewAction
- Description: 文章查看
- Template: article-view.phtml
- viewAction
TODO
TODO
TODO
| Description | Field | Type | Length | Default value | More |
|---|---|---|---|---|---|
| Unique ID | id | unsigned int | 10 | NULL | Unique, Not null, auto_increment |
| Book Title | title | varchar | 255 | ' ' | Not null |
| Book Cover | cover_url | varchar | 255 | ' ' | Nullable |
| Book Introduction | introduction | text | ' ' | Nullable | |
| Catalogue ID | catalogue_id | unsigned int | 10 | NULL | Not null |
| Description | Field | Type | Length | Default value | More |
|---|---|---|---|---|---|
| Unique ID | id | unsigned int | 10 | NULL | Unique, Not null, auto_increment |
| Catalogue Data | data | text | '' | Nullable |
注:目录表参考了pi的 ****_core_navigation_node表,其中的 data 字段用来存储目录,其树形结构是用json数据来描述的。
| Description | Field | Type | Length | Default value | More |
|---|---|---|---|---|---|
| Unique ID | id | unsigned int | 10 | NULL | Unique, Not null, auto_increment |
| Book ID | book_id | unsigned int | 10 | Not null | |
| Catalogue ID | catalogue_id | unsigned int | 10 | Not null | |
| Article ID | catalogue_id | unsigned int | 10 | Not null |
| Description | Field | Type | Length | Default value | More |
|---|---|---|---|---|---|
| Unique ID | id | unsigned int | 10 | NULL | Unique, Not null, auto_increment |
| Article Title | title | varchar | 255 | ' ' | Not null |
| Article Meta Type | meta_type | varchar | 32 | ' ' | Nullable |
| Article Content | content | text | ' ' | Nullable |
CREATE TABLE `{book}` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`cover_url` varchar(255) NULL,
`introduction` text NULL,
`catalogue_id` int(10) unsigned NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE `{catalogue}` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`data` text NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE `{catalogue_rel_article}` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`book_id` int(10) unsigned NOT NULL,
`cata_data_id` int(10) unsigned NOT NULL,
`article_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE `{article}` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`content` text NULL,
`meta_type` varchar(32) NULL,
PRIMARY KEY (`id`)
);
TODO
TODO