// Copyright (C) 2026 Ordinary Labs, LLC.
//
// SPDX-License-Identifier: AGPL-3.0-only

use serde::{Deserialize, Serialize};

#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
#[cfg_attr(feature = "docs", derive(schemars::JsonSchema))]
#[derive(Deserialize, Serialize, Debug, Clone)]
pub struct TemplateLimits {
    /// Max number of templates per app.
    pub count: u8,

    /// Template request timeout.
    ///
    /// Unit: seconds.
    pub max_timeout: u16,
}

impl Default for TemplateLimits {
    fn default() -> Self {
        Self {
            count: 255,
            max_timeout: 10,
        }
    }
}
