use crate::models::channel::ChannelType; use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use utoipa::ToSchema; use uuid::Uuid; #[derive(Debug, Serialize, Deserialize, ToSchema)] pub struct CreateChannelRequest { pub server_id: Option, pub category_id: Option, #[serde(default)] pub position: i32, pub channel_type: ChannelType, #[schema(example = "général")] pub name: Option, } #[derive(Debug, Serialize, Deserialize, ToSchema)] pub struct UpdateChannelRequest { pub server_id: Option, pub category_id: Option, pub position: i32, pub channel_type: ChannelType, pub name: Option, } #[derive(Debug, Serialize, Deserialize, ToSchema)] pub struct ChannelResponse { pub id: Uuid, pub server_id: Option, pub category_id: Option, pub position: i32, pub channel_type: ChannelType, pub name: Option, pub created_at: DateTime, pub updated_at: DateTime, }