como/como_domain/src/item/mod.rs

23 lines
512 B
Rust
Raw Normal View History

2022-10-03 22:20:01 +02:00
pub mod requests;
pub mod responses;
2022-10-04 11:06:48 +02:00
use async_graphql::{Enum, InputObject, SimpleObject};
2022-10-03 22:20:01 +02:00
use serde::{Deserialize, Serialize};
use uuid::Uuid;
2022-10-04 11:06:48 +02:00
#[derive(Debug, Deserialize, Serialize, Clone, PartialEq, Eq, Enum, Copy)]
2022-10-03 22:20:01 +02:00
pub enum ItemState {
Created,
Done,
Archived,
Deleted,
}
2022-10-04 11:06:48 +02:00
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, InputObject, SimpleObject)]
2022-10-03 22:20:01 +02:00
pub struct ItemDto {
pub id: Uuid,
pub title: String,
pub description: Option<String>,
pub state: ItemState,
}