Source
xxxxxxxxxx
<?php declare(strict_types = 0);
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
/**
* Class containing information about system settings.
*/
final class CSettingsSchema {
public const DB_FIELD_TYPES = [
/*
* Mismatch with TEXT column type intentional. Since fields configurable by the API don't contain long values,
* they are validated as CHARs and length is checked.
*/
'value_str' => DB::FIELD_TYPE_CHAR,
'value_int' => DB::FIELD_TYPE_INT,
'value_usrgrpid' => DB::FIELD_TYPE_ID,
'value_hostgroupid' => DB::FIELD_TYPE_ID,
'value_userdirectoryid' => DB::FIELD_TYPE_ID,
'value_mfaid' => DB::FIELD_TYPE_ID
];
public const PARAMETERS = [
'alert_usrgrpid' => [
'column' => 'value_usrgrpid'
],
'auditlog_enabled' => [
'column' => 'value_int',
'default' => 1
],
'auditlog_mode' => [
'column' => 'value_int',
'default' => 1
],
'authentication_type' => [
'column' => 'value_int',
'default' => 0
],
'autoreg_tls_accept' => [
'column' => 'value_int',
'default' => 1
],
'blink_period' => [
'column' => 'value_str',
'default' => '2m',
'length' => 32
],
'compress_older' => [
'column' => 'value_str',
'default' => '7d',
'length' => 32
],
'compression_status' => [
'column' => 'value_int',
'default' => 0
],
'connect_timeout' => [
'column' => 'value_str',
'default' => '3s',
'length' => 32
],
'custom_color' => [
'column' => 'value_int',
'default' => 0
],
'db_extension' => [
'column' => 'value_str',
'default' => '',
'length' => 32
],
'dbversion_status' => [
'column' => 'value_str',
'default' => '',
'length' => 65
],
'default_inventory_mode' => [
'column' => 'value_int',
'default' => HOST_INVENTORY_DISABLED
],