dbmsv4/app/Controllers/Admin/Customer/ServiceController.php
2025-11-24 11:11:53 +09:00

38 lines
1.1 KiB
PHP

<?php
namespace App\Controllers\Admin\Customer;
use App\Entities\Customer\ServiceEntity;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;
class ServiceController extends CustomerController
{
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
if ($this->service === null) {
$this->service = service('customer_serviceservice');
}
$this->addActionPaths('service');
}
protected function getEntityClass(): string
{
return ServiceEntity::class;
}
//기본 함수 작업
//Custom 추가 함수
public function create_form_process(array $formDatas = []): array
{
$formDatas['location'] = 'chiba';
$formDatas['rack'] = '100000';
$formDatas['line'] = '300000';
$formDatas['type'] = 'normal';
$formDatas['billing_at'] = date("Y-m-d");
$formDatas['start_at'] = date("Y-m-d");
$formDatas['status'] = STATUS['AVAILABLE'];
return $formDatas;
}
}