Skip to main content

boat_lib/models/
log.rs

1use chrono::{DateTime, Utc};
2
3use crate::repository::Id;
4
5#[derive(Debug, Clone)]
6pub struct Log {
7    pub id: Id,
8    pub activity_id: Id,
9    pub starts_at: DateTime<Utc>,
10    pub ends_at: Option<DateTime<Utc>>,
11}
12
13#[derive(Debug)]
14pub struct NewLog {
15    pub activity_id: Id,
16    pub starts_at: DateTime<Utc>,
17    pub ends_at: Option<DateTime<Utc>>,
18}
19
20#[derive(Debug)]
21pub struct LogWithActivity {
22    pub id: i64,
23    pub activity_id: i64,
24    pub activity_name: String,
25    pub starts_at: DateTime<Utc>,
26    pub ends_at: Option<DateTime<Utc>>,
27}