48 lines
1.1 KiB
PHP
48 lines
1.1 KiB
PHP
<?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 getFields(): array
|
|
{
|
|
return [
|
|
"clientinfo_uid",
|
|
"type",
|
|
"rack",
|
|
"lineinfo_uid",
|
|
"serverinfo_uid",
|
|
"billing_at",
|
|
"start_at",
|
|
"end_at",
|
|
"status",
|
|
];
|
|
}
|
|
public function getFilterFields(): array
|
|
{
|
|
return ["clientinfo_uid", "lineinfo_uid", "serverinfo_uid", 'type', 'status'];
|
|
}
|
|
public function getBatchJobFields(): array
|
|
{
|
|
return ['type', 'status'];
|
|
}
|
|
}
|