46 lines
1.0 KiB
PHP
46 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Services\Equipment;
|
|
|
|
use App\Entities\Equipment\CSEntity;
|
|
use App\Models\Equipment\CSModel;
|
|
|
|
class CSService extends EquipmentService
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct(new CSModel());
|
|
$this->addClassName('Defence');
|
|
}
|
|
public function getFormFields(): array
|
|
{
|
|
return [
|
|
"type",
|
|
"ip",
|
|
"accountid",
|
|
"domain",
|
|
"status",
|
|
"description",
|
|
];
|
|
}
|
|
public function getFilterFields(): array
|
|
{
|
|
return ["type", 'status'];
|
|
}
|
|
public function getBatchJobFields(): array
|
|
{
|
|
return ["type", 'status'];
|
|
}
|
|
public function getIndexFields(): array
|
|
{
|
|
return ['type', 'ip', 'accountid', 'domain', 'status'];
|
|
}
|
|
//List 검색용
|
|
//OrderBy 처리
|
|
public function setOrderBy(mixed $field = null, mixed $value = null): void
|
|
{
|
|
$this->getModel()->orderBy('INET_ATON(ip)', 'ASC');
|
|
parent::setOrderBy($field, $value);
|
|
}
|
|
}
|