43 lines
1.1 KiB
Rust
43 lines
1.1 KiB
Rust
use chrono::{DateTime, Utc};
|
|
use serde::{Deserialize, Serialize};
|
|
use utoipa::{IntoParams, ToSchema};
|
|
use uuid::Uuid;
|
|
|
|
#[derive(Debug, Deserialize, IntoParams, ToSchema)]
|
|
pub struct EmojiQueryParams {
|
|
pub server_id: Option<Uuid>,
|
|
}
|
|
|
|
#[derive(Debug, Deserialize, Serialize, ToSchema)]
|
|
pub struct CreateEmojiRequest {
|
|
pub server_id: Option<Uuid>,
|
|
pub emoji_type: String,
|
|
pub unicode_sequence: Option<String>,
|
|
pub aliases: Vec<String>,
|
|
pub mime_type: Option<String>,
|
|
pub is_animated: Option<bool>,
|
|
}
|
|
|
|
#[derive(Debug, Deserialize, Serialize, ToSchema)]
|
|
pub struct UpdateEmojiRequest {
|
|
pub aliases: Option<Vec<String>>,
|
|
pub server_id: Option<Uuid>,
|
|
pub unicode_sequence: Option<String>,
|
|
}
|
|
|
|
#[derive(Debug, Serialize, ToSchema)]
|
|
pub struct EmojiResponse {
|
|
pub id: Uuid,
|
|
pub server_id: Option<Uuid>,
|
|
pub emoji_type: String,
|
|
pub unicode_sequence: Option<String>,
|
|
pub aliases: Vec<String>,
|
|
pub asset_url: Option<String>,
|
|
pub mime_type: Option<String>,
|
|
pub file_size: Option<i64>,
|
|
pub is_animated: bool,
|
|
pub sha256: Option<String>,
|
|
pub created_at: DateTime<Utc>,
|
|
pub updated_at: DateTime<Utc>,
|
|
}
|