Commit d68a4bfe47df62f1cddc1bcacbaa780929b8e591
1 parent
da6e73a2
update work model for saving to db
Showing
1 changed file
with
5 additions
and
4 deletions
front-end/h5/src/components/core/models/work.js
| @@ -3,12 +3,13 @@ class Work { | @@ -3,12 +3,13 @@ class Work { | ||
| 3 | this.title = work.title || '标题' | 3 | this.title = work.title || '标题' |
| 4 | this.description = work.description || '描述' | 4 | this.description = work.description || '描述' |
| 5 | this.pages = work.pages || [] | 5 | this.pages = work.pages || [] |
| 6 | - this.type = work.type || 'h5' | ||
| 7 | 6 | ||
| 8 | - this.id = this.id | ||
| 9 | - this.key = this.key | 7 | + // this.id = this.id |
| 8 | + // TODO 用id 并不是一个好办法,有心人会得知整个系统中共有多少作品等额外信息,尽量防止信息泄漏 | ||
| 9 | + // this.key = this.key | ||
| 10 | this.cover_image_url = '' | 10 | this.cover_image_url = '' |
| 11 | - this.project_id = 1 | 11 | + // TODO 后期可以添加一个类似项目组的概念,每个项目组下可以有多个作品 |
| 12 | + // this.project_id = 1 | ||
| 12 | this.is_publish = false | 13 | this.is_publish = false |
| 13 | this.create_time = new Date() | 14 | this.create_time = new Date() |
| 14 | this.update_time = new Date() | 15 | this.update_time = new Date() |