feat: create a model for subtasks
This commit is contained in:
@@ -2,15 +2,18 @@ use crate::errors::error::Error;
|
||||
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;
|
||||
|
||||
pub(crate) mod tasks;
|
||||
pub(crate) mod projects;
|
||||
pub(crate) mod subtasks;
|
||||
|
||||
#[derive(PartialEq, Debug)]
|
||||
pub(crate) enum QueryValue {
|
||||
Tasks(Vec<Task>),
|
||||
Projects(Vec<Project>),
|
||||
Tasks(Vec<Task>),
|
||||
Subtasks(Vec<Subtask>),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -20,7 +23,8 @@ pub(crate) enum QueryErrors {
|
||||
|
||||
#[derive(PartialEq, Eq, Hash, Clone, Debug)]
|
||||
pub(crate) enum QueryKey {
|
||||
Projects,
|
||||
Tasks,
|
||||
TasksInCategory(Category),
|
||||
Projects,
|
||||
SubtasksOfTaskId(i32),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user