//! Domain type representing a domain name with TLD components

use serde::{Deserialize, Serialize};

pub mod constructors;
pub mod methods;

/// Represents a domain name with its name and TLD components
///
/// A domain consists of two parts: the domain name (e.g., "example")
/// and the top-level domain (TLD, e.g., "com").
///
/// # Examples
///
/// ```
/// use lazydomain::types::Domain;
///
/// let domain = Domain::new("example", "com").unwrap();
/// assert_eq!(domain.to_fqdn(), "example.com");
/// ```
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct Domain {
    /// The domain name without TLD (e.g., "example")
    pub name: String,
    /// The top-level domain (e.g., "com")
    pub tld: String,
}
