<?php

namespace App\Services\Equipment\Part;

use App\Entities\Equipment\Part\DomainEntity;
use App\Models\Equipment\Part\DomainModel;

class DomainService extends PartService
{
    public function __construct()
    {
        parent::__construct();
        $this->addClassName('Domain');
    }
    public function getModelClass(): DomainModel
    {
        return new DomainModel();
    }
    public function getEntityClass(): DomainEntity
    {
        return new DomainEntity();
    }
    public function getFormFields(): array
    {
        return [
            "domain",
            "status",
        ];
    }
    public function getFilterFields(): array
    {
        return ['status',];
    }
    public function getBatchJobFields(): array
    {
        return ['status'];
    }

    public function getIndexFields(): array
    {
        return ['domain', 'status'];
    }
    //List 검색용
    //OrderBy 처리
    public function setOrderBy(mixed $field = null, mixed $value = null): void
    {
        $this->getModel()->orderBy('domain', 'ASC');
        parent::setOrderBy($field, $value);
    }
}
