52 lines
1.1 KiB
PHP
52 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Services\Equipment;
|
|
|
|
use App\Entities\Equipment\ServerEntity;
|
|
use App\Models\Equipment\ServerModel;
|
|
use App\Services\Equipment\EquipmentService;
|
|
|
|
class ServerService extends EquipmentService
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->addClassName('Server');
|
|
}
|
|
public function getModelClass(): ServerModel
|
|
{
|
|
return new ServerModel();
|
|
}
|
|
public function getEntityClass(): ServerEntity
|
|
{
|
|
return new ServerEntity();
|
|
}
|
|
public function getFormFields(): array
|
|
{
|
|
return [
|
|
"model",
|
|
"status",
|
|
"description",
|
|
];
|
|
}
|
|
public function getFilterFields(): array
|
|
{
|
|
return ['status'];
|
|
}
|
|
public function getBatchJobFields(): array
|
|
{
|
|
return ['status'];
|
|
}
|
|
public function getIndexFields(): array
|
|
{
|
|
return ['model', 'status'];
|
|
}
|
|
//List 검색용
|
|
//OrderBy 처리
|
|
public function setOrderBy(mixed $field = null, mixed $value = null): void
|
|
{
|
|
$this->getModel()->orderBy('model', 'ASC');
|
|
parent::setOrderBy($field, $value);
|
|
}
|
|
}
|