28 lines
805 B
Rust
28 lines
805 B
Rust
use chrono::{DateTime, Utc};
|
|
use serde::{Serialize, Deserialize};
|
|
use uuid::Uuid;
|
|
|
|
use super::media::MediaList;
|
|
|
|
#[derive(Serialize, Deserialize, Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord)]
|
|
pub struct Project {
|
|
pub id: Uuid,
|
|
|
|
#[serde(rename = "agentId")]
|
|
pub agent_id: Uuid,
|
|
#[serde(rename = "locationId")]
|
|
pub location_id: Uuid,
|
|
|
|
/// Title is optional as the agent can choose not to put the title there (in that case the title will be generated in the frontend)
|
|
pub title: Option<String>,
|
|
pub description: String,
|
|
|
|
/// Amount of floors the building/house has
|
|
pub floors: i16,
|
|
pub media: MediaList,
|
|
|
|
#[serde(rename = "timeCreated")]
|
|
pub time_created: DateTime<Utc>,
|
|
#[serde(rename = "lastUpdated")]
|
|
pub last_updated: DateTime<Utc>,
|
|
} |