feat: create a model for tasks with subtasks

This commit is contained in:
2024-09-08 22:19:53 +02:00
parent e8b6af1492
commit 196ffbf82b
6 changed files with 91 additions and 7 deletions

View File

@@ -3,7 +3,7 @@ use crate::errors::error_vec::ErrorVec;
use crate::models::category::Category;
use crate::models::project::Project;
use crate::models::subtask::Subtask;
use crate::models::task::Task;
use crate::models::task::{Task, TaskWithSubtasks};
pub(crate) mod tasks;
pub(crate) mod projects;
@@ -13,6 +13,7 @@ pub(crate) mod subtasks;
pub(crate) enum QueryValue {
Projects(Vec<Project>),
Tasks(Vec<Task>),
TasksWithSubtasks(Vec<TaskWithSubtasks>),
Subtasks(Vec<Subtask>),
}
@@ -26,5 +27,6 @@ pub(crate) enum QueryKey {
Projects,
Tasks,
TasksInCategory(Category),
TasksWithSubtasksInCategory(Category),
SubtasksOfTaskId(i32),
}