30 lines
531 B
Rust
30 lines
531 B
Rust
use crate::types::Time;
|
|
|
|
#[derive(Debug)]
|
|
pub struct Entry {
|
|
pub id: u64,
|
|
pub note: String,
|
|
pub start: Time,
|
|
pub end: Option<Time>,
|
|
pub sheet: String,
|
|
}
|
|
|
|
#[derive(Debug)]
|
|
pub struct Meta {
|
|
pub id: u64,
|
|
pub key: String,
|
|
pub value: String,
|
|
}
|
|
|
|
impl Entry {
|
|
#[cfg(test)]
|
|
pub fn new_sample(id: u64, start: Time, end: Option<Time>) -> Entry {
|
|
Entry {
|
|
id,
|
|
note: format!("entry {}", id),
|
|
start, end,
|
|
sheet: "default".into(),
|
|
}
|
|
}
|
|
}
|