This commit is contained in:
2023-04-04 15:16:21 +02:00
parent 0bdd073d7f
commit cedaba5709
10 changed files with 453 additions and 28 deletions

View File

@ -2,17 +2,23 @@ use chrono::NaiveDate;
use serde::Serialize;
use sqlx::SqlitePool;
use self::planned_event::PlannedEvent;
use self::{
planned_event::{PlannedEvent, PlannedEventWithUser},
trip::{Trip, TripWithUser},
};
pub mod planned_event;
pub mod trip;
pub mod tripdetails;
pub mod user;
pub mod usertrip;
//pub mod users;
#[derive(Serialize)]
pub struct Day {
day: NaiveDate,
planned_events: Vec<PlannedEvent>,
planned_events: Vec<PlannedEventWithUser>,
trips: Vec<TripWithUser>,
}
impl Day {
@ -20,6 +26,7 @@ impl Day {
Self {
day,
planned_events: PlannedEvent::get_for_day(db, day).await,
trips: Trip::get_for_day(db, day).await,
}
}
}