wip
This commit is contained in:
@ -6,6 +6,7 @@ pub(self) use uuid::Uuid;
|
||||
pub mod global {}
|
||||
|
||||
pub mod trees {
|
||||
// ------- time tracking --------
|
||||
pub mod category {
|
||||
use super::super::*;
|
||||
|
||||
@ -55,9 +56,42 @@ pub mod trees {
|
||||
/// The time when this session was ended
|
||||
pub ended: DateTime<Local>,
|
||||
|
||||
// FIXME: this field is currently not used
|
||||
/// Whether the item has been "deleted", e.g. it shoudn't be shown in the view
|
||||
// FIXME: this field is currently not used
|
||||
pub deleted: bool,
|
||||
}
|
||||
}
|
||||
// -------------------------------------
|
||||
|
||||
// ------- daily tasks tracking --------
|
||||
pub mod daily {
|
||||
use super::super::*;
|
||||
|
||||
pub const NAME: &str = "DAILIES";
|
||||
|
||||
pub type K = Uuid;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
|
||||
pub struct V {
|
||||
/// The name of the task.
|
||||
pub name: String,
|
||||
|
||||
// Task should be done every <unit_count> <unit>s, e.g. every 3 days or every 1 week.
|
||||
pub unit_count: u32,
|
||||
pub unit: TimeUnit,
|
||||
|
||||
/// Whether the item has been "deleted", e.g. it shoudn't be shown in the view
|
||||
// FIXME: this field is currently not used
|
||||
pub deleted: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
|
||||
pub enum TimeUnit {
|
||||
Day,
|
||||
Week,
|
||||
Month,
|
||||
Year,
|
||||
}
|
||||
}
|
||||
// -------------------------------------
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user