<?php

namespace App\Controllers\Admin\Equipment\Part;

use App\Controllers\Admin\Equipment\EquipmentController;

use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;

abstract class PartController extends EquipmentController
{
    public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
    {
        parent::initController($request, $response, $logger);
    }

    protected function setOrderByForList()
    {
        //OrderBy 처리
        $this->getService()->getModel()->orderBy('model', 'ASC', false);
        parent::setOrderByForList();
    }
    protected function index_process(): array
    {
        $fields = [
            'fields' => ['model', 'status'],
        ];
        $this->init('index',  $fields);
        return parent::index_process();
    }
}
