dbms_init...1
This commit is contained in:
parent
d54cd661c7
commit
ee19be3186
@ -150,6 +150,19 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
|
||||
});
|
||||
});
|
||||
$routes->group('equipment', ['namespace' => 'App\Controllers\Admin\Equipment'], function ($routes) {
|
||||
$routes->group('switch', ['namespace' => 'App\Controllers\Admin\Equipment'], function ($routes) {
|
||||
$routes->get('/', 'SwitchController::index', []);
|
||||
$routes->get('create', 'SwitchController::create_form');
|
||||
$routes->post('create', 'SwitchController::create');
|
||||
$routes->get('modify/(:alphanum)', 'SwitchController::modify_form/$1');
|
||||
$routes->post('modify/(:alphanum)', 'SwitchController::modify/$1');
|
||||
$routes->get('view/(:alphanum)', 'SwitchController::view/$1');
|
||||
$routes->get('delete/(:alphanum)', 'SwitchController::delete/$1');
|
||||
$routes->get('toggle/(:alphanum)/(:any)', 'SwitchController::toggle/$1/$2');
|
||||
$routes->post('batchjob', 'SwitchController::batchjob');
|
||||
$routes->post('batchjob_delete', 'SwitchController::batchjob_delete');
|
||||
$routes->get('download/(:alpha)', 'SwitchController::download/$1');
|
||||
});
|
||||
$routes->group('code', ['namespace' => 'App\Controllers\Admin\Equipment'], function ($routes) {
|
||||
$routes->get('/', 'CodeController::index', []);
|
||||
$routes->get('create', 'CodeController::create_form');
|
||||
@ -176,19 +189,6 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
|
||||
$routes->post('batchjob_delete', 'ServerController::batchjob_delete');
|
||||
$routes->get('download/(:alpha)', 'ServerController::download/$1');
|
||||
});
|
||||
$routes->group('domain', ['namespace' => 'App\Controllers\Admin\Equipment'], function ($routes) {
|
||||
$routes->get('/', 'DomainController::index', []);
|
||||
$routes->get('create', 'DomainController::create_form');
|
||||
$routes->post('create', 'DomainController::create');
|
||||
$routes->get('modify/(:num)', 'DomainController::modify_form/$1');
|
||||
$routes->post('modify/(:num)', 'DomainController::modify/$1');
|
||||
$routes->get('view/(:num)', 'DomainController::view/$1');
|
||||
$routes->get('delete/(:num)', 'DomainController::delete/$1');
|
||||
$routes->get('toggle/(:num)/(:any)', 'DomainController::toggle/$1/$2');
|
||||
$routes->post('batchjob', 'DomainController::batchjob');
|
||||
$routes->post('batchjob_delete', 'DomainController::batchjob_delete');
|
||||
$routes->get('download/(:alpha)', 'DomainController::download/$1');
|
||||
});
|
||||
$routes->group('part', ['namespace' => 'App\Controllers\Admin\Equipment\Part'], function ($routes) {
|
||||
$routes->group('line', ['namespace' => 'App\Controllers\Admin\Equipment\Part'], function ($routes) {
|
||||
$routes->get('/', 'LineController::index', []);
|
||||
@ -272,6 +272,19 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
|
||||
$routes->get('delete/(:num)', 'StorageController::delete/$1');
|
||||
$routes->get('toggle/(:num)/(:any)', 'StorageController::toggle/$1/$2');
|
||||
});
|
||||
$routes->group('domain', ['namespace' => 'App\Controllers\Admin\Equipment\Part'], function ($routes) {
|
||||
$routes->get('/', 'DomainController::index', []);
|
||||
$routes->get('create', 'DomainController::create_form');
|
||||
$routes->post('create', 'DomainController::create');
|
||||
$routes->get('modify/(:num)', 'DomainController::modify_form/$1');
|
||||
$routes->post('modify/(:num)', 'DomainController::modify/$1');
|
||||
$routes->get('view/(:num)', 'DomainController::view/$1');
|
||||
$routes->get('delete/(:num)', 'DomainController::delete/$1');
|
||||
$routes->get('toggle/(:num)/(:any)', 'DomainController::toggle/$1/$2');
|
||||
$routes->post('batchjob', 'DomainController::batchjob');
|
||||
$routes->post('batchjob_delete', 'DomainController::batchjob_delete');
|
||||
$routes->get('download/(:alpha)', 'DomainController::download/$1');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -30,7 +30,7 @@ class AccountController extends CustomerController
|
||||
public function getHelper(): AccountHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new AccountHelper($this->request);
|
||||
$this->_helper = new AccountHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ class ClientController extends CustomerController
|
||||
public function getHelper(): ClientHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new ClientHelper($this->request);
|
||||
$this->_helper = new ClientHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ class CouponController extends CustomerController
|
||||
public function getHelper(): CouponHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new CouponHelper($this->request);
|
||||
$this->_helper = new CouponHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ class PointController extends CustomerController
|
||||
public function getHelper(): PointHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new PointHelper($this->request);
|
||||
$this->_helper = new PointHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ class ServiceController extends CustomerController
|
||||
public function getHelper(): ServiceHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new ServiceHelper($this->request);
|
||||
$this->_helper = new ServiceHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ class ServiceHistoryController extends CustomerController
|
||||
public function getHelper(): ServiceHistoryHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new ServiceHistoryHelper($this->request);
|
||||
$this->_helper = new ServiceHistoryHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ class ServiceItemController extends CustomerController
|
||||
public function getHelper(): ServiceItemHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new ServiceItemHelper($this->request);
|
||||
$this->_helper = new ServiceItemHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ class ServicePaymentController extends CustomerController
|
||||
public function getHelper(): ServicePaymentHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new ServicePaymentHelper($this->request);
|
||||
$this->_helper = new ServicePaymentHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ class CodeController extends EquipmentController
|
||||
public function getHelper(): CodeHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new CodeHelper($this->request);
|
||||
$this->_helper = new CodeHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ class CpuController extends PartController
|
||||
public function getHelper(): CpuHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new CpuHelper($this->request);
|
||||
$this->_helper = new CpuHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ class DefenceController extends PartController
|
||||
public function getHelper(): DefenceHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new DefenceHelper($this->request);
|
||||
$this->_helper = new DefenceHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
|
||||
@ -1,16 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin\Equipment;
|
||||
namespace App\Controllers\Admin\Equipment\Part;
|
||||
|
||||
use App\Helpers\Equipment\DomainHelper;
|
||||
use App\Services\Equipment\DomainService;
|
||||
use CodeIgniter\HTTP\RedirectResponse;
|
||||
use App\Helpers\Equipment\Part\DomainHelper;
|
||||
use App\Services\Equipment\Part\DomainService;
|
||||
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class DomainController extends EquipmentController
|
||||
class DomainController extends PartController
|
||||
{
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
@ -31,7 +30,7 @@ class DomainController extends EquipmentController
|
||||
public function getHelper(): DomainHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new DomainHelper($this->request);
|
||||
$this->_helper = new DomainHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
@ -33,7 +33,7 @@ class IpController extends PartController
|
||||
public function getHelper(): IpHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new IpHelper($this->request);
|
||||
$this->_helper = new IpHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ class LineController extends PartController
|
||||
public function getHelper(): LineHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new LineHelper($this->request);
|
||||
$this->_helper = new LineHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ class RamController extends PartController
|
||||
public function getHelper(): RamHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new RamHelper($this->request);
|
||||
$this->_helper = new RamHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ class SoftwareController extends PartController
|
||||
public function getHelper(): SoftwareHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new SoftwareHelper($this->request);
|
||||
$this->_helper = new SoftwareHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ class StorageController extends PartController
|
||||
public function getHelper(): StorageHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new StorageHelper($this->request);
|
||||
$this->_helper = new StorageHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ class ServerController extends EquipmentController
|
||||
public function getHelper(): ServerHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new ServerHelper($this->request);
|
||||
$this->_helper = new ServerHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
|
||||
44
app/Controllers/Admin/Equipment/SwitchController.php
Normal file
44
app/Controllers/Admin/Equipment/SwitchController.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin\Equipment;
|
||||
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
use App\Helpers\Equipment\SwitchHelper;
|
||||
use App\Services\Equipment\SwitchService;
|
||||
|
||||
class SwitchController extends EquipmentController
|
||||
{
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->content_title = lang("{$this->getService()->getClassName()}.title");
|
||||
$this->class_path .= $this->getService()->getClassName();
|
||||
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
|
||||
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
|
||||
|
||||
}
|
||||
public function getService(): SwitchService
|
||||
{
|
||||
if (!$this->_service) {
|
||||
$this->_service = new SwitchService();
|
||||
}
|
||||
return $this->_service;
|
||||
}
|
||||
public function getHelper(): SwitchHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new SwitchHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
protected function setOrderByForList(): void
|
||||
{
|
||||
//OrderBy 처리
|
||||
$this->getService()->getModel()->orderBy('code', 'ASC', false);
|
||||
parent::setOrderByForList();
|
||||
}
|
||||
}
|
||||
@ -34,7 +34,7 @@ class Home extends AdminController
|
||||
public function getHelper(): mixed
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new HomeHelper($this->request);
|
||||
$this->_helper = new HomeHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ class MyLogController extends AdminController
|
||||
public function getHelper(): MyLogHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new MyLogHelper($this->request);
|
||||
$this->_helper = new MyLogHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ class UserController extends AdminController
|
||||
public function getHelper(): UserHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new UserHelper($this->request);
|
||||
$this->_helper = new UserHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ abstract class AuthController extends CommonController
|
||||
final public function getHelper(): mixed
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new AuthHelper($this->request);
|
||||
$this->_helper = new AuthHelper();
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
@ -36,7 +36,7 @@ abstract class AuthController extends CommonController
|
||||
protected function getResultSuccess(string $message = MESSAGES["SUCCESS"], ?string $actionTemplate = null): RedirectResponse|string
|
||||
{
|
||||
switch ($this->getAction()) {
|
||||
case 'create':
|
||||
case 'create': //Login처리
|
||||
$result = redirect()->to($this->getMyAuth()->popPreviousUrl())->with('error', $message);
|
||||
break;
|
||||
default:
|
||||
|
||||
@ -225,7 +225,7 @@ abstract class CommonController extends BaseController
|
||||
final protected function getResultFail(string $message = MESSAGES["FAILED"]): RedirectResponse
|
||||
{
|
||||
LogCollector::debug($message);
|
||||
$this->getMyLogService()->save($this->getService(), __FUNCTION__, $this->getMyAuth(), $message);
|
||||
$this->getMyLogService()->save($this->getService()->getClassName(), __FUNCTION__, $message);
|
||||
if ($this->request->getMethod() === 'POST') {
|
||||
return redirect()->back()->withInput()->with('error', $message);
|
||||
}
|
||||
@ -236,7 +236,7 @@ abstract class CommonController extends BaseController
|
||||
switch ($this->getAction()) {
|
||||
case 'create':
|
||||
case 'modify':
|
||||
$this->getMyLogService()->save($this->getService(), __FUNCTION__, $this->getMyAuth(), $message);
|
||||
$this->getMyLogService()->save($this->getService()->getClassName(), __FUNCTION__, $message);
|
||||
$result = $this->view($this->entity->getPK());
|
||||
break;
|
||||
case 'create_form':
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
"settings": {
|
||||
"width": 3000,
|
||||
"height": 3000,
|
||||
"scrollTop": -1073.1953,
|
||||
"scrollLeft": -842.6417,
|
||||
"scrollTop": -1480.1953,
|
||||
"scrollLeft": -994.6025,
|
||||
"zoomLevel": 0.79,
|
||||
"show": 511,
|
||||
"database": 4,
|
||||
@ -50,7 +50,8 @@
|
||||
"B8haiEbPc1lRBWTv1g25G",
|
||||
"0WXrjcyXXGeoAVM2VB8s2",
|
||||
"eLGlqJ4z_woGP6CLZEuUr",
|
||||
"JoMB-mb6p6NoHpiAvjD2y"
|
||||
"JoMB-mb6p6NoHpiAvjD2y",
|
||||
"IsMoJXzvtuoOFFt93qS0w"
|
||||
],
|
||||
"relationshipIds": [
|
||||
"gAVYXWnBSnCw-0ieO4Mil",
|
||||
@ -64,11 +65,12 @@
|
||||
"I80TuGxKm3tXIO_EO2PSm",
|
||||
"o8yw46vm30cC7wl9cRMdo",
|
||||
"ocWjncqwtYkP02mw4A0-8",
|
||||
"6oBuPqT-ikPI7X8a05Trv",
|
||||
"Hj5AZkoYGvM_syvnqMeOi",
|
||||
"dgALp3F5aQw7gy6h_Ejcl",
|
||||
"cRqZmxohkCGd_FTkg1rhI",
|
||||
"e74Cc4zZztxyoazM_ssbu"
|
||||
"e74Cc4zZztxyoazM_ssbu",
|
||||
"Y-MNlBi4tzmX_zwrY0zTc",
|
||||
"my7misDXaAqlgb4tiABJn"
|
||||
],
|
||||
"indexIds": [],
|
||||
"memoIds": []
|
||||
@ -259,14 +261,14 @@
|
||||
],
|
||||
"ui": {
|
||||
"x": 1699.7701,
|
||||
"y": 1476.0173,
|
||||
"y": 1519.0553,
|
||||
"zIndex": 2,
|
||||
"widthName": 60,
|
||||
"widthComment": 60,
|
||||
"color": ""
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1750828981836,
|
||||
"updateAt": 1750900809322,
|
||||
"createAt": 1745819764137
|
||||
}
|
||||
},
|
||||
@ -813,11 +815,11 @@
|
||||
"NzxkmndrTbH7xb6fbnGV7",
|
||||
"f1hR1JRFHBHwiJSSX34gw",
|
||||
"Vf3bNvvEPfu1zCs4rcHTU",
|
||||
"O7aGU_LJxCO1NeNVWbB-J",
|
||||
"PLQrLZGFiiPQDZSYpU-Rc",
|
||||
"9DIj0WNLrGT8VCHZuRkCz",
|
||||
"SGWWOOHjCF81V4O5tUiJu",
|
||||
"uuDbJDSDQLey7Km1W9hlJ",
|
||||
"Gb6fmS40Q3wvnvD1HMTqR",
|
||||
"_UFwKNcesG423815BIYBi",
|
||||
"FJtEzmrQUsMMbrWbzr8IR",
|
||||
"hQ5EOPiUpDbVpWQwawtw4",
|
||||
"9o7wfPp7WK2nZoxkDZ9Y1",
|
||||
@ -841,7 +843,10 @@
|
||||
"Fx2k158yi9P2l5An09ae1",
|
||||
"f1hR1JRFHBHwiJSSX34gw",
|
||||
"Vf3bNvvEPfu1zCs4rcHTU",
|
||||
"AU5HgX9gt97EPfq5SoKnd",
|
||||
"O7aGU_LJxCO1NeNVWbB-J",
|
||||
"PLQrLZGFiiPQDZSYpU-Rc",
|
||||
"9DIj0WNLrGT8VCHZuRkCz",
|
||||
"SGWWOOHjCF81V4O5tUiJu",
|
||||
"uuDbJDSDQLey7Km1W9hlJ",
|
||||
"Gb6fmS40Q3wvnvD1HMTqR",
|
||||
@ -866,7 +871,7 @@
|
||||
"color": ""
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1750828883842,
|
||||
"updateAt": 1750900805222,
|
||||
"createAt": 1748485662214
|
||||
}
|
||||
},
|
||||
@ -961,6 +966,7 @@
|
||||
"name": "codeinfo",
|
||||
"comment": "코드표",
|
||||
"columnIds": [
|
||||
"tARrLvK20dCKOxfLKu-T_",
|
||||
"FMB1Pw8d7ED0xlrEAdVok",
|
||||
"G1UKbUmdA5cmhcVHaqrTj",
|
||||
"UIl3k8fn-kPZvaWKIMtKY",
|
||||
@ -969,6 +975,7 @@
|
||||
],
|
||||
"seqColumnIds": [
|
||||
"WsOgvUtYTLLdAhcZUJZFQ",
|
||||
"tARrLvK20dCKOxfLKu-T_",
|
||||
"FMB1Pw8d7ED0xlrEAdVok",
|
||||
"G1UKbUmdA5cmhcVHaqrTj",
|
||||
"UIl3k8fn-kPZvaWKIMtKY",
|
||||
@ -976,17 +983,50 @@
|
||||
"Zdn5DgG2lzu4VQtI-iaxa"
|
||||
],
|
||||
"ui": {
|
||||
"x": 1695.8469,
|
||||
"y": 1219.7775,
|
||||
"x": 1700.9101,
|
||||
"y": 1295.7268,
|
||||
"zIndex": 2508,
|
||||
"widthName": 60,
|
||||
"widthComment": 60,
|
||||
"color": ""
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1750828939206,
|
||||
"updateAt": 1750900811726,
|
||||
"createAt": 1749526993705
|
||||
}
|
||||
},
|
||||
"IsMoJXzvtuoOFFt93qS0w": {
|
||||
"id": "IsMoJXzvtuoOFFt93qS0w",
|
||||
"name": "switchinfo",
|
||||
"comment": "스위치코드표",
|
||||
"columnIds": [
|
||||
"dsz0no4QmTBs-HMbe_HtT",
|
||||
"sVypeCGZk-JXvsbwc93Rw",
|
||||
"QEXGVSZ3sjvmtUCdgXl6_",
|
||||
"4Koam7FHw2_rCXSUBEQJB",
|
||||
"d7HNONWncNoqDRCl4-Y0N",
|
||||
"qOLH2re1rmaG-63c08R8x"
|
||||
],
|
||||
"seqColumnIds": [
|
||||
"dsz0no4QmTBs-HMbe_HtT",
|
||||
"sVypeCGZk-JXvsbwc93Rw",
|
||||
"QEXGVSZ3sjvmtUCdgXl6_",
|
||||
"4Koam7FHw2_rCXSUBEQJB",
|
||||
"d7HNONWncNoqDRCl4-Y0N",
|
||||
"qOLH2re1rmaG-63c08R8x"
|
||||
],
|
||||
"ui": {
|
||||
"x": 1697.685,
|
||||
"y": 1073.243,
|
||||
"zIndex": 2509,
|
||||
"widthName": 60,
|
||||
"widthComment": 74,
|
||||
"color": ""
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1750900814178,
|
||||
"createAt": 1750898626895
|
||||
}
|
||||
}
|
||||
},
|
||||
"tableColumnEntities": {
|
||||
@ -6457,7 +6497,7 @@
|
||||
"comment": "",
|
||||
"dataType": "VARCHAR(20)",
|
||||
"default": "'default'",
|
||||
"options": 8,
|
||||
"options": 0,
|
||||
"ui": {
|
||||
"keys": 0,
|
||||
"widthName": 60,
|
||||
@ -6466,7 +6506,7 @@
|
||||
"widthDefault": 60
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1749527110533,
|
||||
"updateAt": 1750900710654,
|
||||
"createAt": 1749527110533
|
||||
}
|
||||
},
|
||||
@ -6517,16 +6557,16 @@
|
||||
"comment": "서버코드",
|
||||
"dataType": "VARCHAR(20)",
|
||||
"default": "",
|
||||
"options": 14,
|
||||
"options": 12,
|
||||
"ui": {
|
||||
"keys": 1,
|
||||
"keys": 0,
|
||||
"widthName": 60,
|
||||
"widthComment": 60,
|
||||
"widthDataType": 75,
|
||||
"widthDefault": 60
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1749527292426,
|
||||
"updateAt": 1750900705990,
|
||||
"createAt": 1749527129380
|
||||
}
|
||||
},
|
||||
@ -6539,7 +6579,7 @@
|
||||
"default": "",
|
||||
"options": 8,
|
||||
"ui": {
|
||||
"keys": 2,
|
||||
"keys": 0,
|
||||
"widthName": 60,
|
||||
"widthComment": 60,
|
||||
"widthDataType": 75,
|
||||
@ -7209,6 +7249,206 @@
|
||||
"updateAt": 1750829284686,
|
||||
"createAt": 1750829265309
|
||||
}
|
||||
},
|
||||
"sVypeCGZk-JXvsbwc93Rw": {
|
||||
"id": "sVypeCGZk-JXvsbwc93Rw",
|
||||
"tableId": "IsMoJXzvtuoOFFt93qS0w",
|
||||
"name": "code",
|
||||
"comment": "switch코드",
|
||||
"dataType": "VARCHAR(20)",
|
||||
"default": "",
|
||||
"options": 12,
|
||||
"ui": {
|
||||
"keys": 0,
|
||||
"widthName": 60,
|
||||
"widthComment": 60,
|
||||
"widthDataType": 75,
|
||||
"widthDefault": 60
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1750900683983,
|
||||
"createAt": 1750898653166
|
||||
}
|
||||
},
|
||||
"QEXGVSZ3sjvmtUCdgXl6_": {
|
||||
"id": "QEXGVSZ3sjvmtUCdgXl6_",
|
||||
"tableId": "IsMoJXzvtuoOFFt93qS0w",
|
||||
"name": "status",
|
||||
"comment": "",
|
||||
"dataType": "VARCHAR(20)",
|
||||
"default": "'default'",
|
||||
"options": 8,
|
||||
"ui": {
|
||||
"keys": 0,
|
||||
"widthName": 60,
|
||||
"widthComment": 60,
|
||||
"widthDataType": 75,
|
||||
"widthDefault": 60
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1750898653167,
|
||||
"createAt": 1750898653167
|
||||
}
|
||||
},
|
||||
"4Koam7FHw2_rCXSUBEQJB": {
|
||||
"id": "4Koam7FHw2_rCXSUBEQJB",
|
||||
"tableId": "IsMoJXzvtuoOFFt93qS0w",
|
||||
"name": "updated_at",
|
||||
"comment": "",
|
||||
"dataType": "TIMESTAMP",
|
||||
"default": "",
|
||||
"options": 0,
|
||||
"ui": {
|
||||
"keys": 0,
|
||||
"widthName": 62,
|
||||
"widthComment": 60,
|
||||
"widthDataType": 65,
|
||||
"widthDefault": 60
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1750898653167,
|
||||
"createAt": 1750898653167
|
||||
}
|
||||
},
|
||||
"d7HNONWncNoqDRCl4-Y0N": {
|
||||
"id": "d7HNONWncNoqDRCl4-Y0N",
|
||||
"tableId": "IsMoJXzvtuoOFFt93qS0w",
|
||||
"name": "created_at",
|
||||
"comment": "",
|
||||
"dataType": "TIMESTAMP",
|
||||
"default": "CURRENT_TIMESTAMP",
|
||||
"options": 8,
|
||||
"ui": {
|
||||
"keys": 0,
|
||||
"widthName": 60,
|
||||
"widthComment": 60,
|
||||
"widthDataType": 65,
|
||||
"widthDefault": 122
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1750898653167,
|
||||
"createAt": 1750898653167
|
||||
}
|
||||
},
|
||||
"qOLH2re1rmaG-63c08R8x": {
|
||||
"id": "qOLH2re1rmaG-63c08R8x",
|
||||
"tableId": "IsMoJXzvtuoOFFt93qS0w",
|
||||
"name": "deleted_at",
|
||||
"comment": "",
|
||||
"dataType": "TIMESTAMP",
|
||||
"default": "",
|
||||
"options": 0,
|
||||
"ui": {
|
||||
"keys": 0,
|
||||
"widthName": 60,
|
||||
"widthComment": 60,
|
||||
"widthDataType": 65,
|
||||
"widthDefault": 60
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1750898653167,
|
||||
"createAt": 1750898653167
|
||||
}
|
||||
},
|
||||
"AU5HgX9gt97EPfq5SoKnd": {
|
||||
"id": "AU5HgX9gt97EPfq5SoKnd",
|
||||
"tableId": "B8haiEbPc1lRBWTv1g25G",
|
||||
"name": "switch",
|
||||
"comment": "switch코드",
|
||||
"dataType": "VARCHAR(20)",
|
||||
"default": "",
|
||||
"options": 8,
|
||||
"ui": {
|
||||
"keys": 0,
|
||||
"widthName": 60,
|
||||
"widthComment": 60,
|
||||
"widthDataType": 75,
|
||||
"widthDefault": 60
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1750898732189,
|
||||
"createAt": 1750898732189
|
||||
}
|
||||
},
|
||||
"dsz0no4QmTBs-HMbe_HtT": {
|
||||
"id": "dsz0no4QmTBs-HMbe_HtT",
|
||||
"tableId": "IsMoJXzvtuoOFFt93qS0w",
|
||||
"name": "uid",
|
||||
"comment": "",
|
||||
"dataType": "INT",
|
||||
"default": "",
|
||||
"options": 11,
|
||||
"ui": {
|
||||
"keys": 1,
|
||||
"widthName": 60,
|
||||
"widthComment": 60,
|
||||
"widthDataType": 60,
|
||||
"widthDefault": 60
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1750900686550,
|
||||
"createAt": 1750900670007
|
||||
}
|
||||
},
|
||||
"tARrLvK20dCKOxfLKu-T_": {
|
||||
"id": "tARrLvK20dCKOxfLKu-T_",
|
||||
"tableId": "JoMB-mb6p6NoHpiAvjD2y",
|
||||
"name": "uid",
|
||||
"comment": "",
|
||||
"dataType": "INT",
|
||||
"default": "",
|
||||
"options": 11,
|
||||
"ui": {
|
||||
"keys": 1,
|
||||
"widthName": 60,
|
||||
"widthComment": 60,
|
||||
"widthDataType": 60,
|
||||
"widthDefault": 60
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1750900703062,
|
||||
"createAt": 1750900698112
|
||||
}
|
||||
},
|
||||
"PLQrLZGFiiPQDZSYpU-Rc": {
|
||||
"id": "PLQrLZGFiiPQDZSYpU-Rc",
|
||||
"tableId": "B8haiEbPc1lRBWTv1g25G",
|
||||
"name": "switchinfo_uid",
|
||||
"comment": "switch코드",
|
||||
"dataType": "INT",
|
||||
"default": "",
|
||||
"options": 8,
|
||||
"ui": {
|
||||
"keys": 2,
|
||||
"widthName": 77,
|
||||
"widthComment": 60,
|
||||
"widthDataType": 60,
|
||||
"widthDefault": 60
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1750900869604,
|
||||
"createAt": 1750900764368
|
||||
}
|
||||
},
|
||||
"9DIj0WNLrGT8VCHZuRkCz": {
|
||||
"id": "9DIj0WNLrGT8VCHZuRkCz",
|
||||
"tableId": "B8haiEbPc1lRBWTv1g25G",
|
||||
"name": "codeinfo_uid",
|
||||
"comment": "server코드",
|
||||
"dataType": "INT",
|
||||
"default": "",
|
||||
"options": 8,
|
||||
"ui": {
|
||||
"keys": 2,
|
||||
"widthName": 70,
|
||||
"widthComment": 60,
|
||||
"widthDataType": 60,
|
||||
"widthDefault": 60
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1750900874920,
|
||||
"createAt": 1750900801840
|
||||
}
|
||||
}
|
||||
},
|
||||
"relationshipEntities": {
|
||||
@ -7530,8 +7770,8 @@
|
||||
"columnIds": [
|
||||
"FMB1Pw8d7ED0xlrEAdVok"
|
||||
],
|
||||
"x": 1695.8469,
|
||||
"y": 1307.7775,
|
||||
"x": 1697.1127,
|
||||
"y": 1340.0307,
|
||||
"direction": 1
|
||||
},
|
||||
"end": {
|
||||
@ -7540,7 +7780,7 @@
|
||||
"O7aGU_LJxCO1NeNVWbB-J"
|
||||
],
|
||||
"x": 1457.1138999999998,
|
||||
"y": 1231.9058,
|
||||
"y": 1366.5724666666667,
|
||||
"direction": 2
|
||||
},
|
||||
"meta": {
|
||||
@ -7687,6 +7927,90 @@
|
||||
"updateAt": 1750829265309,
|
||||
"createAt": 1750829265309
|
||||
}
|
||||
},
|
||||
"FHzw49BTN_7RwEJXeKdhl": {
|
||||
"id": "FHzw49BTN_7RwEJXeKdhl",
|
||||
"identification": false,
|
||||
"relationshipType": 16,
|
||||
"startRelationshipType": 2,
|
||||
"start": {
|
||||
"tableId": "IsMoJXzvtuoOFFt93qS0w",
|
||||
"columnIds": [
|
||||
"sVypeCGZk-JXvsbwc93Rw"
|
||||
],
|
||||
"x": 1696.4192,
|
||||
"y": 1116.281,
|
||||
"direction": 1
|
||||
},
|
||||
"end": {
|
||||
"tableId": "B8haiEbPc1lRBWTv1g25G",
|
||||
"columnIds": [
|
||||
"AU5HgX9gt97EPfq5SoKnd"
|
||||
],
|
||||
"x": 1457.1138999999998,
|
||||
"y": 1115.9058,
|
||||
"direction": 2
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1750898732189,
|
||||
"createAt": 1750898732189
|
||||
}
|
||||
},
|
||||
"Y-MNlBi4tzmX_zwrY0zTc": {
|
||||
"id": "Y-MNlBi4tzmX_zwrY0zTc",
|
||||
"identification": false,
|
||||
"relationshipType": 8,
|
||||
"startRelationshipType": 2,
|
||||
"start": {
|
||||
"tableId": "IsMoJXzvtuoOFFt93qS0w",
|
||||
"columnIds": [
|
||||
"dsz0no4QmTBs-HMbe_HtT"
|
||||
],
|
||||
"x": 1697.685,
|
||||
"y": 1173.243,
|
||||
"direction": 1
|
||||
},
|
||||
"end": {
|
||||
"tableId": "B8haiEbPc1lRBWTv1g25G",
|
||||
"columnIds": [
|
||||
"PLQrLZGFiiPQDZSYpU-Rc"
|
||||
],
|
||||
"x": 1457.1138999999998,
|
||||
"y": 1115.9058,
|
||||
"direction": 2
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1750900764369,
|
||||
"createAt": 1750900764369
|
||||
}
|
||||
},
|
||||
"my7misDXaAqlgb4tiABJn": {
|
||||
"id": "my7misDXaAqlgb4tiABJn",
|
||||
"identification": false,
|
||||
"relationshipType": 8,
|
||||
"startRelationshipType": 2,
|
||||
"start": {
|
||||
"tableId": "JoMB-mb6p6NoHpiAvjD2y",
|
||||
"columnIds": [
|
||||
"tARrLvK20dCKOxfLKu-T_"
|
||||
],
|
||||
"x": 1700.9101,
|
||||
"y": 1395.7268,
|
||||
"direction": 1
|
||||
},
|
||||
"end": {
|
||||
"tableId": "B8haiEbPc1lRBWTv1g25G",
|
||||
"columnIds": [
|
||||
"9DIj0WNLrGT8VCHZuRkCz"
|
||||
],
|
||||
"x": 1457.1138999999998,
|
||||
"y": 1347.9058,
|
||||
"direction": 2
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1750900801840,
|
||||
"createAt": 1750900801840
|
||||
}
|
||||
}
|
||||
},
|
||||
"indexEntities": {},
|
||||
|
||||
@ -17,19 +17,18 @@ class ServiceEntity extends CustomerEntity
|
||||
{
|
||||
return intval($this->attributes['user_uid']);
|
||||
}
|
||||
public function getSwitchUID(): string
|
||||
{
|
||||
return $this->attributes['switchinfo_uid'];
|
||||
}
|
||||
public function getCodeUID(): string
|
||||
{
|
||||
return $this->attributes['codeinfo_uid'];
|
||||
}
|
||||
public function getTitle(): string
|
||||
{
|
||||
return "S" . $this->getPK();
|
||||
}
|
||||
public function getSwitch(): string
|
||||
{
|
||||
return $this->attributes['switch'];
|
||||
}
|
||||
//서버코드
|
||||
public function getCode(): string
|
||||
{
|
||||
return $this->attributes['code'];
|
||||
}
|
||||
public function getType(): string
|
||||
{
|
||||
return $this->attributes['type'];
|
||||
|
||||
@ -10,4 +10,9 @@ class CodeEntity extends EquipmentEntity
|
||||
const TITLE = CodeModel::TITLE;
|
||||
const STATUS_AVAILABLE = "default";
|
||||
const STATUS_OCCUPIED = "occupied";
|
||||
|
||||
public function getCode(): string
|
||||
{
|
||||
return $this->attributes['code'];
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Equipment;
|
||||
namespace App\Entities\Equipment\Part;
|
||||
|
||||
use App\Models\Equipment\DomainModel;
|
||||
use App\Models\Equipment\Part\DomainModel;
|
||||
|
||||
class DomainEntity extends EquipmentEntity
|
||||
class DomainEntity extends PartEntity
|
||||
{
|
||||
const PK = DomainModel::PK;
|
||||
const TITLE = DomainModel::TITLE;
|
||||
18
app/Entities/Equipment/SwitchEntity.php
Normal file
18
app/Entities/Equipment/SwitchEntity.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Equipment;
|
||||
|
||||
use App\Models\Equipment\SwitchModel;
|
||||
|
||||
class SwitchEntity extends EquipmentEntity
|
||||
{
|
||||
const PK = SwitchModel::PK;
|
||||
const TITLE = SwitchModel::TITLE;
|
||||
const STATUS_AVAILABLE = "default";
|
||||
const STATUS_OCCUPIED = "occupied";
|
||||
|
||||
public function getCode(): string
|
||||
{
|
||||
return $this->attributes['code'];
|
||||
}
|
||||
}
|
||||
@ -2,13 +2,11 @@
|
||||
|
||||
namespace App\Helpers;
|
||||
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
use App\Models\UserModel;
|
||||
|
||||
class AuthHelper extends CommonHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(UserModel::TITLE);
|
||||
|
||||
@ -319,7 +319,9 @@ class CommonHelper
|
||||
);
|
||||
$value = $this->getFieldForm($field, $value, $viewDatas, $extras);
|
||||
} else {
|
||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@ -3,12 +3,10 @@
|
||||
namespace App\Helpers\Customer;
|
||||
|
||||
use App\Models\Customer\AccountModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class AccountHelper extends CustomerHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(AccountModel::TITLE);
|
||||
@ -21,7 +19,9 @@ class AccountHelper extends CustomerHelper
|
||||
break;
|
||||
default:
|
||||
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -3,12 +3,10 @@
|
||||
namespace App\Helpers\Customer;
|
||||
|
||||
use App\Models\Customer\ClientModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class ClientHelper extends CustomerHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(ClientModel::TITLE);
|
||||
|
||||
@ -3,12 +3,10 @@
|
||||
namespace App\Helpers\Customer;
|
||||
|
||||
use App\Models\Customer\CouponModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class CouponHelper extends CustomerHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(CouponModel::TITLE);
|
||||
@ -21,7 +19,9 @@ class CouponHelper extends CustomerHelper
|
||||
break;
|
||||
default:
|
||||
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -3,11 +3,10 @@
|
||||
namespace App\Helpers\Customer;
|
||||
|
||||
use App\Helpers\CommonHelper;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
abstract class CustomerHelper extends CommonHelper
|
||||
{
|
||||
protected function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
@ -3,12 +3,10 @@
|
||||
namespace App\Helpers\Customer;
|
||||
|
||||
use App\Models\Customer\PointModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class PointHelper extends CustomerHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(field: PointModel::TITLE);
|
||||
@ -22,7 +20,9 @@ class PointHelper extends CustomerHelper
|
||||
break;
|
||||
default:
|
||||
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -4,12 +4,10 @@ namespace App\Helpers\Customer;
|
||||
|
||||
use App\Entities\Equipment\CodeEntity;
|
||||
use App\Models\Customer\ServiceModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class ServiceHelper extends CustomerHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(field: ServiceModel::TITLE);
|
||||
|
||||
@ -3,12 +3,10 @@
|
||||
namespace App\Helpers\Customer;
|
||||
|
||||
use App\Models\Customer\ServiceHistoryModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class ServiceHistoryHelper extends CustomerHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(field: ServiceHistoryModel::TITLE);
|
||||
|
||||
@ -2,15 +2,13 @@
|
||||
|
||||
namespace App\Helpers\Customer;
|
||||
|
||||
use App\Entities\Equipment\DomainEntity;
|
||||
use App\Entities\Equipment\Part\DomainEntity;
|
||||
use App\Entities\Equipment\Part\IpEntity;
|
||||
use App\Models\Customer\ServiceItemModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class ServiceItemHelper extends CustomerHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(field: ServiceItemModel::TITLE);
|
||||
|
||||
@ -3,12 +3,10 @@
|
||||
namespace App\Helpers\Customer;
|
||||
|
||||
use App\Models\Customer\ServicePaymentModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class ServicePaymentHelper extends CustomerHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(field: ServicePaymentModel::TITLE);
|
||||
@ -33,7 +31,9 @@ class ServicePaymentHelper extends CustomerHelper
|
||||
break;
|
||||
default:
|
||||
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
||||
$value = $value ? $viewDatas['control']['filter_optons'][$field][$value]->getTitle() : "";
|
||||
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -3,12 +3,10 @@
|
||||
namespace App\Helpers\Equipment;
|
||||
|
||||
use App\Models\Equipment\CodeModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class CodeHelper extends EquipmentHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(field: CodeModel::TITLE);
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers\Equipment;
|
||||
|
||||
use App\Models\Equipment\DomainModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class DomainHelper extends EquipmentHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(field: DomainModel::TITLE);
|
||||
}
|
||||
}
|
||||
@ -3,11 +3,10 @@
|
||||
namespace App\Helpers\Equipment;
|
||||
|
||||
use App\Helpers\CommonHelper;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
abstract class EquipmentHelper extends CommonHelper
|
||||
{
|
||||
protected function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
@ -3,12 +3,10 @@
|
||||
namespace App\Helpers\Equipment\Part;
|
||||
|
||||
use App\Models\Equipment\Part\CpuModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class CpuHelper extends PartHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(field: CpuModel::TITLE);
|
||||
|
||||
@ -3,12 +3,10 @@
|
||||
namespace App\Helpers\Equipment\Part;
|
||||
|
||||
use App\Models\Equipment\Part\DefenceModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class DefenceHelper extends PartHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(field: DefenceModel::TITLE);
|
||||
|
||||
14
app/Helpers/Equipment/Part/DomainHelper.php
Normal file
14
app/Helpers/Equipment/Part/DomainHelper.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers\Equipment\Part;
|
||||
|
||||
use App\Models\Equipment\Part\DomainModel;
|
||||
|
||||
class DomainHelper extends PartHelper
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(field: DomainModel::TITLE);
|
||||
}
|
||||
}
|
||||
@ -3,12 +3,10 @@
|
||||
namespace App\Helpers\Equipment\Part;
|
||||
|
||||
use App\Models\Equipment\Part\IpModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class IpHelper extends PartHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(field: IpModel::TITLE);
|
||||
|
||||
@ -3,12 +3,10 @@
|
||||
namespace App\Helpers\Equipment\Part;
|
||||
|
||||
use App\Models\Equipment\Part\LineModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class LineHelper extends PartHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(field: LineModel::TITLE);
|
||||
|
||||
@ -3,11 +3,10 @@
|
||||
namespace App\Helpers\Equipment\Part;
|
||||
|
||||
use App\Helpers\Equipment\EquipmentHelper;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
abstract class PartHelper extends EquipmentHelper
|
||||
{
|
||||
protected function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
@ -3,12 +3,10 @@
|
||||
namespace App\Helpers\Equipment\Part;
|
||||
|
||||
use App\Models\Equipment\Part\RamModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class RamHelper extends PartHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(field: RamModel::TITLE);
|
||||
|
||||
@ -3,12 +3,10 @@
|
||||
namespace App\Helpers\Equipment\Part;
|
||||
|
||||
use App\Models\Equipment\Part\SoftwareModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class SoftwareHelper extends PartHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(field: SoftwareModel::TITLE);
|
||||
|
||||
@ -3,12 +3,10 @@
|
||||
namespace App\Helpers\Equipment\Part;
|
||||
|
||||
use App\Models\Equipment\Part\StorageModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class StorageHelper extends PartHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(field: StorageModel::TITLE);
|
||||
|
||||
@ -3,12 +3,10 @@
|
||||
namespace App\Helpers\Equipment;
|
||||
|
||||
use App\Models\Equipment\ServerModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class ServerHelper extends EquipmentHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(field: ServerModel::TITLE);
|
||||
|
||||
14
app/Helpers/Equipment/SwitchHelper.php
Normal file
14
app/Helpers/Equipment/SwitchHelper.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers\Equipment;
|
||||
|
||||
use App\Models\Equipment\SwitchModel;
|
||||
|
||||
class SwitchHelper extends EquipmentHelper
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(field: SwitchModel::TITLE);
|
||||
}
|
||||
}
|
||||
@ -3,12 +3,10 @@
|
||||
namespace App\Helpers;
|
||||
|
||||
use App\Models\Customer\ServicePaymentModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class HomeHelper extends CommonHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(field: ServicePaymentModel::TITLE);
|
||||
@ -51,7 +49,9 @@ class HomeHelper extends CommonHelper
|
||||
break;
|
||||
default:
|
||||
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2,13 +2,11 @@
|
||||
|
||||
namespace App\Helpers;
|
||||
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
use App\Models\MyLogModel;
|
||||
|
||||
class MyLogHelper extends CommonHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(MyLogModel::TITLE);
|
||||
@ -21,7 +19,9 @@ class MyLogHelper extends CommonHelper
|
||||
break;
|
||||
default:
|
||||
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2,13 +2,11 @@
|
||||
|
||||
namespace App\Helpers;
|
||||
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
use App\Models\UserModel;
|
||||
|
||||
class UserHelper extends CommonHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setTitleField(UserModel::TITLE);
|
||||
|
||||
@ -8,8 +8,8 @@ return [
|
||||
'title' => "서비스명",
|
||||
'type' => "서비스형식",
|
||||
'location' => "위치",
|
||||
'switch' => "스위치코드",
|
||||
'code' => "서버코드",
|
||||
'switchinfo_uid' => "스위치코드",
|
||||
'codeinfo_uid' => "서버코드",
|
||||
'raid' => "RAID",
|
||||
'billing_at' => "결제일",
|
||||
'start_at' => "개통일",
|
||||
@ -33,10 +33,6 @@ return [
|
||||
'type' => "default",
|
||||
'status' => 'default'
|
||||
],
|
||||
"SWITCH" => [
|
||||
"R35P10" => "R35P10",
|
||||
"R45P20" => "R45P20",
|
||||
],
|
||||
"LOCATION" => [
|
||||
"default" => "치바",
|
||||
"tokyo" => "도쿄",
|
||||
|
||||
18
app/Language/en/Equipment/Switch.php
Normal file
18
app/Language/en/Equipment/Switch.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
return [
|
||||
'title' => "Switch정보",
|
||||
'label' => [
|
||||
'code' => "코드",
|
||||
'status' => "사용여부",
|
||||
'updated_at' => "수정일",
|
||||
'created_at' => "작성일",
|
||||
'deleted_at' => "삭제일",
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'status' => 'default',
|
||||
],
|
||||
"STATUS" => [
|
||||
'default' => "사용가능",
|
||||
'occupied' => "서비스중",
|
||||
],
|
||||
];
|
||||
@ -18,8 +18,8 @@ class ServiceModel extends CustomerModel
|
||||
"user_uid",
|
||||
"type",
|
||||
"location",
|
||||
"switch",
|
||||
"code",
|
||||
"switchinfo_uid",
|
||||
"codeinfo_uid",
|
||||
"raid",
|
||||
"billing_at",
|
||||
"start_at",
|
||||
@ -39,12 +39,12 @@ class ServiceModel extends CustomerModel
|
||||
case "clientinfo_uid":
|
||||
case "ownerinfo_uid":
|
||||
case "user_uid":
|
||||
case "switchinfo_uid":
|
||||
case "codeinfo_uid":
|
||||
$rule = "required|numeric";
|
||||
break;
|
||||
case "type":
|
||||
case "location":
|
||||
case "switch":
|
||||
case "code":
|
||||
case "status":
|
||||
$rule = "required|trim|string";
|
||||
break;
|
||||
|
||||
@ -7,11 +7,10 @@ use App\Entities\Equipment\CodeEntity;
|
||||
class CodeModel extends EquipmentModel
|
||||
{
|
||||
const TABLE = "codeinfo";
|
||||
const PK = "code";
|
||||
const PK = "uid";
|
||||
const TITLE = "code";
|
||||
protected $table = self::TABLE;
|
||||
protected $primaryKey = self::PK;
|
||||
protected $useAutoIncrement = false;
|
||||
protected $returnType = CodeEntity::class;
|
||||
protected $allowedFields = [
|
||||
"code",
|
||||
@ -28,14 +27,9 @@ class CodeModel extends EquipmentModel
|
||||
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
|
||||
}
|
||||
switch ($field) {
|
||||
case $this->getPKField():
|
||||
// 수동입력인 경우
|
||||
if (!$this->useAutoIncrement) {
|
||||
$rule = "required|regex_match[/^[0-9a-zA-Z]/]";
|
||||
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
|
||||
} else {
|
||||
$rule = "required|numeric";
|
||||
}
|
||||
case "code":
|
||||
$rule = "required|trim|min_length[4]|max_length[20]";
|
||||
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
|
||||
break;
|
||||
case "status":
|
||||
$rule = "required|trim|string";
|
||||
@ -46,16 +40,4 @@ class CodeModel extends EquipmentModel
|
||||
}
|
||||
return $rule;
|
||||
}
|
||||
protected function convertEntityData(string $action, string $field, array $formDatas, mixed $entity): mixed
|
||||
{
|
||||
switch ($field) {
|
||||
case $this->getPKField():
|
||||
$entity->$field = $formDatas[$field];
|
||||
break;
|
||||
default:
|
||||
$entity = parent::convertEntityData($action, $field, $formDatas, $entity);
|
||||
break;
|
||||
}
|
||||
return $entity;
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,6 +29,7 @@ class CpuModel extends PartModel
|
||||
switch ($field) {
|
||||
case "model":
|
||||
$rule = "required|trim|string";
|
||||
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
|
||||
break;
|
||||
case "price":
|
||||
$rule = "required|numeric";
|
||||
|
||||
@ -32,11 +32,15 @@ class DefenceModel extends PartModel
|
||||
}
|
||||
switch ($field) {
|
||||
case "model":
|
||||
$rule = "required|trim|string";
|
||||
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
|
||||
break;
|
||||
case "type":
|
||||
$rule = "required|trim|string";
|
||||
break;
|
||||
case "ip":
|
||||
$rule = "required|trim|valid_ip[both]"; //ipv4 , ipv6 , both(ipv4,ipv6)
|
||||
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
|
||||
break;
|
||||
case "price":
|
||||
$rule = "required|numeric";
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Equipment;
|
||||
namespace App\Models\Equipment\Part;
|
||||
|
||||
use App\Entities\Equipment\DomainEntity;
|
||||
use App\Entities\Equipment\Part\DomainEntity;
|
||||
|
||||
class DomainModel extends EquipmentModel
|
||||
class DomainModel extends PartModel
|
||||
{
|
||||
const TABLE = "domaininfo";
|
||||
const PK = "uid";
|
||||
@ -31,11 +31,12 @@ class DomainModel extends EquipmentModel
|
||||
case "clientinfo_uid":
|
||||
$rule = "required|numeric";
|
||||
break;
|
||||
case "price":
|
||||
$rule = "required|numeric";
|
||||
break;
|
||||
case "domain":
|
||||
$rule = "required|trim|valid_domain";
|
||||
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
|
||||
break;
|
||||
case "price":
|
||||
$rule = "required|numeric";
|
||||
break;
|
||||
default:
|
||||
$rule = parent::getFormFieldRule($action, $field);
|
||||
@ -31,11 +31,12 @@ class IpModel extends PartModel
|
||||
case "lineinfo_uid":
|
||||
$rule = "required|numeric";
|
||||
break;
|
||||
case "price":
|
||||
$rule = "if_exist|numeric";
|
||||
break;
|
||||
case "ip":
|
||||
$rule = "required|trim|valid_ip[both]"; //ipv4 , ipv6 , both(ipv4,ipv6)
|
||||
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
|
||||
break;
|
||||
case "price":
|
||||
$rule = "if_exist|numeric";
|
||||
break;
|
||||
default:
|
||||
$rule = parent::getFormFieldRule($action, $field);
|
||||
|
||||
@ -38,6 +38,9 @@ class LineModel extends PartModel
|
||||
$rule = "required|numeric";
|
||||
break;
|
||||
case "title":
|
||||
$rule = "required|trim|string";
|
||||
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
|
||||
break;
|
||||
case "bandwith":
|
||||
case "type":
|
||||
$rule = "required|trim|string";
|
||||
|
||||
@ -30,6 +30,7 @@ class RamModel extends PartModel
|
||||
switch ($field) {
|
||||
case "model":
|
||||
$rule = "required|trim|string";
|
||||
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
|
||||
break;
|
||||
case "price":
|
||||
$rule = "required|numeric";
|
||||
|
||||
@ -30,6 +30,9 @@ class SoftwareModel extends PartModel
|
||||
}
|
||||
switch ($field) {
|
||||
case "model":
|
||||
$rule = "required|trim|string";
|
||||
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
|
||||
break;
|
||||
case "type":
|
||||
$rule = "required|trim|string";
|
||||
break;
|
||||
|
||||
@ -29,6 +29,7 @@ class StorageModel extends PartModel
|
||||
switch ($field) {
|
||||
case "model":
|
||||
$rule = "required|trim|string";
|
||||
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
|
||||
break;
|
||||
case "price":
|
||||
$rule = "required|numeric";
|
||||
|
||||
@ -30,6 +30,7 @@ class ServerModel extends EquipmentModel
|
||||
switch ($field) {
|
||||
case "model":
|
||||
$rule = "required|trim|string";
|
||||
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
|
||||
break;
|
||||
case "price":
|
||||
$rule = "required|numeric";
|
||||
|
||||
44
app/Models/Equipment/SwitchModel.php
Normal file
44
app/Models/Equipment/SwitchModel.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Equipment;
|
||||
|
||||
use App\Entities\Equipment\SwitchEntity;
|
||||
|
||||
class SwitchModel extends EquipmentModel
|
||||
{
|
||||
const TABLE = "switchinfo";
|
||||
const PK = "uid";
|
||||
const TITLE = "code";
|
||||
protected $table = self::TABLE;
|
||||
protected $primaryKey = self::PK;
|
||||
protected $returnType = SwitchEntity::class;
|
||||
protected $allowedFields = [
|
||||
"code",
|
||||
"status",
|
||||
"updated_at"
|
||||
];
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
public function getFormFieldRule(string $action, string $field): string
|
||||
{
|
||||
if (is_array($field)) {
|
||||
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
|
||||
}
|
||||
switch ($field) {
|
||||
case $this->getPKField():
|
||||
case "code":
|
||||
$rule = "required|trim|min_length[4]|max_length[20]";
|
||||
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
|
||||
break;
|
||||
case "status":
|
||||
$rule = "required|trim|string";
|
||||
break;
|
||||
default:
|
||||
$rule = parent::getFormFieldRule($action, $field);
|
||||
break;
|
||||
}
|
||||
return $rule;
|
||||
}
|
||||
}
|
||||
@ -4,7 +4,6 @@ namespace App\Services\Auth;
|
||||
|
||||
use App\Entities\UserEntity;
|
||||
use App\Services\CommonService;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
use CodeIgniter\Session\Session;
|
||||
|
||||
// 참고:https://github.com/SyntaxPhoenix/iloclient
|
||||
@ -12,7 +11,7 @@ abstract class AuthService extends CommonService
|
||||
{
|
||||
private ?Session $_session = null;
|
||||
private $url_stack_name = "url_stack";
|
||||
protected function __construct(?IncomingRequest $request = null)
|
||||
protected function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->addClassName('Auth');
|
||||
|
||||
@ -6,12 +6,11 @@ use App\Entities\UserEntity;
|
||||
use App\Models\UserModel;
|
||||
use App\Libraries\MySocket\GoogleSocket\CURL;
|
||||
use CodeIgniter\Exceptions\PageNotFoundException;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class GoogleService extends AuthService
|
||||
{
|
||||
private $_mySocket = null;
|
||||
public function __construct(mixed $mySocket, ?IncomingRequest $request = null)
|
||||
public function __construct(mixed $mySocket)
|
||||
{
|
||||
$this->_mySocket = $mySocket;
|
||||
parent::__construct();
|
||||
|
||||
@ -4,11 +4,10 @@ namespace App\Services\Auth;
|
||||
|
||||
use App\Entities\UserEntity;
|
||||
use App\Models\UserModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class LocalService extends AuthService
|
||||
{
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->addClassName('Local');
|
||||
|
||||
@ -6,8 +6,8 @@ use App\Entities\Customer\ClientEntity;
|
||||
use App\Services\CommonService;
|
||||
|
||||
use App\Services\Customer\ClientService;
|
||||
use App\Services\Equipment\DomainService;
|
||||
use App\Services\Equipment\ServerService;
|
||||
use App\Services\Equipment\Part\DomainService;
|
||||
use App\Services\Equipment\Part\IpService;
|
||||
use App\Services\Equipment\Part\CpuService;
|
||||
use App\Services\Equipment\Part\DefenceService;
|
||||
|
||||
@ -4,17 +4,19 @@ namespace App\Services\Customer;
|
||||
|
||||
use App\Entities\Customer\ServiceEntity;
|
||||
use App\Entities\Equipment\CodeEntity;
|
||||
use App\Entities\Equipment\Part\IpEntity;
|
||||
|
||||
use App\Entities\Equipment\SwitchEntity;
|
||||
use App\Models\Customer\ServiceModel;
|
||||
use App\Services\Customer\ServiceItemService;
|
||||
use App\Services\Equipment\CodeService;
|
||||
use App\Services\Equipment\SwitchService;
|
||||
use App\Services\UserService;
|
||||
|
||||
class ServiceService extends CustomerService
|
||||
{
|
||||
private ?UserService $_userService = null;
|
||||
private ?CodeService $_codeService = null;
|
||||
private ?SwitchService $_switchService = null;
|
||||
private ?ServiceItemService $_serviceItemService = null;
|
||||
private ?ServicePaymentService $_servicePaymentService = null;
|
||||
private ?string $_searchIP = null;
|
||||
@ -38,8 +40,8 @@ class ServiceService extends CustomerService
|
||||
"ownerinfo_uid",
|
||||
"type",
|
||||
"location",
|
||||
"switch",
|
||||
"code",
|
||||
"switchinfo_uid",
|
||||
"codeinfo_uid",
|
||||
"raid",
|
||||
"billing_at",
|
||||
"start_at",
|
||||
@ -48,7 +50,7 @@ class ServiceService extends CustomerService
|
||||
}
|
||||
public function getFilterFields(): array
|
||||
{
|
||||
return ["clientinfo_uid", 'ownerinfo_uid', 'user_uid', 'type', 'location', 'switch', 'code', 'raid', 'status'];
|
||||
return ["clientinfo_uid", 'ownerinfo_uid', 'user_uid', 'type', 'location', 'switchinfo_uid', 'codeinfo_uid', 'raid', 'status'];
|
||||
}
|
||||
public function getBatchJobFields(): array
|
||||
{
|
||||
@ -56,7 +58,7 @@ class ServiceService extends CustomerService
|
||||
}
|
||||
public function getIndexFields(): array
|
||||
{
|
||||
return ['clientinfo_uid', 'ownerinfo_uid', 'type', 'location', 'switch', 'code', 'raid', 'billing_at', 'start_at', 'updated_at', 'status', 'user_uid'];
|
||||
return ['clientinfo_uid', 'ownerinfo_uid', 'type', 'location', 'switchinfo_uid', 'codeinfo_uid', 'raid', 'billing_at', 'start_at', 'updated_at', 'status', 'user_uid'];
|
||||
}
|
||||
public function getUSerService(): UserService
|
||||
{
|
||||
@ -72,6 +74,13 @@ class ServiceService extends CustomerService
|
||||
}
|
||||
return $this->_codeService;
|
||||
}
|
||||
public function getSwitchService(): SwitchService
|
||||
{
|
||||
if (!$this->_switchService) {
|
||||
$this->_switchService = new SwitchService();
|
||||
}
|
||||
return $this->_switchService;
|
||||
}
|
||||
public function getServiceItemService(): ServiceItemService
|
||||
{
|
||||
if (!$this->_serviceItemService) {
|
||||
@ -118,9 +127,12 @@ class ServiceService extends CustomerService
|
||||
case 'user_uid':
|
||||
$options = $this->getUserService()->getEntities();
|
||||
break;
|
||||
case 'code':
|
||||
case 'codeinfo_uid':
|
||||
$options = $this->getCodeService()->getEntities();
|
||||
break;
|
||||
case 'switchinfo_uid':
|
||||
$options = $this->getSwitchService()->getEntities();
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
break;
|
||||
@ -193,6 +205,8 @@ class ServiceService extends CustomerService
|
||||
{
|
||||
//code의 경우 서비스중으로 설정작업
|
||||
$this->getCodeService()->setStatus($formDatas['code'], CodeEntity::STATUS_OCCUPIED);
|
||||
//switch의 경우 서비스중으로 설정작업
|
||||
$this->getCodeService()->setStatus($formDatas['switch'], SwitchEntity::STATUS_OCCUPIED);
|
||||
return parent::create($formDatas, $entity);
|
||||
}
|
||||
public function modify(mixed $entity, array $formDatas): ServiceEntity
|
||||
@ -201,9 +215,16 @@ class ServiceService extends CustomerService
|
||||
if (array_key_exists('code', $formDatas) && $formDatas['code'] !== $entity->getCode()) {
|
||||
//기존 code의 경우 반환처리
|
||||
$this->getCodeService()->setStatus($entity->getCode(), CodeEntity::STATUS_AVAILABLE);
|
||||
//신규 설정된 coded의 경우 서비스중 변경처리
|
||||
//신규 설정된 code의 경우 서비스중 변경처리
|
||||
$this->getCodeService()->setStatus($formDatas['code'], CodeEntity::STATUS_OCCUPIED);
|
||||
}
|
||||
//switch가 기존과 다를경우 //toggle,batchjob의 경우 $formDatas에 switch가 없을수도 있음
|
||||
if (array_key_exists('switch', $formDatas) && $formDatas['switch'] !== $entity->getCode()) {
|
||||
//기존 switch의 경우 반환처리
|
||||
$this->getSwitchService()->setStatus($entity->getCode(), SwitchEntity::STATUS_AVAILABLE);
|
||||
//신규 설정된 switch의 경우 서비스중 변경처리
|
||||
$this->getSwitchService()->setStatus($formDatas['switch'], SwitchEntity::STATUS_OCCUPIED);
|
||||
}
|
||||
//관리자가 바뀐경우 결제쪽에도 결제가 완료되지않은 것은 관리자를 변경해줘야함
|
||||
if (array_key_exists('ownerinfo_uid', $formDatas) && $entity->getOwnerUID() !== intval($formDatas['ownerinfo_uid'])) {
|
||||
$this->getServicePaymentService()->modifyOwnerByService($entity, $formDatas['ownerinfo_uid']);
|
||||
@ -214,6 +235,8 @@ class ServiceService extends CustomerService
|
||||
{
|
||||
//기존 code의 경우 반환처리
|
||||
$this->getCodeService()->setStatus($entity->getCode(), CodeEntity::STATUS_AVAILABLE);
|
||||
//기존 switch의 경우 반환처리
|
||||
$this->getSwitchService()->setStatus($entity->getCode(), SwitchEntity::STATUS_AVAILABLE);
|
||||
//Item들 삭제
|
||||
foreach (SERVICE_ITEM_TYPES as $item_type => $label) {
|
||||
foreach ($entity->getItemEntities($item_type) as $itemEntity) {
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Equipment;
|
||||
namespace App\Services\Equipment\Part;
|
||||
|
||||
use App\Entities\Equipment\DomainEntity;
|
||||
use App\Models\Equipment\DomainModel;
|
||||
use App\Entities\Equipment\Part\DomainEntity;
|
||||
use App\Models\Equipment\Part\DomainModel;
|
||||
|
||||
class DomainService extends EquipmentService
|
||||
class DomainService extends PartService
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
53
app/Services/Equipment/SwitchService.php
Normal file
53
app/Services/Equipment/SwitchService.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Equipment;
|
||||
|
||||
use App\Entities\Equipment\SwitchEntity;
|
||||
use App\Models\Equipment\SwitchModel;
|
||||
use App\Services\Equipment\EquipmentService;
|
||||
|
||||
class SwitchService extends EquipmentService
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->addClassName('Switch');
|
||||
}
|
||||
public function getModelClass(): SwitchModel
|
||||
{
|
||||
return new SwitchModel();
|
||||
}
|
||||
public function getEntityClass(): SwitchEntity
|
||||
{
|
||||
return new SwitchEntity();
|
||||
}
|
||||
public function getFormFields(): array
|
||||
{
|
||||
return [
|
||||
"code",
|
||||
"status",
|
||||
];
|
||||
}
|
||||
public function getFilterFields(): array
|
||||
{
|
||||
return ['status'];
|
||||
}
|
||||
public function getBatchJobFields(): array
|
||||
{
|
||||
return ['status'];
|
||||
}
|
||||
public function getIndexFields(): array
|
||||
{
|
||||
return ['code', 'status'];
|
||||
}
|
||||
//상태변경
|
||||
public function setStatus(string $code, string $status): SwitchEntity
|
||||
{
|
||||
//code의 경우 사용가능/사용중으로 설정작업
|
||||
$entity = $this->getEntity($code);
|
||||
if (!$entity) {
|
||||
throw new \Exception("{$code}에 대한 Switch Port정보를 찾을수 없습니다.");
|
||||
}
|
||||
return $this->getModel()->modify($code, ['status' => $status]);
|
||||
}
|
||||
}
|
||||
@ -69,11 +69,11 @@ class MyLogService extends CommonService
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
public function save($service, string $method, AuthService $myauth, string $title): MyLogEntity
|
||||
public function save(string $class, string $method, string $title): MyLogEntity
|
||||
{
|
||||
$formDatas = [
|
||||
'user_uid' => $myauth->getUIDByAuthInfo(),
|
||||
'class_name' => $service->getClassName(),
|
||||
'user_uid' => $this->getMyAuth()->getUIDByAuthInfo(),
|
||||
'class_name' => $class,
|
||||
'method_name' => $method,
|
||||
'title' => $title,
|
||||
'content' => LogCollector::dump(),
|
||||
|
||||
@ -5,6 +5,9 @@
|
||||
</button>
|
||||
</h2>
|
||||
<div id="flush-equipment" class="accordion-collapse collapse" aria-labelledby="flush-equipment">
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/equipment/switch"><?= ICONS['SETUP'] ?>Switch정보</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/equipment/code"><?= ICONS['SETUP'] ?>Code정보</a>
|
||||
</div>
|
||||
@ -21,7 +24,7 @@
|
||||
<a href="/admin/equipment/part/software"><?= ICONS['SERVICE_ITEM_SOFTWARE'] ?>Software정보</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/equipment/domain"><?= ICONS['SERVICE_ITEM_DOMAIN'] ?>도메인정보</a>
|
||||
<a href="/admin/equipment/part/domain"><?= ICONS['SERVICE_ITEM_DOMAIN'] ?>도메인정보</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/equipment/part/cpu"><?= ICONS['SERVICE_ITEM_CPU'] ?>CPU정보</a>
|
||||
|
||||
@ -28,8 +28,8 @@
|
||||
<td><?= $viewDatas['helper']->getListButton('new_service_view', $viewDatas, ['label' => $entity->getTitle()]) ?></td>
|
||||
<td><?= $viewDatas['helper']->getFieldView('ownerinfo_uid', $entity->getOwnerUID(), $viewDatas) ?></td>
|
||||
<td><?= $viewDatas['helper']->getFieldView('type', $entity->getType(), $viewDatas) ?></td>
|
||||
<td><?= $viewDatas['helper']->getFieldView('code', $entity->getCode(), $viewDatas) ?></td>
|
||||
<td><?= $viewDatas['helper']->getFieldView('switch', $entity->getSwitch(), $viewDatas) ?></td>
|
||||
<td><?= $viewDatas['helper']->getFieldView('switchinfo_uid', $entity->getSwitchUID(), $viewDatas) ?></td>
|
||||
<td><?= $viewDatas['helper']->getFieldView('codeinfo_uid', $entity->getCodeUID(), $viewDatas) ?></td>
|
||||
<td><?= $viewDatas['helper']->getFieldView('IP', null, $viewDatas) ?></td>
|
||||
<td><?= $viewDatas['helper']->getFieldView('DEFENCE', null, $viewDatas) ?></td>
|
||||
<td><?= $viewDatas['helper']->getFieldView('user_uid', $entity->getUserUID(), $viewDatas) ?></td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user