jl-types-rs/src/domain/project.rs

28 lines
805 B
Rust
Raw Normal View History

2023-03-15 00:57:57 +00:00
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>,
}