icingadb-web/library/Icingadb/Model/CheckcommandArgument.php

93 lines
2.7 KiB
PHP
Raw Normal View History

2019-09-23 09:31:18 -04:00
<?php
2020-03-13 03:38:01 -04:00
/* Icinga DB Web | (c) 2020 Icinga GmbH | GPLv2 */
2019-11-04 19:07:30 -05:00
namespace Icinga\Module\Icingadb\Model;
2019-09-23 09:31:18 -04:00
use Icinga\Module\Icingadb\Common\Model;
use ipl\Orm\Behavior\Binary;
2022-03-29 09:27:18 -04:00
use ipl\Orm\Behaviors;
2019-09-23 09:31:18 -04:00
use ipl\Orm\Relations;
/**
* @property string $id
* @property string $checkcommand_id
* @property string $argument_key
* @property string $environment_id
* @property string $properties_checksum
* @property ?string $argument_value
* @property ?int $argument_order
* @property ?string $description
* @property ?string $argument_key_override
* @property string $repeat_key
* @property string $required
* @property ?string $set_if
2024-03-14 06:52:09 -04:00
* @property ?string $separator
* @property string $skip_key
*/
2019-09-23 09:31:18 -04:00
class CheckcommandArgument extends Model
{
public function getTableName()
{
return 'checkcommand_argument';
}
public function getKeyName()
{
return 'id';
}
public function getColumns()
{
return [
'checkcommand_id',
2019-09-23 09:31:18 -04:00
'argument_key',
'environment_id',
'properties_checksum',
'argument_value',
'argument_order',
'description',
'argument_key_override',
'repeat_key',
'required',
'set_if',
2024-03-14 06:52:09 -04:00
'separator',
2019-09-23 09:31:18 -04:00
'skip_key'
];
}
public function getColumnDefinitions()
{
return [
2022-07-11 11:31:53 -04:00
'checkcommand_id' => t('Checkcommand Id'),
2022-07-14 09:42:24 -04:00
'argument_key' => t('Checkcommand Argument Name'),
2022-07-11 11:31:53 -04:00
'environment_id' => t('Environment Id'),
'properties_checksum' => t('Checkcommand Argument Properties Checksum'),
'argument_value' => t('Checkcommand Argument Value'),
2022-07-14 09:42:24 -04:00
'argument_order' => t('Checkcommand Argument Position'),
'description' => t('Checkcommand Argument Description'),
2022-07-14 09:42:24 -04:00
'argument_key_override' => t('Checkcommand Argument Actual Name'),
'repeat_key' => t('Checkcommand Argument Repeated'),
'required' => t('Checkcommand Argument Required'),
2022-07-14 09:42:24 -04:00
'set_if' => t('Checkcommand Argument Condition'),
'skip_key' => t('Checkcommand Argument Without Name')
];
}
2022-03-29 09:27:18 -04:00
public function createBehaviors(Behaviors $behaviors)
{
$behaviors->add(new Binary([
'id',
'checkcommand_id',
'environment_id',
'properties_checksum'
]));
}
2019-09-23 09:31:18 -04:00
public function createRelations(Relations $relations)
{
$relations->belongsTo('environment', Environment::class);
2023-08-16 10:48:57 -04:00
$relations->belongsTo('checkcommand', Checkcommand::class);
2019-09-23 09:31:18 -04:00
}
}