Dtos still missing

This commit is contained in:
Franklin 2023-03-15 09:13:12 -04:00
parent 3695967ec9
commit c938e84990
3 changed files with 7 additions and 3 deletions

View File

@ -2,7 +2,7 @@ use chrono::{DateTime, Utc};
use serde::{Serialize, Deserialize};
use uuid::Uuid;
use super::{media::MediaList, project_type::ProjectType};
use super::{media::MediaList, project_type::ProjectType, project_condition::ProjectCondition};
#[derive(Serialize, Deserialize, Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub struct Project {
@ -10,6 +10,8 @@ pub struct Project {
#[serde(rename = "projectType")]
pub project_type: ProjectType,
#[serde(rename = "projectCondition")]
pub project_condition: ProjectCondition,
#[serde(rename = "agentId")]
pub agent_id: Uuid,

View File

@ -7,8 +7,9 @@ use super::error::Error;
#[cfg(feature = "sqlx")]
pub mod impls;
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
#[derive(Serialize, Deserialize, Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub enum ProjectCondition {
#[default]
New,
Resale,
}

View File

@ -1,6 +1,6 @@
use serde::{Deserialize, Serialize};
use crate::domain::project_type::ProjectType;
use crate::domain::{project_type::ProjectType, project_condition::ProjectCondition};
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, PartialOrd)]
@ -13,4 +13,5 @@ pub enum Filter {
Finished,
ByProjectType(ProjectType),
ByProjectCondition(ProjectCondition),
}