Constructor
new Todo(id, contentopt, isDoneopt, category, tagsopt)
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
id |
string | 식별 아이디(required) |
||
content |
string |
<optional> |
'' | 내용(optional) |
isDone |
boolean |
<optional> |
false | 완료여부(optional) |
category |
string | 카테고리(required) |
||
tags |
Array.<string> |
<optional> |
태그(optional) |
Methods
deleteAllTags() → {void}
투두의 모든 태그를 삭제한다.
Returns:
- Type
- void
deleteTag(tag) → {void}
투두 태그를 삭제한다.
Parameters:
| Name | Type | Description |
|---|---|---|
tag |
string | 삭제할 태그명 |
Returns:
- Type
- void
updateCategory(category) → {void}
투두 카테고리를 수정한다.
Parameters:
| Name | Type | Description |
|---|---|---|
category |
string | 수정할 할일 카테고리 |
Returns:
- Type
- void
updateContent(content) → {void}
투두 내용을 수정한다.
Parameters:
| Name | Type | Description |
|---|---|---|
content |
string | 수정할 할일 내용 |
Returns:
- Type
- void
updateNewTag(tag) → {void}
새 투두 태그를 추가한다.
Parameters:
| Name | Type | Description |
|---|---|---|
tag |
string | 추가할 태그명 |
Returns:
- Type
- void
updateState() → {void}
투두 완료여부를 수정한다. 이전 boolean값을 기준으로 반대의 값을 가지게 된다.
Returns:
- Type
- void