diff --git a/src/domain/project.rs b/src/domain/project.rs index b3a0cf9..8ac5465 100644 --- a/src/domain/project.rs +++ b/src/domain/project.rs @@ -1,4 +1,4 @@ -use chrono::{DateTime, Utc}; +use chrono::{DateTime, Utc, NaiveDateTime}; use serde::{Serialize, Deserialize}; use uuid::Uuid; @@ -21,6 +21,11 @@ pub struct Project { pub country: String, pub city: String, pub district: String, + #[serde(rename = "adminTag", skip_serializing_if = "Option::is_none")] + pub admin_tag: Option, + pub floors: i16, + #[serde(rename = "finishDate")] + pub finish_date: NaiveDateTime, /// This gives the realtor the option to order the projects/properties. On birth, #[serde(rename = "orderIndex")] pub order_index: u16, diff --git a/src/domain/property.rs b/src/domain/property.rs index e517525..7ddb1cc 100644 --- a/src/domain/property.rs +++ b/src/domain/property.rs @@ -5,7 +5,7 @@ use uuid::Uuid; use super::{media::MediaList, property_type::PropertyType, property_sale_type::PropertySaleType}; /// A property can belong to a project, or not. It should always belong to a realtor. -#[derive(Serialize, Deserialize, Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord)] +#[derive(Serialize, Deserialize, Debug, Default, Clone, PartialEq, PartialOrd)] pub struct Property { pub id: Uuid, #[serde(rename = "projectId")] @@ -23,6 +23,14 @@ pub struct Property { pub city: Option, #[serde(skip_serializing_if = "Option::is_none")] pub district: Option, + #[serde(rename = "priceUsd")] + pub price_usd: f64, + /// Amount of rooms in unit + pub rooms: i16, + /// Amount of bathrooms in unit + pub bathrooms: f32, + /// In meters squared + pub area: f32, #[serde(rename = "timeCreated")] pub time_created: DateTime, #[serde(rename = "lastUpdated")]