26 lines
766 B
Rust
26 lines
766 B
Rust
|
use chrono::NaiveDateTime;
|
||
|
use serde_derive::{Deserialize, Serialize};
|
||
|
|
||
|
/// The time entry model
|
||
|
///
|
||
|
/// This model represents an amount of time that is registered for a certain task.
|
||
|
#[derive(Deserialize, Queryable, Serialize)]
|
||
|
pub struct TimeEntry {
|
||
|
/// The unique identification number
|
||
|
pub id: i32,
|
||
|
/// Flag whether to bill or not
|
||
|
pub bill: bool,
|
||
|
/// An additional comment
|
||
|
pub comment: String,
|
||
|
/// The finish/end time of the entry
|
||
|
pub end: NaiveDateTime,
|
||
|
/// The start time of the entry
|
||
|
pub start: NaiveDateTime,
|
||
|
/// The ID of the task the entry is registered for
|
||
|
pub task_id: i32,
|
||
|
/// The time of creation
|
||
|
pub created_at: NaiveDateTime,
|
||
|
/// The time of last update
|
||
|
pub updated_at: NaiveDateTime,
|
||
|
}
|