59 lines
1.3 KiB
PHP
59 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Services\Equipment;
|
|
|
|
use App\Models\Equipment\PartModel;
|
|
|
|
class PartService extends EquipmentService
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct(new PartModel());
|
|
$this->addClassName('Part');
|
|
}
|
|
public function getFormFields(): array
|
|
{
|
|
return [
|
|
'fields' => [
|
|
"type",
|
|
"title",
|
|
"price",
|
|
"status",
|
|
],
|
|
'filters' => [
|
|
"type",
|
|
'status',
|
|
],
|
|
];
|
|
}
|
|
public function getIndexFields(): array
|
|
{
|
|
return [
|
|
'fields' => [
|
|
'type',
|
|
'title',
|
|
'price',
|
|
'status',
|
|
'created_at'
|
|
],
|
|
'filters' => [
|
|
"type",
|
|
'status',
|
|
],
|
|
];
|
|
}
|
|
public function getBatchjobFields(): array
|
|
{
|
|
return ['status'];
|
|
}
|
|
//기본 기능부분
|
|
//FieldForm관련용
|
|
//List 검색용
|
|
//OrderBy 처리
|
|
public function setOrderBy(mixed $field = null, mixed $value = null): void
|
|
{
|
|
$this->getModel()->orderBy('type ASC, title ASC');
|
|
parent::setOrderBy($field, $value);
|
|
}
|
|
}
|