52 lines
1.2 KiB
PHP
52 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Services\Equipment\Part;
|
|
|
|
use App\Entities\Equipment\Part\SoftwareEntity;
|
|
use App\Models\Equipment\Part\SoftwareModel;
|
|
|
|
class SoftwareService extends PartService
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->addClassName('Software');
|
|
}
|
|
public function getModelClass(): SoftwareModel
|
|
{
|
|
return new SoftwareModel();
|
|
}
|
|
public function getEntityClass(): SoftwareEntity
|
|
{
|
|
return new SoftwareEntity();
|
|
}
|
|
public function getFormFields(): array
|
|
{
|
|
return [
|
|
"type",
|
|
"model",
|
|
"status",
|
|
"description",
|
|
];
|
|
}
|
|
public function getFilterFields(): array
|
|
{
|
|
return ['type', 'status'];
|
|
}
|
|
public function getBatchJobFields(): array
|
|
{
|
|
return ['type', 'status'];
|
|
}
|
|
public function getIndexFields(): array
|
|
{
|
|
return ['type', 'model', 'status'];
|
|
}
|
|
//List 검색용
|
|
//OrderBy 처리
|
|
public function setOrderBy(string $field, $value): void
|
|
{
|
|
$this->getModel()->orderBy('model', 'ASC', false);
|
|
parent::setOrderBy($field, $value);
|
|
}
|
|
}
|