diff options
Diffstat (limited to 'todo/model/task.py')
-rw-r--r-- | todo/model/task.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/todo/model/task.py b/todo/model/task.py new file mode 100644 index 0000000..f20cbc9 --- /dev/null +++ b/todo/model/task.py @@ -0,0 +1,22 @@ +from typing import NamedTuple, List + +from todo.model.difficulty import Difficulty +from todo.model.priority import Priority + +class Task(NamedTuple): + id: int + created_at: int + updated_at: int + name: str + duration: int + difficulty: Difficulty + priority: Priority + description: str + +class ValidTaskForm(NamedTuple): + name: str + duration: int + difficulty: Difficulty + priority: Priority + tags: List[int] + description: str |