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

    pub max_content_definitions: u8,
    pub max_content_fields: u8,

    pub max_store_size: u64,
    pub max_object_size: u64,
    pub max_field_size: u64,
}

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

            max_content_definitions: 255,
            max_content_fields: 255,

            max_store_size: 10_000_000,
            max_object_size: 400_000,
            max_field_size: 200_000,
        }
    }
}
