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;
|
|
|
|
|
2023-05-27 13:12:29 +02:00
|
|
|
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,
|
2023-05-28 17:17:22 +02:00
|
|
|
pub project_id: Uuid,
|
2022-10-03 22:20:01 +02:00
|
|
|
}
|