Types v1
This commit is contained in:
parent
c6b524d7b1
commit
ed8e9af9d9
|
@ -16,7 +16,6 @@ pub struct Agent {
|
||||||
#[serde(rename = "credentialType")]
|
#[serde(rename = "credentialType")]
|
||||||
pub credential_type: CredentialType,
|
pub credential_type: CredentialType,
|
||||||
|
|
||||||
|
|
||||||
#[serde(rename = "timeCreated")]
|
#[serde(rename = "timeCreated")]
|
||||||
pub time_created: DateTime<Utc>,
|
pub time_created: DateTime<Utc>,
|
||||||
#[serde(rename = "lastUpdated")]
|
#[serde(rename = "lastUpdated")]
|
||||||
|
|
|
@ -2,12 +2,15 @@ use chrono::{DateTime, Utc};
|
||||||
use serde::{Serialize, Deserialize};
|
use serde::{Serialize, Deserialize};
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
use super::media::MediaList;
|
use super::{media::MediaList, project_type::ProjectType};
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord)]
|
#[derive(Serialize, Deserialize, Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord)]
|
||||||
pub struct Project {
|
pub struct Project {
|
||||||
pub id: Uuid,
|
pub id: Uuid,
|
||||||
|
|
||||||
|
#[serde(rename = "projectType")]
|
||||||
|
pub project_type: ProjectType,
|
||||||
|
|
||||||
#[serde(rename = "agentId")]
|
#[serde(rename = "agentId")]
|
||||||
pub agent_id: Uuid,
|
pub agent_id: Uuid,
|
||||||
#[serde(rename = "locationId")]
|
#[serde(rename = "locationId")]
|
||||||
|
@ -17,6 +20,9 @@ pub struct Project {
|
||||||
pub title: Option<String>,
|
pub title: Option<String>,
|
||||||
pub description: String,
|
pub description: String,
|
||||||
|
|
||||||
|
#[serde(rename = "adminTag", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub admin_tag: Option<String>,
|
||||||
|
|
||||||
/// Amount of floors the building/house has
|
/// Amount of floors the building/house has
|
||||||
pub floors: i16,
|
pub floors: i16,
|
||||||
pub media: MediaList,
|
pub media: MediaList,
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
use crate::domain::project_type::ProjectType;
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, PartialOrd)]
|
||||||
|
pub enum Filter {
|
||||||
|
CheaperThan(f64),
|
||||||
|
MoreExpensiveThan(f64),
|
||||||
|
|
||||||
|
InCity(String),
|
||||||
|
InDistrict(String),
|
||||||
|
|
||||||
|
Finished,
|
||||||
|
ByProjectType(ProjectType),
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
pub mod filters;
|
Loading…
Reference in New Issue