This commit is contained in:
2026-05-16 17:57:54 +02:00
parent 1a2ec26f27
commit b2cefb7d66
55 changed files with 1654 additions and 334 deletions
+36 -6
View File
@@ -1,10 +1,40 @@
use crate::models::channel::ChannelType;
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;
use uuid::Uuid;
#[derive(Debug, Serialize, Deserialize)]
pub struct CreateChannelRequest {}
#[derive(Debug, Serialize, Deserialize, ToSchema)]
pub struct CreateChannelRequest {
pub server_id: Option<Uuid>,
pub category_id: Option<Uuid>,
#[serde(default)]
pub position: i32,
pub channel_type: ChannelType,
#[schema(example = "général")]
pub name: Option<String>,
pub default_permissions: Option<u64>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct UpdateChannelRequest {}
#[derive(Debug, Serialize, Deserialize, ToSchema)]
pub struct UpdateChannelRequest {
pub server_id: Option<Uuid>,
pub category_id: Option<Uuid>,
pub position: i32,
pub channel_type: ChannelType,
pub name: Option<String>,
pub default_permissions: Option<u64>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct ChannelResponse {}
#[derive(Debug, Serialize, Deserialize, ToSchema)]
pub struct ChannelResponse {
pub id: Uuid,
pub server_id: Option<Uuid>,
pub category_id: Option<Uuid>,
pub position: i32,
pub channel_type: ChannelType,
pub name: Option<String>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub default_permissions: Option<u64>,
}