use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use utoipa::ToSchema; use uuid::Uuid; #[derive(Debug, Serialize, Deserialize, ToSchema, utoipa::IntoParams)] pub struct CategoryQueryParams { pub server_id: Option, } impl Default for CategoryQueryParams { fn default() -> Self { Self { server_id: None, } } } #[derive(Debug, Serialize, Deserialize, ToSchema)] pub struct CreateCategoryRequest { pub server_id: Uuid, #[schema(example = "Discussion")] pub name: String, } #[derive(Debug, Serialize, Deserialize, ToSchema)] pub struct UpdateCategoryRequest { #[schema(example = "Discussion (Maj)")] pub name: String, } #[derive(Debug, Serialize, Deserialize, ToSchema)] pub struct CategoryResponse { pub id: Uuid, pub server_id: Uuid, pub name: String, pub created_at: DateTime, pub updated_at: DateTime, }