diff options
author | Joris | 2020-05-31 13:59:35 +0200 |
---|---|---|
committer | Joris | 2020-05-31 13:59:35 +0200 |
commit | 0f1610333324d58acafee8c0fa9d9c9bc293b219 (patch) | |
tree | 302c37dd3751e9fe2e50ab656d56253bfd2d55fc /src/model | |
parent | 8a6e10d401eea8db0947f8c4b309b8a6256f9748 (diff) |
Use defined tags for tasks
Diffstat (limited to 'src/model')
-rw-r--r-- | src/model/task.py | 5 | ||||
-rw-r--r-- | src/model/task_tag.py | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/model/task.py b/src/model/task.py index 4bb9a89..69f9807 100644 --- a/src/model/task.py +++ b/src/model/task.py @@ -1,4 +1,4 @@ -from typing import NamedTuple +from typing import NamedTuple, List from model.difficulty import Difficulty from model.priority import Priority @@ -9,7 +9,6 @@ class Task(NamedTuple): updated_at: int name: str duration: int - tag: str difficulty: Difficulty priority: Priority description: str @@ -17,7 +16,7 @@ class Task(NamedTuple): class ValidTaskForm(NamedTuple): name: str duration: int - tag: str difficulty: Difficulty priority: Priority + tags: List[int] description: str diff --git a/src/model/task_tag.py b/src/model/task_tag.py new file mode 100644 index 0000000..0a33c66 --- /dev/null +++ b/src/model/task_tag.py @@ -0,0 +1,5 @@ +from typing import NamedTuple + +class TaskTag(NamedTuple): + task_id: int + tag_id: int |