publicized fields
This commit is contained in:
parent
2d9dd6e9a9
commit
6b2e978eec
@ -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();
|
||||
|
@ -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)]
|
||||
|
Loading…
Reference in New Issue
Block a user