Changes to types

This commit is contained in:
Franklin 2023-05-04 11:25:57 -04:00
parent 3cdcfa32ec
commit 7f6e33eeb9
3 changed files with 7 additions and 5 deletions

View File

@ -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<String>,
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<Utc>,
#[serde(rename = "lastUpdated")]

View File

@ -31,6 +31,8 @@ pub struct Property {
pub bathrooms: f32,
/// In meters squared
pub area: f32,
#[serde(rename = "adminTag")]
pub admin_tag: Option<String>,
#[serde(rename = "timeCreated")]
pub time_created: DateTime<Utc>,
#[serde(rename = "lastUpdated")]

View File

@ -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<Utc>,