use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use sqlx::FromRow;
use uuid::Uuid;

#[derive(Debug, Clone, Serialize, Deserialize, FromRow)]
pub struct Tag {
    pub id: Uuid,
    pub name: String,
    pub created_at: DateTime<Utc>,
}

/// Tag embedded on a manga payload, including the user who attached it
/// so the UI can render a remove button only to them.
#[derive(Debug, Clone, Serialize, FromRow)]
pub struct TagRef {
    pub id: Uuid,
    pub name: String,
    pub added_by: Option<Uuid>,
}
