como/como_gql/src/projects.rs

19 lines
337 B
Rust
Raw Normal View History

2022-10-04 22:39:57 +02:00
use async_graphql::SimpleObject;
use como_domain::projects::ProjectDto;
use uuid::Uuid;
#[derive(SimpleObject)]
pub struct Project {
pub id: Uuid,
pub name: String,
}
impl From<ProjectDto> for Project {
fn from(dto: ProjectDto) -> Self {
Self {
id: dto.id,
name: dto.name,
}
}
}