<?php

namespace App\Services\Customer;

use App\Entities\Customer\ServiceItemEntity;
use App\Models\Customer\ServiceItemModel;
use CodeIgniter\HTTP\IncomingRequest;

class ServiceItemService extends CustomerService
{
    protected ?IncomingRequest $request = null;
    public function __construct(?IncomingRequest $request = null)
    {
        parent::__construct($request);
        $this->addClassName('ServiceItem');
    }
    public function getModelClass(): ServiceItemModel
    {
        return new ServiceItemModel();
    }
    public function getEntityClass(): ServiceItemEntity
    {
        return new ServiceItemEntity();
    }
    public function getFormFields(): array
    {
        return [
            "serviceinfo_uid",
            "code",
            "item_type",
            "item_uid",
            "billing_cycle",
            "price",
            "amount",
            "start_at",
            "status",
        ];
    }
    public function getFilterFields(): array
    {
        return ["serviceinfo_uid", 'code', 'item_type', 'item_uid', 'billing_cycle', 'status'];
    }
    public function getBatchJobFields(): array
    {
        return ['status'];
    }
    public function getIndexFields(): array
    {
        return ['serviceinfo_uid', 'code', 'item_type', 'item_uid', 'billing_cycle', 'price', 'amount', 'start_at', 'status'];
    }
}
