aboutsummaryrefslogtreecommitdiffstats
path: root/src/models
diff options
context:
space:
mode:
Diffstat (limited to 'src/models')
-rw-r--r--src/models/screening.rs16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/models/screening.rs b/src/models/screening.rs
index b111218..1426605 100644
--- a/src/models/screening.rs
+++ b/src/models/screening.rs
@@ -28,9 +28,8 @@ joinable!(screenings -> films (film_id));
pub struct NewScreening {
pub film_id: i32,
pub room_id: i32,
- pub date: chrono::NaiveDate,
- pub start_time: chrono::NaiveTime,
- pub end_time: chrono::NaiveTime,
+ pub start_time: chrono::DateTime<chrono::Utc>,
+ pub end_time: chrono::DateTime<chrono::Utc>,
}
#[derive(Deserialize, Identifiable, PartialEq, Serialize, Queryable)]
@@ -39,9 +38,8 @@ pub struct Screening {
pub id: i32,
pub film_id: i32,
pub room_id: i32,
- pub date: chrono::NaiveDate,
- pub start_time: chrono::NaiveTime,
- pub end_time: chrono::NaiveTime,
+ pub start_time: chrono::DateTime<chrono::Utc>,
+ pub end_time: chrono::DateTime<chrono::Utc>,
}
/// Aggregate screening, room and film info into one struct.
@@ -50,9 +48,8 @@ pub struct AggregatedScreening {
pub id: i32,
pub film: Film,
pub room: Room,
- pub date: chrono::NaiveDate,
- pub start_time: chrono::NaiveTime,
- pub end_time: chrono::NaiveTime,
+ pub start_time: chrono::DateTime<chrono::Utc>,
+ pub end_time: chrono::DateTime<chrono::Utc>,
}
impl AggregatedScreening {
@@ -62,7 +59,6 @@ impl AggregatedScreening {
id: s.id,
film: f.as_ref().unwrap().clone().to_owned(),
room: r.as_ref().unwrap().clone().to_owned(),
- date: s.date,
start_time: s.start_time,
end_time: s.end_time,
}