From d4feab5b0894464201824031fb077724fba060a0 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 10 Aug 2019 17:38:21 +0200 Subject: Rename ScreeningRecord model to Screening --- src/models/screening.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/screening.rs b/src/models/screening.rs index feb98cc..b513362 100644 --- a/src/models/screening.rs +++ b/src/models/screening.rs @@ -35,7 +35,7 @@ pub struct NewScreening { #[derive(Deserialize, Identifiable, PartialEq, Serialize, Queryable)] #[table_name = "screenings"] -pub struct ScreeningRecord { +pub struct Screening { pub id: i32, pub film_id: i32, pub room_id: i32, @@ -56,7 +56,7 @@ pub struct AggregatedScreening { } impl AggregatedScreening { - pub fn from_query(s: Vec<(ScreeningRecord, Option, Option)>) -> Vec { + pub fn from_query(s: Vec<(Screening, Option, Option)>) -> Vec { s.iter().map(|(s, f, r)| { AggregatedScreening { id: s.id, -- cgit v1.2.3