parent
4203b21097
commit
b690ee4987
3 changed files with 6 additions and 3 deletions
|
@ -22,7 +22,7 @@ pub struct Task {
|
|||
pub project: Option<String>,
|
||||
pub link: Option<String>,
|
||||
pub dir_path: Option<PathBuf>,
|
||||
// created_at
|
||||
pub created_at: time::OffsetDateTime,
|
||||
}
|
||||
|
||||
pub struct CurrentTaskInfo {
|
||||
|
|
|
@ -39,6 +39,7 @@ impl From<Task> for domain::Task {
|
|||
project: repo.group,
|
||||
link: repo.link,
|
||||
dir_path: repo.path.map(PathBuf::from),
|
||||
created_at: time::OffsetDateTime::now_utc(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,9 +14,10 @@ struct Task {
|
|||
dir_path: Option<String>,
|
||||
/*
|
||||
current: bool,
|
||||
created_at: time::OffsetDateTime,
|
||||
finished_at: Option<time::OffsetDateTime>,
|
||||
*/
|
||||
created_at: time::OffsetDateTime,
|
||||
|
||||
idx: i64,
|
||||
}
|
||||
|
||||
|
@ -27,6 +28,7 @@ impl From<Task> for domain::Task {
|
|||
project: repo.project,
|
||||
link: repo.link,
|
||||
dir_path: repo.dir_path.map(PathBuf::from),
|
||||
created_at: repo.created_at,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,9 +45,9 @@ impl<'r> TryFrom<&'r rusqlite::Row<'_>> for Task {
|
|||
dir_path: row.get("dir_path")?,
|
||||
/*
|
||||
current: row.get("current")?,
|
||||
created_at: row.get("created_at")?,
|
||||
finished_at: row.get("finished_at")?,
|
||||
*/
|
||||
created_at: row.get("created_at")?,
|
||||
idx: row.get("idx")?,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue