icingadb-web/library/Icingadb/Model/CheckcommandArgument.php
2020-03-13 10:36:24 +01:00

46 lines
1,003 B
PHP

<?php
/* Icinga DB Web | (c) 2020 Icinga GmbH | GPLv2 */
namespace Icinga\Module\Icingadb\Model;
use ipl\Orm\Model;
use ipl\Orm\Relations;
class CheckcommandArgument extends Model
{
public function getTableName()
{
return 'checkcommand_argument';
}
public function getKeyName()
{
return 'id';
}
public function getColumns()
{
return [
'command_id',
'argument_key',
'environment_id',
'properties_checksum',
'argument_value',
'argument_order',
'description',
'argument_key_override',
'repeat_key',
'required',
'set_if',
'skip_key'
];
}
public function createRelations(Relations $relations)
{
$relations->belongsTo('environment', Environment::class);
$relations->belongsTo('checkcommand', CheckCommand::class)
->setCandidateKey('command_id');
}
}