From 7f6e33eeb93238f3cc3638a8694a258d9d64cd11 Mon Sep 17 00:00:00 2001 From: Franklin Date: Thu, 4 May 2023 11:25:57 -0400 Subject: [PATCH] Changes to types --- src/domain/project.rs | 6 +++--- src/domain/property.rs | 2 ++ src/domain/trackable.rs | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/domain/project.rs b/src/domain/project.rs index 8ac5465..9a4e20e 100644 --- a/src/domain/project.rs +++ b/src/domain/project.rs @@ -1,4 +1,4 @@ -use chrono::{DateTime, Utc, NaiveDateTime}; +use chrono::{DateTime, Utc, NaiveDate}; use serde::{Serialize, Deserialize}; use uuid::Uuid; @@ -25,10 +25,10 @@ pub struct Project { pub admin_tag: Option, pub floors: i16, #[serde(rename = "finishDate")] - pub finish_date: NaiveDateTime, + pub finish_date: NaiveDate, /// This gives the realtor the option to order the projects/properties. On birth, #[serde(rename = "orderIndex")] - pub order_index: u16, + pub order_index: i32, #[serde(rename = "timeCreated")] pub time_created: DateTime, #[serde(rename = "lastUpdated")] diff --git a/src/domain/property.rs b/src/domain/property.rs index 7ddb1cc..d56bbde 100644 --- a/src/domain/property.rs +++ b/src/domain/property.rs @@ -31,6 +31,8 @@ pub struct Property { pub bathrooms: f32, /// In meters squared pub area: f32, + #[serde(rename = "adminTag")] + pub admin_tag: Option, #[serde(rename = "timeCreated")] pub time_created: DateTime, #[serde(rename = "lastUpdated")] diff --git a/src/domain/trackable.rs b/src/domain/trackable.rs index fcfc495..9dd6134 100644 --- a/src/domain/trackable.rs +++ b/src/domain/trackable.rs @@ -14,10 +14,10 @@ pub struct Trackable { pub ip_address: String, /// Used to determine on what device the user is #[serde(rename = "browserWidth")] - pub browser_width: u32, + pub browser_width: i32, /// Used to determine on what device the user is #[serde(rename = "browserWidth")] - pub browser_height: u32, + pub browser_height: i32, #[serde(rename = "userAgent")] pub user_agent: String, pub time_created: DateTime,