From 6b2e978eeccb68b296def54a4d597dd887c18ea3 Mon Sep 17 00:00:00 2001 From: Franklin Date: Fri, 10 Mar 2023 06:03:40 -0400 Subject: [PATCH] publicized fields --- src/dto/payload/agent.rs | 8 ++++---- src/dto/payload/property.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dto/payload/agent.rs b/src/dto/payload/agent.rs index 22ad66b..ae48682 100644 --- a/src/dto/payload/agent.rs +++ b/src/dto/payload/agent.rs @@ -3,9 +3,9 @@ use serde::{Serialize, Deserialize}; use crate::domain::{agent::Agent, contact_info::ContactInformation}; #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, PartialOrd)] -pub struct AgentWithDetails { - agent: Agent, - contact_info: ContactInformation, +pub struct AgentWithContactInfo { + pub agent: Agent, + pub contact_info: ContactInformation, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, PartialOrd)] @@ -18,7 +18,7 @@ pub struct NewAgentPayload { pub profile_picture_url: Option, pub default_message: Option, } -impl From for AgentWithDetails { +impl From for AgentWithContactInfo { fn from(value: NewAgentPayload) -> Self { let agent = Agent::new_from_full_name(value.full_name); let agent_id = agent.id.clone(); diff --git a/src/dto/payload/property.rs b/src/dto/payload/property.rs index 283d2d6..af89dad 100644 --- a/src/dto/payload/property.rs +++ b/src/dto/payload/property.rs @@ -5,8 +5,8 @@ use crate::domain::{property_details::{ListingType, Photos, PropertyDetails}, pr #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, PartialOrd)] pub struct PropertyWithDetails { - property: Property, - details: PropertyDetails, + pub property: Property, + pub details: PropertyDetails, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, PartialOrd)]