publicized fields

This commit is contained in:
Franklin 2023-03-10 06:03:40 -04:00
parent 2d9dd6e9a9
commit 6b2e978eec
2 changed files with 6 additions and 6 deletions

View File

@ -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<String>,
pub default_message: Option<String>,
}
impl From<NewAgentPayload> for AgentWithDetails {
impl From<NewAgentPayload> for AgentWithContactInfo {
fn from(value: NewAgentPayload) -> Self {
let agent = Agent::new_from_full_name(value.full_name);
let agent_id = agent.id.clone();

View File

@ -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)]