dbms_init...1

This commit is contained in:
최준흠 2025-05-27 15:17:35 +09:00
parent f8ac6038fd
commit 4ad3a18494
29 changed files with 310 additions and 383 deletions

View File

@ -93,6 +93,19 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
$routes->post('batchjob_delete', 'PointController::batchjob_delete'); $routes->post('batchjob_delete', 'PointController::batchjob_delete');
$routes->get('download/(:alpha)', 'PointController::download/$1'); $routes->get('download/(:alpha)', 'PointController::download/$1');
}); });
$routes->group('domain', ['namespace' => 'App\Controllers\Admin\Customer'], 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('service', ['namespace' => 'App\Controllers\Admin\Customer'], function ($routes) { $routes->group('service', ['namespace' => 'App\Controllers\Admin\Customer'], function ($routes) {
$routes->get('/', 'ServiceController::index', []); $routes->get('/', 'ServiceController::index', []);
$routes->get('create', 'ServiceController::create_form'); $routes->get('create', 'ServiceController::create_form');
@ -174,19 +187,6 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
$routes->post('batchjob_delete', 'SoftwareController::batchjob_delete'); $routes->post('batchjob_delete', 'SoftwareController::batchjob_delete');
$routes->get('download/(:alpha)', 'SoftwareController::download/$1'); $routes->get('download/(:alpha)', 'SoftwareController::download/$1');
}); });
$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');
});
$routes->group('cpu', ['namespace' => 'App\Controllers\Admin\Equipment\Part'], function ($routes) { $routes->group('cpu', ['namespace' => 'App\Controllers\Admin\Equipment\Part'], function ($routes) {
$routes->get('/', 'CpuController::index', []); $routes->get('/', 'CpuController::index', []);
$routes->get('create', 'CpuController::create_form'); $routes->get('create', 'CpuController::create_form');
@ -268,19 +268,6 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
$routes->post('batchjob_delete', 'SoftwareController::batchjob_delete'); $routes->post('batchjob_delete', 'SoftwareController::batchjob_delete');
$routes->get('download/(:alpha)', 'SoftwareController::download/$1'); $routes->get('download/(:alpha)', 'SoftwareController::download/$1');
}); });
$routes->group('domain', ['namespace' => 'App\Controllers\Admin\Equipment\Link'], 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('cpu', ['namespace' => 'App\Controllers\Admin\Equipment\Link'], function ($routes) { $routes->group('cpu', ['namespace' => 'App\Controllers\Admin\Equipment\Link'], function ($routes) {
$routes->get('/', 'CpuController::index', []); $routes->get('/', 'CpuController::index', []);
$routes->get('create', 'CpuController::create_form'); $routes->get('create', 'CpuController::create_form');

View File

@ -7,6 +7,7 @@ use CodeIgniter\Validation\StrictRules\CreditCardRules;
use CodeIgniter\Validation\StrictRules\FileRules; use CodeIgniter\Validation\StrictRules\FileRules;
use CodeIgniter\Validation\StrictRules\FormatRules; use CodeIgniter\Validation\StrictRules\FormatRules;
use CodeIgniter\Validation\StrictRules\Rules; use CodeIgniter\Validation\StrictRules\Rules;
use App\Validations\UrlRules; // <- 추가
class Validation extends BaseConfig class Validation extends BaseConfig
{ {
@ -25,6 +26,7 @@ class Validation extends BaseConfig
FormatRules::class, FormatRules::class,
FileRules::class, FileRules::class,
CreditCardRules::class, CreditCardRules::class,
UrlRules::class, // <- 추가
]; ];
/** /**

View File

@ -1,15 +1,15 @@
<?php <?php
namespace App\Controllers\Admin\Equipment\Part; namespace App\Controllers\Admin\Customer;
use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface; use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use App\Helpers\Equipment\Part\DomainHelper; use App\Helpers\Customer\DomainHelper;
use App\Services\Equipment\Part\DomainService; use App\Services\Customer\DomainService;
class DomainController extends PartController class DomainController extends CustomerController
{ {
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{ {
@ -46,7 +46,7 @@ class DomainController extends PartController
protected function index_process(): array protected function index_process(): array
{ {
$fields = [ $fields = [
'fields' => ['domain', 'price', 'status'], 'fields' => ['clientinfo_uid', 'domain', 'price', 'status'],
]; ];
$this->init('index', $fields); $this->init('index', $fields);
return parent::index_process(); return parent::index_process();

View File

@ -1,57 +0,0 @@
<?php
namespace App\Controllers\Admin\Equipment\Link;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;
use App\Helpers\Equipment\Link\DomainHelper;
use App\Services\Equipment\Link\DomainService;
use App\Services\Equipment\Part\DomainService as PartService;
class DomainController extends LinkController
{
protected ?PartService $_partService = null;
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->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(): DomainService
{
if (!$this->_service) {
$this->_service = new DomainService($this->request);
}
return $this->_service;
}
public function getHelper(): DomainHelper
{
if (!$this->_helper) {
$this->_helper = new DomainHelper($this->request);
}
return $this->_helper;
}
public function getPartService(): PartService
{
if (!$this->_partService) {
$this->_partService = new PartService($this->request);
}
return $this->_partService;
}
//Index,FieldForm관련
protected function index_process(): array
{
$fields = [
'fields' => ['serverinfo_uid', 'domaininfo_uid'],
];
// dd($fields);
$this->init('index', $fields);
return parent::index_process();
}
}

View File

@ -16,8 +16,6 @@ use App\Services\Equipment\Link\LINEService;
use App\Services\Equipment\Link\IpService; use App\Services\Equipment\Link\IpService;
use App\Services\Equipment\Link\DefenceService; use App\Services\Equipment\Link\DefenceService;
use App\Services\Equipment\Link\SoftwareService; use App\Services\Equipment\Link\SoftwareService;
use App\Services\Equipment\Link\DomainService;
class ServerController extends EquipmentController class ServerController extends EquipmentController
{ {
@ -70,9 +68,6 @@ class ServerController extends EquipmentController
case 'SOFTWARE': case 'SOFTWARE':
$this->_adapterService[$key] = new SoftwareService(); $this->_adapterService[$key] = new SoftwareService();
break; break;
case 'DOMAIN':
$this->_adapterService[$key] = new DomainService();
break;
default: default:
throw new \Exception("Unknown adapter service key: {$key}"); throw new \Exception("Unknown adapter service key: {$key}");
} }
@ -96,11 +91,11 @@ class ServerController extends EquipmentController
protected function index_process(): array protected function index_process(): array
{ {
$fields = [ $fields = [
'fields' => ['code', 'type', 'model', 'price', "raid", 'status'], 'fields' => ['code', 'switch', 'type', 'model', 'price', "raid", 'status', 'manufactur_at', 'created_at'],
]; ];
$this->init('index', $fields); $this->init('index', $fields);
// $this->modal_type = 'modal_fetch_v2'; //기본은 modal_iframe임 // $this->modal_type = 'modal_fetch_v2'; //기본은 modal_iframe임
$this->adapterFields = ['LINE', 'IP', 'CPU', 'RAM', 'DISK', 'DEFENCE', 'SOFTWARE', 'DOMAIN']; $this->adapterFields = ['LINE', 'IP', 'CPU', 'RAM', 'DISK', 'DEFENCE', 'SOFTWARE'];
$entities = []; $entities = [];
foreach (parent::index_process() as $entity) { foreach (parent::index_process() as $entity) {
foreach ($this->adapterFields as $field) { foreach ($this->adapterFields as $field) {

View File

@ -530,28 +530,10 @@ abstract class CommonController extends BaseController
$this->getMyAuth()->pushCurrentUrl($this->request->getUri()->getPath() . ($this->request->getUri()->getQuery() ? "?" . $this->request->getUri()->getQuery() : "")); $this->getMyAuth()->pushCurrentUrl($this->request->getUri()->getPath() . ($this->request->getUri()->getQuery() ? "?" . $this->request->getUri()->getQuery() : ""));
helper(['form']); helper(['form']);
$this->init(__FUNCTION__); $this->init(__FUNCTION__);
// if (env('app.debug.index')) {
// echo "ClassName: " . $this->getService()->getClassName() . "<BR>";
// echo "Title: " . $this->title . "<BR>";
// echo "uri_path: " . $this->uri_path . " <BR>";
// echo "view_path: " . $this->view_path . "<BR>";
// echo "action: " . $this->action . "<BR>";
// echo "fields: " . implode(",", $this->fields) . "<BR>";
// // exit;
// }
$this->entities = $this->index_process(); $this->entities = $this->index_process();
return $this->getResultPageByActon($this->action); return $this->getResultPageByActon($this->action);
} catch (\Exception $e) { } catch (\Exception $e) {
// if (env('app.debug.index')) { return redirect()->back()->withInput()->with('error', $e->getMessage());
// echo "Error ClassName: " . $this->getService()->getClassName() . "<BR>";
// echo "Error Title: " . $this->title . "<BR>";
// echo "Error uri_path: " . $this->uri_path . " <BR>";
// echo "Error view_path: " . $this->view_path . "<BR>";
// echo "Error action: " . $this->action . "<BR>";
// echo "Error fields: " . implode(",", $this->fields) . "<BR>";
// // exit;
// }
return redirect()->with('error', $e->getMessage());
} }
} }

File diff suppressed because one or more lines are too long

View File

@ -4,9 +4,9 @@
"settings": { "settings": {
"width": 4000, "width": 4000,
"height": 4000, "height": 4000,
"scrollTop": -2807.42, "scrollTop": -1479.9394,
"scrollLeft": -1213.1454, "scrollLeft": -1047.3419,
"zoomLevel": 0.79, "zoomLevel": 0.76,
"show": 511, "show": 511,
"database": 4, "database": 4,
"databaseName": "", "databaseName": "",
@ -57,7 +57,6 @@
"XywAFAP3s5Xl6G-3txHTH", "XywAFAP3s5Xl6G-3txHTH",
"kHLWAzQmZ3CCs0KpilqZ7", "kHLWAzQmZ3CCs0KpilqZ7",
"x7rn2-q2i7C6Lin0XwIR_", "x7rn2-q2i7C6Lin0XwIR_",
"DKSom-hQqNhI1z7FqSa6Y",
"QmgAf0ZVXXxPIZ-HUgQlY" "QmgAf0ZVXXxPIZ-HUgQlY"
], ],
"relationshipIds": [ "relationshipIds": [
@ -84,10 +83,9 @@
"GNsC6xDRv10hUO6q9Xdnc", "GNsC6xDRv10hUO6q9Xdnc",
"J7H72NkdPg1gZdSAur4la", "J7H72NkdPg1gZdSAur4la",
"7aO23DPo-ueZ6G-9dCKXu", "7aO23DPo-ueZ6G-9dCKXu",
"2yh_-sL8npRIpX_JwH3Vl",
"c9fmyTtPkeRt6aHosMiSQ",
"U2nR5f47vV7PnW-80gxhR", "U2nR5f47vV7PnW-80gxhR",
"iQCazIDeUufmN-nNXDo5I" "iQCazIDeUufmN-nNXDo5I",
"qgPy4U4lAP_gp6rQEuti-"
], ],
"indexIds": [], "indexIds": [],
"memoIds": [] "memoIds": []
@ -229,13 +227,14 @@
"columnIds": [ "columnIds": [
"F9EPb6nsDx6Tf3GG8rvP1", "F9EPb6nsDx6Tf3GG8rvP1",
"GUAjQ-qFNvMHOaqY-rBXq", "GUAjQ-qFNvMHOaqY-rBXq",
"qqj-irJP2zNacGj8PMN6E",
"BAzGsBrmLOwZGYLchLmyP", "BAzGsBrmLOwZGYLchLmyP",
"9F6QpQqxeEggZ0FHM81O1", "9F6QpQqxeEggZ0FHM81O1",
"T1h0jM57gCedXd5wWL30b",
"C_yfBNgyfir7swSSCwZIF", "C_yfBNgyfir7swSSCwZIF",
"70VrVnWpv5vcn3MTsTHC4", "70VrVnWpv5vcn3MTsTHC4",
"54iuIW4knok06vP4JH-oN", "54iuIW4knok06vP4JH-oN",
"bh-W1plz0vCW2rURDnfDR", "bh-W1plz0vCW2rURDnfDR",
"hmZlcR-Pw2C_ife1zzo5o",
"tNaVOzr3vywCXiQdfUJWq", "tNaVOzr3vywCXiQdfUJWq",
"6bQ_6eGfINic9LpM6PtDw" "6bQ_6eGfINic9LpM6PtDw"
], ],
@ -248,6 +247,7 @@
"J97WIRanerqkRvOlQCnL3", "J97WIRanerqkRvOlQCnL3",
"dluCt7VimWWwGu4Is8V0v", "dluCt7VimWWwGu4Is8V0v",
"GUAjQ-qFNvMHOaqY-rBXq", "GUAjQ-qFNvMHOaqY-rBXq",
"qqj-irJP2zNacGj8PMN6E",
"BAzGsBrmLOwZGYLchLmyP", "BAzGsBrmLOwZGYLchLmyP",
"9F6QpQqxeEggZ0FHM81O1", "9F6QpQqxeEggZ0FHM81O1",
"T1h0jM57gCedXd5wWL30b", "T1h0jM57gCedXd5wWL30b",
@ -261,21 +261,22 @@
"o0KMVEBZAnWRSsxx10HmA", "o0KMVEBZAnWRSsxx10HmA",
"Djbw3B6xZWKAvwJDto9xl", "Djbw3B6xZWKAvwJDto9xl",
"bh-W1plz0vCW2rURDnfDR", "bh-W1plz0vCW2rURDnfDR",
"hmZlcR-Pw2C_ife1zzo5o",
"tNaVOzr3vywCXiQdfUJWq", "tNaVOzr3vywCXiQdfUJWq",
"6bQ_6eGfINic9LpM6PtDw", "6bQ_6eGfINic9LpM6PtDw",
"yjaoHnd4nFaa-3REXvRfN", "yjaoHnd4nFaa-3REXvRfN",
"AlvBDBVGfLoVcNjd__kFZ" "AlvBDBVGfLoVcNjd__kFZ"
], ],
"ui": { "ui": {
"x": 1156.7379, "x": 1162.0011,
"y": 1717.6012, "y": 1693.9169,
"zIndex": 2, "zIndex": 2,
"widthName": 60, "widthName": 60,
"widthComment": 60, "widthComment": 60,
"color": "" "color": ""
}, },
"meta": { "meta": {
"updateAt": 1748244309373, "updateAt": 1748326092981,
"createAt": 1745819764137 "createAt": 1745819764137
} }
}, },
@ -287,7 +288,6 @@
"2HB01q46-mugMjuOz85YG", "2HB01q46-mugMjuOz85YG",
"4acJag7ORjUzX7FP-gnhZ", "4acJag7ORjUzX7FP-gnhZ",
"1q8jG5dQKdD35_XYimkSk", "1q8jG5dQKdD35_XYimkSk",
"D7Q_X02LvMZbBtg71_hCK",
"lwe5PLEmpyTipKEVSCHRJ", "lwe5PLEmpyTipKEVSCHRJ",
"P84ZMnZu1nZtRhDY18T5o", "P84ZMnZu1nZtRhDY18T5o",
"VycsOgeM1SXkcq_5XYUMS", "VycsOgeM1SXkcq_5XYUMS",
@ -316,7 +316,7 @@
"color": "" "color": ""
}, },
"meta": { "meta": {
"updateAt": 1748244321138, "updateAt": 1748325348107,
"createAt": 1745819764138 "createAt": 1745819764138
} }
}, },
@ -354,15 +354,15 @@
"liJON6hIBB9aS-pQgM0Q6" "liJON6hIBB9aS-pQgM0Q6"
], ],
"ui": { "ui": {
"x": 1781.6193, "x": 1985.4168,
"y": 1161.13, "y": 1320.6241,
"zIndex": 2, "zIndex": 2,
"widthName": 60, "widthName": 60,
"widthComment": 60, "widthComment": 60,
"color": "" "color": ""
}, },
"meta": { "meta": {
"updateAt": 1748244616364, "updateAt": 1748318179654,
"createAt": 1745819764138 "createAt": 1745819764138
} }
}, },
@ -373,7 +373,6 @@
"columnIds": [ "columnIds": [
"Id0h8QbOdlhPj9P1zTm5o", "Id0h8QbOdlhPj9P1zTm5o",
"f7_MGvRjkwL1xkCWrAgDR", "f7_MGvRjkwL1xkCWrAgDR",
"OGLPunD1CL5Yx1Onabetn",
"6qd6rcTkraI_AbHcVbp6T", "6qd6rcTkraI_AbHcVbp6T",
"2-mxsDaVU45SAAkg_CmAZ", "2-mxsDaVU45SAAkg_CmAZ",
"nDoaVrEhO8hLuHbgZV4il", "nDoaVrEhO8hLuHbgZV4il",
@ -405,7 +404,7 @@
"color": "" "color": ""
}, },
"meta": { "meta": {
"updateAt": 1748244376705, "updateAt": 1748325276937,
"createAt": 1745819764138 "createAt": 1745819764138
} }
}, },
@ -633,7 +632,6 @@
"columnIds": [ "columnIds": [
"Jh6e_-9QYe1Tqve0PE3kT", "Jh6e_-9QYe1Tqve0PE3kT",
"DC7TvFFpBT7vY0UKKHt-W", "DC7TvFFpBT7vY0UKKHt-W",
"VDwq7FTa8NVFgubAOFjso",
"AdK-ftiebHNTIjlPzqGxQ", "AdK-ftiebHNTIjlPzqGxQ",
"qcYZvSlfu93cigmIRzU_C", "qcYZvSlfu93cigmIRzU_C",
"3nwgqrQd_qDGdg6Fe3kEp", "3nwgqrQd_qDGdg6Fe3kEp",
@ -668,19 +666,18 @@
"color": "" "color": ""
}, },
"meta": { "meta": {
"updateAt": 1748244312026, "updateAt": 1748325310304,
"createAt": 1746783410914 "createAt": 1746783410914
} }
}, },
"RTq5rHQupiXXJPXqpN8K5": { "RTq5rHQupiXXJPXqpN8K5": {
"id": "RTq5rHQupiXXJPXqpN8K5", "id": "RTq5rHQupiXXJPXqpN8K5",
"name": "defenceinfo", "name": "defenceinfo",
"comment": "방어정보", "comment": "방어(CS)정보",
"columnIds": [ "columnIds": [
"zBz4vBOZSIA8vKmfqXckO", "zBz4vBOZSIA8vKmfqXckO",
"YqInlreLnga0pOXtaP8GF", "YqInlreLnga0pOXtaP8GF",
"ixoWg1kPLrUYL069d75Kq", "ixoWg1kPLrUYL069d75Kq",
"3JKv9gwi5ig1yLoBJsLC9",
"tTTzHZFvoMJ0RzAexXY2L", "tTTzHZFvoMJ0RzAexXY2L",
"BvHyGw9Xf_gz7bEkZhLbk", "BvHyGw9Xf_gz7bEkZhLbk",
"0STHSEXiceoCa6a7jGXV5", "0STHSEXiceoCa6a7jGXV5",
@ -709,11 +706,11 @@
"y": 3160.8644, "y": 3160.8644,
"zIndex": 796, "zIndex": 796,
"widthName": 64, "widthName": 64,
"widthComment": 60, "widthComment": 71,
"color": "" "color": ""
}, },
"meta": { "meta": {
"updateAt": 1748244322259, "updateAt": 1748325421181,
"createAt": 1747374666215 "createAt": 1747374666215
} }
}, },
@ -724,7 +721,6 @@
"columnIds": [ "columnIds": [
"203b3hUKUQ_Gu5wKShBgZ", "203b3hUKUQ_Gu5wKShBgZ",
"kohhWoNuei3x97SzgQUF4", "kohhWoNuei3x97SzgQUF4",
"jmi6LrAtLmYLaoDiEZ10f",
"Tuyrnk-V3RykdGluC-86m", "Tuyrnk-V3RykdGluC-86m",
"SzD5tmOIoZodU1wBH56I4", "SzD5tmOIoZodU1wBH56I4",
"EEerVyCwkEAuiRc-gon8s", "EEerVyCwkEAuiRc-gon8s",
@ -751,7 +747,7 @@
"color": "" "color": ""
}, },
"meta": { "meta": {
"updateAt": 1748244314623, "updateAt": 1748325313953,
"createAt": 1747808112554 "createAt": 1747808112554
} }
}, },
@ -762,7 +758,6 @@
"columnIds": [ "columnIds": [
"WaCB3uNZYFReAPiBqQ97v", "WaCB3uNZYFReAPiBqQ97v",
"tn-GhYT445kEh1tzf8Lf1", "tn-GhYT445kEh1tzf8Lf1",
"zdhazSc2UskbRIFTbn0MV",
"vzqaqaPuF4guI7nUCRFIE", "vzqaqaPuF4guI7nUCRFIE",
"FOr_RCEoaL3a0M7smSYRC", "FOr_RCEoaL3a0M7smSYRC",
"cMe_lKgwfS-LNTHhHIYrk", "cMe_lKgwfS-LNTHhHIYrk",
@ -786,7 +781,7 @@
"color": "" "color": ""
}, },
"meta": { "meta": {
"updateAt": 1748244316485, "updateAt": 1748325333969,
"createAt": 1747808548333 "createAt": 1747808548333
} }
}, },
@ -834,8 +829,8 @@
"comment": "도메인 정보", "comment": "도메인 정보",
"columnIds": [ "columnIds": [
"XnNj7H0bnTxo_NuZm7BOs", "XnNj7H0bnTxo_NuZm7BOs",
"skdAqnMsTEE6ZKbCD14VX",
"w404_rDrrYyt26iqY8Eur", "w404_rDrrYyt26iqY8Eur",
"gHKfQQEPUr_YKqvm5K_gd",
"EcVzL-sPHB3OIUYfPrAs6", "EcVzL-sPHB3OIUYfPrAs6",
"E8iokQ-rKyw43cNe746kt", "E8iokQ-rKyw43cNe746kt",
"SeMtkfNiltpn4j-M-XkG-", "SeMtkfNiltpn4j-M-XkG-",
@ -843,6 +838,7 @@
], ],
"seqColumnIds": [ "seqColumnIds": [
"XnNj7H0bnTxo_NuZm7BOs", "XnNj7H0bnTxo_NuZm7BOs",
"skdAqnMsTEE6ZKbCD14VX",
"w404_rDrrYyt26iqY8Eur", "w404_rDrrYyt26iqY8Eur",
"gHKfQQEPUr_YKqvm5K_gd", "gHKfQQEPUr_YKqvm5K_gd",
"ftF3nsGwio93Yhy60Pn99", "ftF3nsGwio93Yhy60Pn99",
@ -856,15 +852,15 @@
"6T7sNUPqpTPJm6TI7Qbbe" "6T7sNUPqpTPJm6TI7Qbbe"
], ],
"ui": { "ui": {
"x": 1190.6231, "x": 1985.5598,
"y": 3513.7977, "y": 1016.3294,
"zIndex": 1276, "zIndex": 1276,
"widthName": 63, "widthName": 63,
"widthComment": 65, "widthComment": 65,
"color": "" "color": ""
}, },
"meta": { "meta": {
"updateAt": 1748244325173, "updateAt": 1748318220855,
"createAt": 1748218895681 "createAt": 1748218895681
} }
}, },
@ -973,15 +969,15 @@
"HYNanPfS08M6xRE32jR_Q" "HYNanPfS08M6xRE32jR_Q"
], ],
"ui": { "ui": {
"x": 588.8799, "x": 641.5115,
"y": 1900.8701, "y": 1902.1859,
"zIndex": 1406, "zIndex": 1406,
"widthName": 69, "widthName": 69,
"widthComment": 60, "widthComment": 60,
"color": "" "color": ""
}, },
"meta": { "meta": {
"updateAt": 1748229315470, "updateAt": 1748325851902,
"createAt": 1748224021135 "createAt": 1748224021135
} }
}, },
@ -1055,7 +1051,7 @@
"color": "" "color": ""
}, },
"meta": { "meta": {
"updateAt": 1748244862354, "updateAt": 1748325064428,
"createAt": 1748226446838 "createAt": 1748226446838
} }
}, },
@ -5050,7 +5046,7 @@
"widthDefault": 60 "widthDefault": 60
}, },
"meta": { "meta": {
"updateAt": 1747638862777, "updateAt": 1748325676006,
"createAt": 1747632565731 "createAt": 1747632565731
} }
}, },
@ -7117,7 +7113,7 @@
"9bxqG90EvnSGBkyWVty3j": { "9bxqG90EvnSGBkyWVty3j": {
"id": "9bxqG90EvnSGBkyWVty3j", "id": "9bxqG90EvnSGBkyWVty3j",
"tableId": "4Phnxm-pTS6CW9EX4iqu1", "tableId": "4Phnxm-pTS6CW9EX4iqu1",
"name": "reason", "name": "title",
"comment": "이유", "comment": "이유",
"dataType": "VARCHAR(255)", "dataType": "VARCHAR(255)",
"default": "", "default": "",
@ -7130,7 +7126,7 @@
"widthDefault": 60 "widthDefault": 60
}, },
"meta": { "meta": {
"updateAt": 1748226828842, "updateAt": 1748325069591,
"createAt": 1748226822189 "createAt": 1748226822189
} }
}, },
@ -7663,7 +7659,7 @@
"default": "", "default": "",
"options": 8, "options": 8,
"ui": { "ui": {
"keys": 2, "keys": 0,
"widthName": 76, "widthName": 76,
"widthComment": 60, "widthComment": 60,
"widthDataType": 60, "widthDataType": 60,
@ -7683,7 +7679,7 @@
"default": "", "default": "",
"options": 8, "options": 8,
"ui": { "ui": {
"keys": 2, "keys": 0,
"widthName": 84, "widthName": 84,
"widthComment": 60, "widthComment": 60,
"widthDataType": 60, "widthDataType": 60,
@ -7793,6 +7789,66 @@
"updateAt": 1748244634796, "updateAt": 1748244634796,
"createAt": 1748244625113 "createAt": 1748244625113
} }
},
"skdAqnMsTEE6ZKbCD14VX": {
"id": "skdAqnMsTEE6ZKbCD14VX",
"tableId": "GRBrbb1hqwKSRMfod3I7U",
"name": "clientinfo_uid",
"comment": "",
"dataType": "INT",
"default": "",
"options": 8,
"ui": {
"keys": 2,
"widthName": 73,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1748318214801,
"createAt": 1748318198955
}
},
"qqj-irJP2zNacGj8PMN6E": {
"id": "qqj-irJP2zNacGj8PMN6E",
"tableId": "B4qGh3KZsXHQ3_4EOgwJZ",
"name": "switch",
"comment": "",
"dataType": "VARCHAR(20)",
"default": "",
"options": 8,
"ui": {
"keys": 0,
"widthName": 60,
"widthComment": 60,
"widthDataType": 75,
"widthDefault": 60
},
"meta": {
"updateAt": 1748325712931,
"createAt": 1748325689339
}
},
"hmZlcR-Pw2C_ife1zzo5o": {
"id": "hmZlcR-Pw2C_ife1zzo5o",
"tableId": "B4qGh3KZsXHQ3_4EOgwJZ",
"name": "created_at",
"comment": "",
"dataType": "TIMESTAMP",
"default": "CURRENT_TIMESTAMP",
"options": 8,
"ui": {
"keys": 0,
"widthName": 60,
"widthComment": 60,
"widthDataType": 65,
"widthDefault": 122
},
"meta": {
"updateAt": 1748326090783,
"createAt": 1748326062212
}
} }
}, },
"relationshipEntities": { "relationshipEntities": {
@ -7863,7 +7919,7 @@
"_AcWUYKzNJd-V0fRHq8Cx" "_AcWUYKzNJd-V0fRHq8Cx"
], ],
"x": 1701.0947, "x": 1701.0947,
"y": 857.4039, "y": 830.7372333333333,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -7918,8 +7974,8 @@
"columnIds": [ "columnIds": [
"7B0zaLoZnOoMNW8OHZlrQ" "7B0zaLoZnOoMNW8OHZlrQ"
], ],
"x": 1781.6193, "x": 1985.4168,
"y": 1365.13, "y": 1524.6241,
"direction": 1 "direction": 1
}, },
"end": { "end": {
@ -7928,7 +7984,7 @@
"f7_MGvRjkwL1xkCWrAgDR" "f7_MGvRjkwL1xkCWrAgDR"
], ],
"x": 1648.0778, "x": 1648.0778,
"y": 1495.0726, "y": 1489.0726,
"direction": 2 "direction": 2
}, },
"meta": { "meta": {
@ -7947,7 +8003,7 @@
"_AcWUYKzNJd-V0fRHq8Cx" "_AcWUYKzNJd-V0fRHq8Cx"
], ],
"x": 1701.0947, "x": 1701.0947,
"y": 1017.4039, "y": 1044.0705666666665,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -7955,8 +8011,8 @@
"columnIds": [ "columnIds": [
"5KRw8TtT2nLqpYfKFOBwe" "5KRw8TtT2nLqpYfKFOBwe"
], ],
"x": 1781.6193, "x": 1985.4168,
"y": 1229.13, "y": 1388.6241,
"direction": 1 "direction": 1
}, },
"meta": { "meta": {
@ -8123,8 +8179,8 @@
"columnIds": [ "columnIds": [
"eCpp9N4KVZH6f5eRxZxvU" "eCpp9N4KVZH6f5eRxZxvU"
], ],
"x": 842.8799, "x": 895.5115,
"y": 1900.8701, "y": 1902.1859,
"direction": 4 "direction": 4
}, },
"meta": { "meta": {
@ -8199,7 +8255,7 @@
"Id0h8QbOdlhPj9P1zTm5o" "Id0h8QbOdlhPj9P1zTm5o"
], ],
"x": 1648.0778, "x": 1648.0778,
"y": 1619.0726, "y": 1601.0726,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -8226,8 +8282,8 @@
"columnIds": [ "columnIds": [
"F9EPb6nsDx6Tf3GG8rvP1" "F9EPb6nsDx6Tf3GG8rvP1"
], ],
"x": 1653.7379, "x": 1659.0011,
"y": 1777.6012, "y": 1767.6311857142855,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -8254,8 +8310,8 @@
"columnIds": [ "columnIds": [
"F9EPb6nsDx6Tf3GG8rvP1" "F9EPb6nsDx6Tf3GG8rvP1"
], ],
"x": 1653.7379, "x": 1659.0011,
"y": 1817.6012, "y": 1816.7740428571426,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -8283,7 +8339,7 @@
"Jh6e_-9QYe1Tqve0PE3kT" "Jh6e_-9QYe1Tqve0PE3kT"
], ],
"x": 1659.0777, "x": 1659.0777,
"y": 2190.6735, "y": 2178.6735,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -8310,8 +8366,8 @@
"columnIds": [ "columnIds": [
"F9EPb6nsDx6Tf3GG8rvP1" "F9EPb6nsDx6Tf3GG8rvP1"
], ],
"x": 1653.7379, "x": 1659.0011,
"y": 1857.6012, "y": 1865.9168999999997,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -8339,7 +8395,7 @@
"203b3hUKUQ_Gu5wKShBgZ" "203b3hUKUQ_Gu5wKShBgZ"
], ],
"x": 1664.9716, "x": 1664.9716,
"y": 2459.2306, "y": 2447.2306,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -8366,8 +8422,8 @@
"columnIds": [ "columnIds": [
"F9EPb6nsDx6Tf3GG8rvP1" "F9EPb6nsDx6Tf3GG8rvP1"
], ],
"x": 1653.7379, "x": 1659.0011,
"y": 1897.6012, "y": 1915.0597571428568,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -8395,7 +8451,7 @@
"WaCB3uNZYFReAPiBqQ97v" "WaCB3uNZYFReAPiBqQ97v"
], ],
"x": 1665.2797, "x": 1665.2797,
"y": 2709.4913, "y": 2697.4913,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -8422,8 +8478,8 @@
"columnIds": [ "columnIds": [
"F9EPb6nsDx6Tf3GG8rvP1" "F9EPb6nsDx6Tf3GG8rvP1"
], ],
"x": 1653.7379, "x": 1659.0011,
"y": 1977.6012, "y": 2013.345471428571,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -8451,7 +8507,7 @@
"zBz4vBOZSIA8vKmfqXckO" "zBz4vBOZSIA8vKmfqXckO"
], ],
"x": 1671.2675, "x": 1671.2675,
"y": 3320.8644, "y": 3308.8644,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -8478,8 +8534,8 @@
"columnIds": [ "columnIds": [
"F9EPb6nsDx6Tf3GG8rvP1" "F9EPb6nsDx6Tf3GG8rvP1"
], ],
"x": 1653.7379, "x": 1659.0011,
"y": 1937.6012, "y": 1964.202614285714,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -8507,7 +8563,7 @@
"2HB01q46-mugMjuOz85YG" "2HB01q46-mugMjuOz85YG"
], ],
"x": 1664.7414, "x": 1664.7414,
"y": 2982.6365, "y": 2970.6365,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -8562,7 +8618,7 @@
"columnIds": [ "columnIds": [
"XnNj7H0bnTxo_NuZm7BOs" "XnNj7H0bnTxo_NuZm7BOs"
], ],
"x": 1687.6231, "x": 1667.3699,
"y": 3625.7977, "y": 3625.7977,
"direction": 2 "direction": 2
}, },
@ -8590,8 +8646,8 @@
"columnIds": [ "columnIds": [
"F9EPb6nsDx6Tf3GG8rvP1" "F9EPb6nsDx6Tf3GG8rvP1"
], ],
"x": 1653.7379, "x": 1659.0011,
"y": 1737.6012, "y": 1718.4883285714284,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -8646,8 +8702,8 @@
"columnIds": [ "columnIds": [
"7B0zaLoZnOoMNW8OHZlrQ" "7B0zaLoZnOoMNW8OHZlrQ"
], ],
"x": 2297.6193000000003, "x": 2501.4168,
"y": 1297.13, "y": 1456.6241,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -8663,6 +8719,34 @@
"updateAt": 1748244625114, "updateAt": 1748244625114,
"createAt": 1748244625114 "createAt": 1748244625114
} }
},
"qgPy4U4lAP_gp6rQEuti-": {
"id": "qgPy4U4lAP_gp6rQEuti-",
"identification": false,
"relationshipType": 16,
"startRelationshipType": 2,
"start": {
"tableId": "6ajvOCaGuXU9pzV0Y9jEi",
"columnIds": [
"_AcWUYKzNJd-V0fRHq8Cx"
],
"x": 1701.0947,
"y": 937.4038999999999,
"direction": 2
},
"end": {
"tableId": "GRBrbb1hqwKSRMfod3I7U",
"columnIds": [
"skdAqnMsTEE6ZKbCD14VX"
],
"x": 1985.5598,
"y": 1128.3294,
"direction": 1
},
"meta": {
"updateAt": 1748318198956,
"createAt": 1748318198956
}
} }
}, },
"indexEntities": {}, "indexEntities": {},

View File

@ -0,0 +1,11 @@
<?php
namespace App\Entities\Customer;
use App\Models\Customer\DomainModel;
class DomainEntity extends CustomerEntity
{
const PK = DomainModel::PK;
const TITLE = DomainModel::TITLE;
}

View File

@ -1,15 +0,0 @@
<?php
namespace App\Entities\Equipment\Link;
use App\Models\Equipment\Link\DomainModel;
class DomainEntity extends LinkEntity
{
const PK = DomainModel::PK;
const TITLE = DomainModel::TITLE;
public function getAdapterInfoUID(): string
{
return $this->attributes['domaininfo_uid'];
}
}

View File

@ -1,11 +0,0 @@
<?php
namespace App\Entities\Equipment\Part;
use App\Models\Equipment\Part\DomainModel;
class DomainEntity extends PartEntity
{
const PK = DomainModel::PK;
const TITLE = DomainModel::TITLE;
}

View File

@ -1,11 +1,11 @@
<?php <?php
namespace App\Helpers\Equipment\Link; namespace App\Helpers\Customer;
use App\Models\Equipment\Link\DomainModel; use App\Models\Customer\DomainModel;
use CodeIgniter\HTTP\IncomingRequest; use CodeIgniter\HTTP\IncomingRequest;
class DomainHelper extends LinkHelper class DomainHelper extends CustomerHelper
{ {
protected ?IncomingRequest $request = null; protected ?IncomingRequest $request = null;
public function __construct(?IncomingRequest $request = null) public function __construct(?IncomingRequest $request = null)

View File

@ -1,16 +0,0 @@
<?php
namespace App\Helpers\Equipment\Part;
use App\Models\Equipment\Part\DomainModel;
use CodeIgniter\HTTP\IncomingRequest;
class DomainHelper extends PartHelper
{
protected ?IncomingRequest $request = null;
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
$this->setTitleField(field: DomainModel::TITLE);
}
}

View File

@ -66,7 +66,6 @@ class ServerHelper extends EquipmentHelper
case "DISK": case "DISK":
case "DEFENCE": case "DEFENCE":
case "SOFTWARE": case "SOFTWARE":
case "DOMAIN":
$temps = []; $temps = [];
foreach ($viewDatas['entity']->getPartEntities($field) as $partEntity) { foreach ($viewDatas['entity']->getPartEntities($field) as $partEntity) {
$temps[] = "<div>" . $partEntity->getTitle() . "</div>"; $temps[] = "<div>" . $partEntity->getTitle() . "</div>";

View File

@ -2,6 +2,7 @@
return [ return [
'title' => "Domain정보", 'title' => "Domain정보",
'label' => [ 'label' => [
'clientinfo_uid' => "고객",
'domain' => "도메인", 'domain' => "도메인",
'price' => "금액", 'price' => "금액",
'description' => "설명", 'description' => "설명",

View File

@ -1,9 +0,0 @@
<?php
return [
'title' => "Domain연결정보",
'label' => [
'serverinfo_uid' => "서버",
'domaininfo_uid' => "Domain",
'created_at' => "작성일",
],
];

View File

@ -3,32 +3,38 @@ return [
'title' => "서버장비정보", 'title' => "서버장비정보",
'label' => [ 'label' => [
'code' => "장비코드", 'code' => "장비코드",
'type' => "종류", 'switch' => "스위치",
'type' => "용도",
'model' => "모델", 'model' => "모델",
'price' => "금액", 'price' => "금액",
'raid' => "RAID", 'raid' => "RAID",
'description' => "설명", 'description' => "설명",
'status' => "상태", 'status' => "상태",
'manufactur_at' => "입고일",
'updated_at' => "수정일", 'updated_at' => "수정일",
'created_at' => "작성일", 'created_at' => "작성일",
'LINE' => "회선", 'LINE' => "회선",
'IP' => "IP", 'IP' => "IP",
'CPU' => "CPU", 'CPU' => "CPU",
'RAM' => "RAM", 'RAM' => "RAM",
'DISK' => "DISK", 'DISK' => "DISK",
'DEFENCE' => "방어", 'DEFENCE' => "방어(CS)",
'SOFTWARE' => "소프트웨어", 'SOFTWARE' => "소프트웨어",
'DOMAIN' => "도메인", 'DOMAIN' => "도메인",
], ],
'DEFAULTS' => [ 'DEFAULTS' => [
'type' => 'RacKMount', 'type' => 'default',
'status' => 'default', 'status' => 'default',
], ],
"TYPE" => [ "TYPE" => [
"Rack" => "RacKMount", "default" => "일반",
"PC" => "조립PC", "defence" => "방어",
"MiniPC" => "MiniPC", "dedicated" => "전용",
"colocation" => "코로케이션", "alternative" => "대체",
"test" => "테스트",
"VPN" => "VPN",
"own" => "자사용",
"colocation" => "코로케이션",
], ],
"MODEL" => [ "MODEL" => [
"HP DL360 Gen 6" => "HP DL360 Gen 6", "HP DL360 Gen 6" => "HP DL360 Gen 6",
@ -42,14 +48,14 @@ return [
"12,13,14세대 MiniPC" => "12,13,14세대 MiniPC", "12,13,14세대 MiniPC" => "12,13,14세대 MiniPC",
], ],
"RAID" => [ "RAID" => [
'default' => "없음", 'default' => "없음",
"RAID0" => "RAID0", "RAID0" => "RAID0",
"RAID1" => "RAID1", "RAID1" => "RAID1",
"RAID5" => "RAID5", "RAID5" => "RAID5",
"RAID6" => "RAID6", "RAID6" => "RAID6",
], ],
"STATUS" => [ "STATUS" => [
'default' => "사용가능", 'default' => "사용가능",
"pause" => "일시정지", "pause" => "일시정지",
"occupied" => "사용중", "occupied" => "사용중",
], ],

View File

@ -1,4 +1,6 @@
<?php <?php
// override core en language system validation or define your own en language validation message // override core en language system validation or define your own en language validation message
return []; return [
'valid_domain' => '올바른 도메인 형식이 아닙니다.',
];

View File

@ -1,10 +1,10 @@
<?php <?php
namespace App\Models\Equipment\Part; namespace App\Models\Customer;
use App\Entities\Equipment\Part\DomainEntity; use App\Entities\Customer\DomainEntity;
class DomainModel extends PartModel class DomainModel extends CustomerModel
{ {
const TABLE = "domaininfo"; const TABLE = "domaininfo";
const PK = "uid"; const PK = "uid";
@ -13,6 +13,7 @@ class DomainModel extends PartModel
protected $primaryKey = self::PK; protected $primaryKey = self::PK;
protected $returnType = DomainEntity::class; protected $returnType = DomainEntity::class;
protected $allowedFields = [ protected $allowedFields = [
"clientinfo_uid",
"domain", "domain",
"price", "price",
"status", "status",
@ -29,8 +30,9 @@ class DomainModel extends PartModel
} }
switch ($field) { switch ($field) {
case "domain": case "domain":
$rule = "required|trim|string"; $rule = "required|trim|valid_domain";
break; break;
case "clientinfo_uid":
case "price": case "price":
$rule = "required|numeric"; $rule = "required|numeric";
break; break;

View File

@ -6,7 +6,7 @@ use App\Entities\Equipment\Link\DefenceEntity;
class DefenceModel extends LinkModel class DefenceModel extends LinkModel
{ {
const TABLE = "serverinfos_domaininfos"; const TABLE = "serverinfos_defenceinfos";
const PK = "uid"; const PK = "uid";
const TITLE = "uid"; const TITLE = "uid";
protected $table = self::TABLE; protected $table = self::TABLE;

View File

@ -1,24 +0,0 @@
<?php
namespace App\Models\Equipment\Link;
use App\Entities\Equipment\Link\DomainEntity;
class DomainModel extends LinkModel
{
const TABLE = "serverinfos_domaininfos";
const PK = "uid";
const TITLE = "uid";
protected $table = self::TABLE;
protected $primaryKey = self::PK;
protected $returnType = DomainEntity::class;
protected $allowedFields = [
"serverinfo_uid",
"domaininfo_uid",
"updated_at",
];
public function __construct()
{
parent::__construct();
}
}

View File

@ -14,10 +14,12 @@ class ServerModel extends EquipmentModel
protected $returnType = ServerEntity::class; protected $returnType = ServerEntity::class;
protected $allowedFields = [ protected $allowedFields = [
"code", "code",
"switch",
"type", "type",
"model", "model",
"price", "price",
"raid", "raid",
"manufactur_at",
"description", "description",
"status", "status",
"updated_at" "updated_at"
@ -33,6 +35,7 @@ class ServerModel extends EquipmentModel
} }
switch ($field) { switch ($field) {
case "code": case "code":
case "switch":
case "model": case "model":
case "type": case "type":
case "raid": case "raid":
@ -41,6 +44,9 @@ class ServerModel extends EquipmentModel
case "price": case "price":
$rule = "required|numeric"; $rule = "required|numeric";
break; break;
case "manufactur_at":
$rule = "required|valid_date";
break;
default: default:
$rule = parent::getFieldRule($action, $field); $rule = parent::getFieldRule($action, $field);
break; break;

View File

@ -1,12 +1,12 @@
<?php <?php
namespace App\Services\Equipment\Part; namespace App\Services\Customer;
use App\Entities\Equipment\Part\DomainEntity; use App\Entities\Customer\DomainEntity;
use App\Models\Equipment\Part\DomainModel; use App\Models\Customer\DomainModel;
use CodeIgniter\HTTP\IncomingRequest; use CodeIgniter\HTTP\IncomingRequest;
class DomainService extends PartService class DomainService extends CustomerService
{ {
protected ?IncomingRequest $request = null; protected ?IncomingRequest $request = null;
public function __construct(?IncomingRequest $request = null) public function __construct(?IncomingRequest $request = null)
@ -25,6 +25,7 @@ class DomainService extends PartService
public function getFields(): array public function getFields(): array
{ {
return [ return [
"clientinfo_uid",
"domain", "domain",
"price", "price",
"status", "status",
@ -32,7 +33,7 @@ class DomainService extends PartService
} }
public function getFilterFields(): array public function getFilterFields(): array
{ {
return ['status',]; return ["clientinfo_uid", 'status',];
} }
public function getBatchJobFields(): array public function getBatchJobFields(): array
{ {

View File

@ -1,35 +0,0 @@
<?php
namespace App\Services\Equipment\Link;
use CodeIgniter\HTTP\IncomingRequest;
use App\Entities\Equipment\Link\DomainEntity;
use App\Models\Equipment\Link\DomainModel;
use App\Services\Equipment\Part\DomainService as AdapterService;
class DomainService extends LinkService
{
protected ?IncomingRequest $request = null;
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
$this->addClassName('Domain');
}
public function getModelClass(): DomainModel
{
return new DomainModel;
}
public function getEntityClass(): DomainEntity
{
return new DomainEntity();
}
protected function getAdapterService(): AdapterService
{
return new AdapterService();
}
protected function getAdapterField(): string
{
return "domaininfo_uid";
}
}

View File

@ -27,6 +27,8 @@ class ServerService extends EquipmentService
{ {
return [ return [
"code", "code",
"switch",
"manufactur_at",
"type", "type",
"model", "model",
"price", "price",

View File

@ -0,0 +1,20 @@
<?php
namespace App\Validations;
class UrlRules
{
/**
* 유효한 도메인인지 확인
*/
public function valid_domain(string $str, string $fields, array $data): bool
{
// 기본적인 정규식 검사 (예: example.com, sub.example.co.kr)
if (!preg_match('/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i', $str)) {
return false;
}
// 실제 DNS 확인도 하고 싶다면 (옵션)
// return checkdnsrr($str, 'A') || checkdnsrr($str, 'AAAA') || checkdnsrr($str, 'MX');
return true;
}
}

View File

@ -41,7 +41,7 @@
<td><?= $viewDatas['helper']->getListButton('delete', $viewDatas) ?></td> <td><?= $viewDatas['helper']->getListButton('delete', $viewDatas) ?></td>
</tr> </tr>
<tr> <tr>
<td colspan="8"> <td colspan="11">
<table class="table table-bordered table-hover table-striped"> <table class="table table-bordered table-hover table-striped">
<tr> <tr>
<?php foreach ($viewDatas['adapterFields'] as $field): ?> <?php foreach ($viewDatas['adapterFields'] as $field): ?>

View File

@ -17,6 +17,9 @@
<div class="accordion-item"> <div class="accordion-item">
<a href="/admin/customer/point"><?= ICONS['FLAG'] ?> Point내역</a> <a href="/admin/customer/point"><?= ICONS['FLAG'] ?> Point내역</a>
</div> </div>
<div class="accordion-item">
<a href="/admin/customer/domain"><?= ICONS['FLAG'] ?>도메인정보</a>
</div>
<div class="accordion-item"> <div class="accordion-item">
<a href="/admin/customer/service"><?= ICONS['CARD'] ?> 서비스내역</a> <a href="/admin/customer/service"><?= ICONS['CARD'] ?> 서비스내역</a>
</div> </div>

View File

@ -17,9 +17,6 @@
<div class="accordion-item"> <div class="accordion-item">
<a href="/admin/equipment/part/software"><?= ICONS['FLAG'] ?>Software정보</a> <a href="/admin/equipment/part/software"><?= ICONS['FLAG'] ?>Software정보</a>
</div> </div>
<div class="accordion-item">
<a href="/admin/equipment/part/domain"><?= ICONS['FLAG'] ?>도메인정보</a>
</div>
<div class="accordion-item"> <div class="accordion-item">
<a href="/admin/equipment/part/cpu"><?= ICONS['SETUP'] ?>CPU정보</a> <a href="/admin/equipment/part/cpu"><?= ICONS['SETUP'] ?>CPU정보</a>
</div> </div>