como/como_domain/src/item/mod.rs

24 lines
501 B
Rust
Raw Normal View History

2022-10-04 22:39:57 +02:00
pub mod queries;
2022-10-03 22:20:01 +02:00
pub mod requests;
pub mod responses;
use async_graphql::{Enum, InputObject};
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 22:39:57 +02:00
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, InputObject)]
2022-10-03 22:20:01 +02:00
pub struct ItemDto {
pub id: Uuid,
pub title: String,
pub description: Option<String>,
pub state: ItemState,
}