19 lines
337 B
Rust
19 lines
337 B
Rust
|
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,
|
||
|
}
|
||
|
}
|
||
|
}
|