<?php

namespace App\Services\Customer;

use App\Entities\Customer\ServiceEntity;
use App\Models\Customer\ServiceModel;
use CodeIgniter\HTTP\IncomingRequest;

class ServiceService extends CustomerService
{
    protected ?IncomingRequest $request = null;
    public function __construct(?IncomingRequest $request = null)
    {
        parent::__construct($request);
        $this->addClassName('Service');
    }
    public function getModelClass(): ServiceModel
    {
        return new ServiceModel();
    }
    public function getEntityClass(): ServiceEntity
    {
        return new ServiceEntity();
    }
    public function getFormFields(): array
    {
        return [
            "clientinfo_uid",
            "switch",
            "location",
            "type",
            "raid",
            "billing_at",
            "start_at",
            "end_at",
            "status"
        ];
    }
    public function getFilterFields(): array
    {
        return ["clientinfo_uid", 'location', 'switch', 'type', 'raid', 'status'];
    }
    public function getBatchJobFields(): array
    {
        return ['status'];
    }
    public function getIndexFields(): array
    {
        return ['clientinfo_uid', 'location', 'switch', 'type', 'raid', 'billing_at', 'start_at', 'status'];
    }
}
