// 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 ModelLimits {
    pub search_enabled: bool,

    pub max_model_definitions: u8,
    pub max_model_fields: u8,

    pub max_item_size: u64,
    pub max_field_size: u64,
}

impl Default for ModelLimits {
    fn default() -> Self {
        Self {
            search_enabled: true,

            max_model_definitions: 255,
            max_model_fields: 255,

            max_item_size: 400_000,
            max_field_size: 100_000,
        }
    }
}
