diff --git a/app/Config/Constants.php b/app/Config/Constants.php index 1c08264..6bcbf12 100644 --- a/app/Config/Constants.php +++ b/app/Config/Constants.php @@ -405,9 +405,9 @@ define("SERVICE", [ define("SERVERPART", [ "CNT_RANGE" => array_combine(range(1, 10), range(1, 10)), "STOCK_PARTTYPES" => ['CPU', 'RAM', 'DISK'], - "SERVER_PARTTYPES" => ['CPU', 'RAM', 'DISK', 'ETC'], - "SERVICE_PARTTYPES" => ['SWITCH', 'IP', 'OS', 'SOFTWARE', 'CS', 'ETC'], - "ALL_PARTTYPES" => ['CPU', 'RAM', 'DISK', 'OS', 'DB', 'SOFTWARE', 'SWITCH', 'IP', 'CS', 'ETC'], + "SERVER_PARTTYPES" => ['CPU', 'RAM', 'DISK'], + "SERVICE_PARTTYPES" => ['Switch', 'IP', 'OS', 'SOFTWARE', 'CS'], + "ALL_PARTTYPES" => ['CPU', 'RAM', 'DISK', 'OS', 'SOFTWARE', 'Switch', 'IP', 'CS'], ]); //결제 관련 define("PAYMENT", [ diff --git a/app/Config/Routes.php b/app/Config/Routes.php index a688ded..8e9d222 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -125,19 +125,6 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au $routes->get('download/(:alpha)', 'ServiceController::download/$1'); $routes->post('history/(:num)', 'ServiceController::history/$1'); }); - $routes->group('serviceitem', ['namespace' => 'App\Controllers\Admin\Customer'], function ($routes) { - $routes->get('/', 'ServiceItemController::index'); - $routes->get('create', 'ServiceItemController::create_form'); - $routes->post('create', 'ServiceItemController::create'); - $routes->get('modify/(:num)', 'ServiceItemController::modify_form/$1'); - $routes->post('modify/(:num)', 'ServiceItemController::modify/$1'); - $routes->get('view/(:num)', 'ServiceItemController::view/$1'); - $routes->get('delete/(:num)', 'ServiceItemController::delete/$1'); - $routes->get('toggle/(:num)/(:any)', 'ServiceItemController::toggle/$1/$2'); - $routes->post('batchjob', 'ServiceItemController::batchjob'); - $routes->post('batchjob_delete', 'ServiceItemController::batchjob_delete'); - $routes->get('download/(:alpha)', 'ServiceItemController::download/$1'); - }); $routes->group('payment', ['namespace' => 'App\Controllers\Admin\Customer'], function ($routes) { $routes->get('/', 'PaymentController::index'); $routes->get('create', 'PaymentController::create_form'); @@ -156,18 +143,18 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au //Customer 관련 //Equipment 관련 $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('line', ['namespace' => 'App\Controllers\Admin\Equipment'], function ($routes) { + $routes->get('/', 'LineController::index'); + $routes->get('create', 'LineController::create_form'); + $routes->post('create', 'LineController::create'); + $routes->get('modify/(:num)', 'LineController::modify_form/$1'); + $routes->post('modify/(:num)', 'LineController::modify/$1'); + $routes->get('view/(:num)', 'LineController::view/$1'); + $routes->get('delete/(:num)', 'LineController::delete/$1'); + $routes->get('toggle/(:num)/(:any)', 'LineController::toggle/$1/$2'); + $routes->post('batchjob', 'LineController::batchjob'); + $routes->post('batchjob_delete', 'LineController::batchjob_delete'); + $routes->get('download/(:alpha)', 'LineController::download/$1'); }); $routes->group('server', ['namespace' => 'App\Controllers\Admin\Equipment'], function ($routes) { $routes->get('/', 'ServerController::index'); @@ -194,20 +181,24 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au $routes->post('batchjob_delete', 'ServerPartController::batchjob_delete'); $routes->get('download/(:alpha)', 'ServerPartController::download/$1'); }); - $routes->group('line', ['namespace' => 'App\Controllers\Admin\Equipment'], function ($routes) { - $routes->get('/', 'LineController::index'); - $routes->get('create', 'LineController::create_form'); - $routes->post('create', 'LineController::create'); - $routes->get('modify/(:num)', 'LineController::modify_form/$1'); - $routes->post('modify/(:num)', 'LineController::modify/$1'); - $routes->get('view/(:num)', 'LineController::view/$1'); - $routes->get('delete/(:num)', 'LineController::delete/$1'); - $routes->get('toggle/(:num)/(:any)', 'LineController::toggle/$1/$2'); - $routes->post('batchjob', 'LineController::batchjob'); - $routes->post('batchjob_delete', 'LineController::batchjob_delete'); - $routes->get('download/(:alpha)', 'LineController::download/$1'); + }); + //Equipment 관련 + //Part 관련 + $routes->group('part', ['namespace' => 'App\Controllers\Admin\Part'], function ($routes) { + $routes->group('switch', ['namespace' => 'App\Controllers\Admin\Part'], 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('ip', ['namespace' => 'App\Controllers\Admin\Equipment'], function ($routes) { + $routes->group('ip', ['namespace' => 'App\Controllers\Admin\Part'], function ($routes) { $routes->get('/', 'IPController::index'); $routes->get('create', 'IPController::create_form'); $routes->post('create', 'IPController::create'); @@ -220,7 +211,7 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au $routes->post('batchjob_delete', 'IPController::batchjob_delete'); $routes->get('download/(:alpha)', 'IPController::download/$1'); }); - $routes->group('cs', ['namespace' => 'App\Controllers\Admin\Equipment'], function ($routes) { + $routes->group('cs', ['namespace' => 'App\Controllers\Admin\Part'], function ($routes) { $routes->get('/', 'CSController::index'); $routes->get('create', 'CSController::create_form'); $routes->post('create', 'CSController::create'); @@ -233,32 +224,71 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au $routes->post('batchjob_delete', 'CSController::batchjob_delete'); $routes->get('download/(:alpha)', 'CSController::download/$1'); }); - $routes->group('part', ['namespace' => 'App\Controllers\Admin\Equipment'], function ($routes) { - $routes->get('/', 'PartController::index'); - $routes->get('create', 'PartController::create_form'); - $routes->post('create', 'PartController::create'); - $routes->get('modify/(:num)', 'PartController::modify_form/$1'); - $routes->post('modify/(:num)', 'PartController::modify/$1'); - $routes->get('view/(:num)', 'PartController::view/$1'); - $routes->get('delete/(:num)', 'PartController::delete/$1'); - $routes->get('toggle/(:num)/(:any)', 'PartController::toggle/$1/$2'); - $routes->post('batchjob', 'PartController::batchjob'); - $routes->post('batchjob_delete', 'PartController::batchjob_delete'); - $routes->get('download/(:alpha)', 'PartController::download/$1'); + $routes->group('cpu', ['namespace' => 'App\Controllers\Admin\Part'], function ($routes) { + $routes->get('/', 'CPUController::index'); + $routes->get('create', 'CPUController::create_form'); + $routes->post('create', 'CPUController::create'); + $routes->get('modify/(:num)', 'CPUController::modify_form/$1'); + $routes->post('modify/(:num)', 'CPUController::modify/$1'); + $routes->get('view/(:num)', 'CPUController::view/$1'); + $routes->get('delete/(:num)', 'CPUController::delete/$1'); + $routes->get('toggle/(:num)/(:any)', 'CPUController::toggle/$1/$2'); + $routes->post('batchjob', 'CPUController::batchjob'); + $routes->post('batchjob_delete', 'CPUController::batchjob_delete'); + $routes->get('download/(:alpha)', 'CPUController::download/$1'); }); - $routes->group('onetime', ['namespace' => 'App\Controllers\Admin\Equipment'], function ($routes) { - $routes->get('/', 'OnetimeController::index'); - $routes->get('create', 'OnetimeController::create_form'); - $routes->post('create', 'OnetimeController::create'); - $routes->get('modify/(:num)', 'OnetimeController::modify_form/$1'); - $routes->post('modify/(:num)', 'OnetimeController::modify/$1'); - $routes->get('view/(:num)', 'OnetimeController::view/$1'); - $routes->get('delete/(:num)', 'OnetimeController::delete/$1'); - $routes->get('toggle/(:num)/(:any)', 'OnetimeController::toggle/$1/$2'); - $routes->post('batchjob', 'OnetimeController::batchjob'); - $routes->post('batchjob_delete', 'OnetimeController::batchjob_delete'); - $routes->get('download/(:alpha)', 'OnetimeController::download/$1'); + $routes->group('ram', ['namespace' => 'App\Controllers\Admin\Part'], function ($routes) { + $routes->get('/', 'RAMController::index'); + $routes->get('create', 'RAMController::create_form'); + $routes->post('create', 'RAMController::create'); + $routes->get('modify/(:num)', 'RAMController::modify_form/$1'); + $routes->post('modify/(:num)', 'RAMController::modify/$1'); + $routes->get('view/(:num)', 'RAMController::view/$1'); + $routes->get('delete/(:num)', 'RAMController::delete/$1'); + $routes->get('toggle/(:num)/(:any)', 'RAMController::toggle/$1/$2'); + $routes->post('batchjob', 'RAMController::batchjob'); + $routes->post('batchjob_delete', 'RAMController::batchjob_delete'); + $routes->get('download/(:alpha)', 'RAMController::download/$1'); + }); + $routes->group('disk', ['namespace' => 'App\Controllers\Admin\Part'], function ($routes) { + $routes->get('/', 'DISKController::index'); + $routes->get('create', 'DISKController::create_form'); + $routes->post('create', 'DISKController::create'); + $routes->get('modify/(:num)', 'DISKController::modify_form/$1'); + $routes->post('modify/(:num)', 'DISKController::modify/$1'); + $routes->get('view/(:num)', 'DISKController::view/$1'); + $routes->get('delete/(:num)', 'DISKController::delete/$1'); + $routes->get('toggle/(:num)/(:any)', 'DISKController::toggle/$1/$2'); + $routes->post('batchjob', 'DISKController::batchjob'); + $routes->post('batchjob_delete', 'DISKController::batchjob_delete'); + $routes->get('download/(:alpha)', 'DISKController::download/$1'); + }); + $routes->group('os', ['namespace' => 'App\Controllers\Admin\Part'], function ($routes) { + $routes->get('/', 'OSController::index'); + $routes->get('create', 'OSController::create_form'); + $routes->post('create', 'OSController::create'); + $routes->get('modify/(:num)', 'OSController::modify_form/$1'); + $routes->post('modify/(:num)', 'OSController::modify/$1'); + $routes->get('view/(:num)', 'OSController::view/$1'); + $routes->get('delete/(:num)', 'OSController::delete/$1'); + $routes->get('toggle/(:num)/(:any)', 'OSController::toggle/$1/$2'); + $routes->post('batchjob', 'OSController::batchjob'); + $routes->post('batchjob_delete', 'OSController::batchjob_delete'); + $routes->get('download/(:alpha)', 'OSController::download/$1'); + }); + $routes->group('software', ['namespace' => 'App\Controllers\Admin\Part'], function ($routes) { + $routes->get('/', 'SOFTWAREController::index'); + $routes->get('create', 'SOFTWAREController::create_form'); + $routes->post('create', 'SOFTWAREController::create'); + $routes->get('modify/(:num)', 'SOFTWAREController::modify_form/$1'); + $routes->post('modify/(:num)', 'SOFTWAREController::modify/$1'); + $routes->get('view/(:num)', 'SOFTWAREController::view/$1'); + $routes->get('delete/(:num)', 'SOFTWAREController::delete/$1'); + $routes->get('toggle/(:num)/(:any)', 'SOFTWAREController::toggle/$1/$2'); + $routes->post('batchjob', 'SOFTWAREController::batchjob'); + $routes->post('batchjob_delete', 'SOFTWAREController::batchjob_delete'); + $routes->get('download/(:alpha)', 'SOFTWAREController::download/$1'); }); }); - //Equipment 관련 + //Part 관련 }); diff --git a/app/Controllers/Admin/Equipment/PartController.php b/app/Controllers/Admin/Equipment/PartController.php deleted file mode 100644 index cafa72d..0000000 --- a/app/Controllers/Admin/Equipment/PartController.php +++ /dev/null @@ -1,55 +0,0 @@ -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(): PartService - { - if (!$this->_service) { - $this->_service = new PartService(); - } - return $this->_service; - } - //Index,FieldForm관 - // protected function index_process(array $entities = []): array - // { - // $where = null; - // $columns = [ - // "uid", - // "code", - // "CASE - // WHEN code LIKE 'CPU%' THEN 'CPU' - // WHEN code LIKE 'RAM%' THEN 'RAM' - // WHEN code LIKE 'DISK%' THEN 'DISK' - // WHEN code LIKE 'OS%' THEN 'OS' - // WHEN code LIKE 'DB%' THEN 'DB' - // WHEN code LIKE 'SOFTWARE%' THEN 'SOFTWARE' - // ELSE 'UNKNOWN' - // END AS type", - // "title", - // "price", - // "status", - // ]; - // foreach ($this->getService()->getEntities($where, $columns) as $entity) { - // $entities[] = $entity; - // } - // return $entities; - // } -} diff --git a/app/Controllers/Admin/Part/CPUController.php b/app/Controllers/Admin/Part/CPUController.php new file mode 100644 index 0000000..f41f6e8 --- /dev/null +++ b/app/Controllers/Admin/Part/CPUController.php @@ -0,0 +1,29 @@ +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(): CPUService + { + if (!$this->_service) { + $this->_service = new CPUService(); + } + return $this->_service; + } +} diff --git a/app/Controllers/Admin/Equipment/CSController.php b/app/Controllers/Admin/Part/CSController.php similarity index 83% rename from app/Controllers/Admin/Equipment/CSController.php rename to app/Controllers/Admin/Part/CSController.php index 191054d..c2e3aeb 100644 --- a/app/Controllers/Admin/Equipment/CSController.php +++ b/app/Controllers/Admin/Part/CSController.php @@ -1,15 +1,14 @@ 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(): DISKService + { + if (!$this->_service) { + $this->_service = new DISKService(); + } + return $this->_service; + } + //Index,FieldForm관 +} diff --git a/app/Controllers/Admin/Equipment/IPController.php b/app/Controllers/Admin/Part/IPController.php similarity index 87% rename from app/Controllers/Admin/Equipment/IPController.php rename to app/Controllers/Admin/Part/IPController.php index 7d911d3..d68da91 100644 --- a/app/Controllers/Admin/Equipment/IPController.php +++ b/app/Controllers/Admin/Part/IPController.php @@ -1,9 +1,8 @@ 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(): OSService + { + if (!$this->_service) { + $this->_service = new OSService(); + } + return $this->_service; + } + //Index,FieldForm관 +} diff --git a/app/Controllers/Admin/Part/PartController.php b/app/Controllers/Admin/Part/PartController.php new file mode 100644 index 0000000..6d7cb65 --- /dev/null +++ b/app/Controllers/Admin/Part/PartController.php @@ -0,0 +1,26 @@ +_serverService) { + $this->_serverService = new ServerService(); + } + return $this->_serverService; + } + //Index,FieldForm관련 +} diff --git a/app/Controllers/Admin/Part/RAMController.php b/app/Controllers/Admin/Part/RAMController.php new file mode 100644 index 0000000..593d718 --- /dev/null +++ b/app/Controllers/Admin/Part/RAMController.php @@ -0,0 +1,28 @@ +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(): RAMService + { + if (!$this->_service) { + $this->_service = new RAMService(); + } + return $this->_service; + } +} diff --git a/app/Controllers/Admin/Part/SOFTWAREController.php b/app/Controllers/Admin/Part/SOFTWAREController.php new file mode 100644 index 0000000..6268a33 --- /dev/null +++ b/app/Controllers/Admin/Part/SOFTWAREController.php @@ -0,0 +1,30 @@ +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(): SOFTWAREService + { + if (!$this->_service) { + $this->_service = new SOFTWAREService(); + } + return $this->_service; + } + //Index,FieldForm관 +} diff --git a/app/Controllers/Admin/Equipment/SwitchController.php b/app/Controllers/Admin/Part/SwitchController.php similarity index 85% rename from app/Controllers/Admin/Equipment/SwitchController.php rename to app/Controllers/Admin/Part/SwitchController.php index c3a970b..295e377 100644 --- a/app/Controllers/Admin/Equipment/SwitchController.php +++ b/app/Controllers/Admin/Part/SwitchController.php @@ -1,14 +1,14 @@ getTargetDB()->transStart(); try { @@ -57,48 +52,4 @@ abstract class DBMigration extends BaseController echo "{$functionName} 작업을 실패하였습니다.\n--------------\n" . $e->getMessage() . "\n--------------\n"; } } - - final public function client(): void - { - $this->migration( - new ClientProcess($this->getTargetDB()), - $this->getClient(), - __FUNCTION__ - ); - } - - final public function line(): void - { - $this->migration( - new LineProcess($this->getTargetDB()), - $this->getLine(), - __FUNCTION__ - ); - } - - final public function servercode(): void - { - $this->migration( - new ServerCodeProcess($this->getTargetDB()), - $this->getServerCode(), - __FUNCTION__ - ); - } - - final public function switchcode(): void - { - $this->migration( - new SwitchCodeProcess($this->getTargetDB()), - $this->getSwitchCode(), - __FUNCTION__ - ); - } - final public function partcode(): void - { - $this->migration( - new PartCodeProcess($this->getTargetDB()), - $this->getPartCode(), - __FUNCTION__ - ); - } } diff --git a/app/Controllers/CLI/DBMigration/SourceDB.php b/app/Controllers/CLI/DBMigration/SourceDB.php index c424225..6d36a66 100644 --- a/app/Controllers/CLI/DBMigration/SourceDB.php +++ b/app/Controllers/CLI/DBMigration/SourceDB.php @@ -6,7 +6,11 @@ use CodeIgniter\Database\BaseConnection; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use Psr\Log\LoggerInterface; -use App\Config\SourceDatabase; +use App\Libraries\DBMigration\Process\ClientProcess; +use App\Libraries\DBMigration\Process\LineProcess; +use App\Libraries\DBMigration\Process\ServerCodeProcess; +use App\Libraries\DBMigration\Process\SwitchCodeProcess; +use App\Libraries\DBMigration\Process\PartCodeProcess; class SourceDB extends DBMigration { @@ -99,4 +103,47 @@ class SourceDB extends DBMigration { return $this->executeFile('/home/donfig/dbmsv2/app/Database/dbmsv2_part.txt'); } + final public function client(): void + { + $this->migration( + new ClientProcess($this->getTargetDB()), + $this->getClient(), + __FUNCTION__ + ); + } + + final public function line(): void + { + $this->migration( + new LineProcess($this->getTargetDB()), + $this->getLine(), + __FUNCTION__ + ); + } + + final public function servercode(): void + { + $this->migration( + new ServerCodeProcess($this->getTargetDB()), + $this->getServerCode(), + __FUNCTION__ + ); + } + + final public function switchcode(): void + { + $this->migration( + new SwitchCodeProcess($this->getTargetDB()), + $this->getSwitchCode(), + __FUNCTION__ + ); + } + final public function partcode(): void + { + $this->migration( + new PartCodeProcess($this->getTargetDB()), + $this->getPartCode(), + __FUNCTION__ + ); + } } diff --git a/app/Database/dbmsv2.vuerd.json b/app/Database/dbmsv2.vuerd.json index c65df62..82a596e 100644 --- a/app/Database/dbmsv2.vuerd.json +++ b/app/Database/dbmsv2.vuerd.json @@ -4,13 +4,13 @@ "settings": { "width": 3000, "height": 3000, - "scrollTop": -1642.7873, - "scrollLeft": -144.3986, + "scrollTop": -1894.7873, + "scrollLeft": -297.3986, "zoomLevel": 0.79, "show": 511, "database": 4, "databaseName": "", - "canvasType": "ERD", + "canvasType": "@dineug/erd-editor/builtin-schema-sql", "language": 1, "tableNameCase": 4, "columnNameCase": 2, @@ -45,7 +45,11 @@ "IsMoJXzvtuoOFFt93qS0w", "SEgsi7mbM-56Rsx5-qj8K", "8GYAVBvZGaMFeq3QuXk_B", - "PdXX5ghGi8ZK89G9OjtnQ" + "PdXX5ghGi8ZK89G9OjtnQ", + "VN2Issjy8MFts5mr8-_9S", + "0SUAXsejoiaHZwmW8msS3", + "6lQ2M_5glzZEDHxKHx83G", + "FfKKPJaDUSq_L0PzVw0qB" ], "relationshipIds": [ "AH1dyESfueUlhcoiU6KsQ", @@ -322,25 +326,24 @@ "aY2pn1J3VHF_qV5XFM_zf" ], "ui": { - "x": 948.7756, - "y": 2042.6057, + "x": 1158.9021, + "y": 2142.6056, "zIndex": 2, "widthName": 60, "widthComment": 60, "color": "" }, "meta": { - "updateAt": 1758500902605, + "updateAt": 1758759786248, "createAt": 1745819764137 } }, "ZMGIWLFEswObjH2Sx0NlW": { "id": "ZMGIWLFEswObjH2Sx0NlW", - "name": "partinfo", - "comment": "PART정보", + "name": "cpuinfo", + "comment": "CPU정보", "columnIds": [ "2HB01q46-mugMjuOz85YG", - "OGYYobEerCY_Fsb8dqU0D", "1q8jG5dQKdD35_XYimkSk", "HYB03rpc8hol5HFnZGtAi", "Mp3WiH2boEKm5P3XFL0lQ", @@ -372,15 +375,15 @@ "xvHi50lODgZs-Ke-lH95g" ], "ui": { - "x": 111.629, - "y": 2093.0891, + "x": 92.6417, + "y": 2022.203, "zIndex": 2, "widthName": 60, "widthComment": 60, "color": "" }, "meta": { - "updateAt": 1758615408174, + "updateAt": 1758759723898, "createAt": 1745819764138 } }, @@ -959,6 +962,159 @@ "updateAt": 1755654886662, "createAt": 1755488593741 } + }, + "VN2Issjy8MFts5mr8-_9S": { + "id": "VN2Issjy8MFts5mr8-_9S", + "name": "raminfo", + "comment": "RAM정보", + "columnIds": [ + "_-xFLWWt9KM8X9w0Ifmi8", + "WDWnFfcgxcvc1RbGphgV_", + "QKvOgvtD0_UPX4wjExPly", + "qAyKLhnzQPHt5J4Swk7c1", + "rk96zaatKz-6B_vos4evc", + "aZE0-4Y5rAjHMOyt8LZPS", + "rMzzTIAh6gmzs1xxCpOUU", + "aGh3xeALEXZIO4ryEdeTJ" + ], + "seqColumnIds": [ + "_-xFLWWt9KM8X9w0Ifmi8", + "WDWnFfcgxcvc1RbGphgV_", + "QKvOgvtD0_UPX4wjExPly", + "qAyKLhnzQPHt5J4Swk7c1", + "rk96zaatKz-6B_vos4evc", + "aZE0-4Y5rAjHMOyt8LZPS", + "rMzzTIAh6gmzs1xxCpOUU", + "aGh3xeALEXZIO4ryEdeTJ" + ], + "ui": { + "x": 97.4684, + "y": 2312.389, + "zIndex": 5365, + "widthName": 60, + "widthComment": 60, + "color": "" + }, + "meta": { + "updateAt": 1758759961878, + "createAt": 1758759564253 + } + }, + "0SUAXsejoiaHZwmW8msS3": { + "id": "0SUAXsejoiaHZwmW8msS3", + "name": "diskinfo", + "comment": "DISK정보", + "columnIds": [ + "r3uRp_gmpyvxsDGuWdWgy", + "5F1R6RtemRJmP3Ahkyv2J", + "E5sDITHw_7mXwDMAXgXJn", + "e4rLa5ah9404ftzavjf4N", + "-aoGmupxR3WVamDcIRdR5", + "_tNaOvm69MLQg5qF-_OJO", + "Ii9wxgmQKXIrnM2pleOQ9", + "JO8ymjcCNe_MPrVmKRWn-", + "LrJ1wi95G76oooLA-9Etg" + ], + "seqColumnIds": [ + "r3uRp_gmpyvxsDGuWdWgy", + "5F1R6RtemRJmP3Ahkyv2J", + "E5sDITHw_7mXwDMAXgXJn", + "e4rLa5ah9404ftzavjf4N", + "-aoGmupxR3WVamDcIRdR5", + "_tNaOvm69MLQg5qF-_OJO", + "Ii9wxgmQKXIrnM2pleOQ9", + "JO8ymjcCNe_MPrVmKRWn-", + "LrJ1wi95G76oooLA-9Etg" + ], + "ui": { + "x": 603.7978, + "y": 2021.25, + "zIndex": 5380, + "widthName": 60, + "widthComment": 60, + "color": "" + }, + "meta": { + "updateAt": 1758759928890, + "createAt": 1758759596462 + } + }, + "6lQ2M_5glzZEDHxKHx83G": { + "id": "6lQ2M_5glzZEDHxKHx83G", + "name": "softwareinfo", + "comment": "소프트웨어정보", + "columnIds": [ + "Asn7nwT9GjjMmYcTX4wXv", + "QVFV0SgEZpaEUL6rh6-hW", + "bPLCmetjzux-4GilvvUJO", + "0mMuq9X72PA3WvfurTA0d", + "2r_fNpMagzMepzWTKJx81", + "yP_JqcAeT0xKY_owDhIfH", + "OilD9PfUMTNqJI69gKWtw", + "GpF8nYONyRFaSexZvhzu5" + ], + "seqColumnIds": [ + "Asn7nwT9GjjMmYcTX4wXv", + "QVFV0SgEZpaEUL6rh6-hW", + "bPLCmetjzux-4GilvvUJO", + "Cok4UfkV3u1dy_1jLeNrJ", + "0mMuq9X72PA3WvfurTA0d", + "2r_fNpMagzMepzWTKJx81", + "yP_JqcAeT0xKY_owDhIfH", + "OilD9PfUMTNqJI69gKWtw", + "GpF8nYONyRFaSexZvhzu5" + ], + "ui": { + "x": 102.5318, + "y": 2583.2749, + "zIndex": 5387, + "widthName": 68, + "widthComment": 86, + "color": "" + }, + "meta": { + "updateAt": 1758762821105, + "createAt": 1758759637696 + } + }, + "FfKKPJaDUSq_L0PzVw0qB": { + "id": "FfKKPJaDUSq_L0PzVw0qB", + "name": "osinfo", + "comment": "OS정보", + "columnIds": [ + "QdsS-0uL_5e3e06QA_j3Q", + "DJt6tYEL_T0gaWiKYG3xx", + "DSGSteH2BTfk7qHRhLwjO", + "PsRm4Fikl-4V0UP4zMDmc", + "J3W8i89XtySWfcPJMsDyW", + "ZMYQFNu7YhdsurJW_74qc", + "i0qqJAwb21-h-qVQwsJCL", + "s-UqSelR4i1Nkogv6fWsD" + ], + "seqColumnIds": [ + "QdsS-0uL_5e3e06QA_j3Q", + "DJt6tYEL_T0gaWiKYG3xx", + "DSGSteH2BTfk7qHRhLwjO", + "104uG3QE6lGMgJeJZdLbP", + "Si6K8JqHNqw_lz_1sDo6b", + "PsRm4Fikl-4V0UP4zMDmc", + "J3W8i89XtySWfcPJMsDyW", + "ZMYQFNu7YhdsurJW_74qc", + "i0qqJAwb21-h-qVQwsJCL", + "s-UqSelR4i1Nkogv6fWsD" + ], + "ui": { + "x": 607.5948, + "y": 2317.4523, + "zIndex": 5440, + "widthName": 60, + "widthComment": 60, + "color": "" + }, + "meta": { + "updateAt": 1758762827598, + "createAt": 1758760696242 + } } }, "tableColumnEntities": { @@ -1746,7 +1902,7 @@ "id": "2HB01q46-mugMjuOz85YG", "tableId": "ZMGIWLFEswObjH2Sx0NlW", "name": "uid", - "comment": "PART정보", + "comment": "CPU정보", "dataType": "INT", "default": "", "options": 11, @@ -1758,7 +1914,7 @@ "widthDefault": 60 }, "meta": { - "updateAt": 1755654097863, + "updateAt": 1758759812545, "createAt": 1745819764138 } }, @@ -8541,6 +8697,726 @@ "updateAt": 1758513295349, "createAt": 1758513283348 } + }, + "_-xFLWWt9KM8X9w0Ifmi8": { + "id": "_-xFLWWt9KM8X9w0Ifmi8", + "tableId": "VN2Issjy8MFts5mr8-_9S", + "name": "uid", + "comment": "RAM정보", + "dataType": "INT", + "default": "", + "options": 11, + "ui": { + "keys": 1, + "widthName": 60, + "widthComment": 60, + "widthDataType": 60, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759818319, + "createAt": 1758759740783 + } + }, + "WDWnFfcgxcvc1RbGphgV_": { + "id": "WDWnFfcgxcvc1RbGphgV_", + "tableId": "VN2Issjy8MFts5mr8-_9S", + "name": "title", + "comment": "", + "dataType": "VARCHAR(50)", + "default": "", + "options": 12, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 75, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759740784, + "createAt": 1758759740783 + } + }, + "QKvOgvtD0_UPX4wjExPly": { + "id": "QKvOgvtD0_UPX4wjExPly", + "tableId": "VN2Issjy8MFts5mr8-_9S", + "name": "price", + "comment": "기본금액", + "dataType": "INT", + "default": "0", + "options": 8, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 60, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759740784, + "createAt": 1758759740784 + } + }, + "qAyKLhnzQPHt5J4Swk7c1": { + "id": "qAyKLhnzQPHt5J4Swk7c1", + "tableId": "VN2Issjy8MFts5mr8-_9S", + "name": "stock", + "comment": "재고", + "dataType": "INT", + "default": "0", + "options": 8, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 60, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759740784, + "createAt": 1758759740784 + } + }, + "rk96zaatKz-6B_vos4evc": { + "id": "rk96zaatKz-6B_vos4evc", + "tableId": "VN2Issjy8MFts5mr8-_9S", + "name": "status", + "comment": "", + "dataType": "VARCHAR(20)", + "default": "'available'", + "options": 8, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 75, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759740784, + "createAt": 1758759740784 + } + }, + "aZE0-4Y5rAjHMOyt8LZPS": { + "id": "aZE0-4Y5rAjHMOyt8LZPS", + "tableId": "VN2Issjy8MFts5mr8-_9S", + "name": "updated_at", + "comment": "", + "dataType": "TIMESTAMP", + "default": "", + "options": 0, + "ui": { + "keys": 0, + "widthName": 62, + "widthComment": 60, + "widthDataType": 65, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759740784, + "createAt": 1758759740784 + } + }, + "rMzzTIAh6gmzs1xxCpOUU": { + "id": "rMzzTIAh6gmzs1xxCpOUU", + "tableId": "VN2Issjy8MFts5mr8-_9S", + "name": "created_at", + "comment": "", + "dataType": "TIMESTAMP", + "default": "CURRENT_TIMESTAMP", + "options": 8, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 65, + "widthDefault": 122 + }, + "meta": { + "updateAt": 1758759740784, + "createAt": 1758759740784 + } + }, + "aGh3xeALEXZIO4ryEdeTJ": { + "id": "aGh3xeALEXZIO4ryEdeTJ", + "tableId": "VN2Issjy8MFts5mr8-_9S", + "name": "deleted_at", + "comment": "", + "dataType": "TIMESTAMP", + "default": "", + "options": 0, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 65, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759740784, + "createAt": 1758759740784 + } + }, + "r3uRp_gmpyvxsDGuWdWgy": { + "id": "r3uRp_gmpyvxsDGuWdWgy", + "tableId": "0SUAXsejoiaHZwmW8msS3", + "name": "uid", + "comment": "DISK정보", + "dataType": "INT", + "default": "", + "options": 11, + "ui": { + "keys": 1, + "widthName": 60, + "widthComment": 60, + "widthDataType": 60, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759825762, + "createAt": 1758759766663 + } + }, + "5F1R6RtemRJmP3Ahkyv2J": { + "id": "5F1R6RtemRJmP3Ahkyv2J", + "tableId": "0SUAXsejoiaHZwmW8msS3", + "name": "title", + "comment": "", + "dataType": "VARCHAR(50)", + "default": "", + "options": 12, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 75, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759766663, + "createAt": 1758759766663 + } + }, + "E5sDITHw_7mXwDMAXgXJn": { + "id": "E5sDITHw_7mXwDMAXgXJn", + "tableId": "0SUAXsejoiaHZwmW8msS3", + "name": "price", + "comment": "기본금액", + "dataType": "INT", + "default": "0", + "options": 8, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 60, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759766663, + "createAt": 1758759766663 + } + }, + "e4rLa5ah9404ftzavjf4N": { + "id": "e4rLa5ah9404ftzavjf4N", + "tableId": "0SUAXsejoiaHZwmW8msS3", + "name": "stock", + "comment": "재고", + "dataType": "INT", + "default": "0", + "options": 8, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 60, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759766663, + "createAt": 1758759766663 + } + }, + "_tNaOvm69MLQg5qF-_OJO": { + "id": "_tNaOvm69MLQg5qF-_OJO", + "tableId": "0SUAXsejoiaHZwmW8msS3", + "name": "status", + "comment": "", + "dataType": "VARCHAR(20)", + "default": "'available'", + "options": 8, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 75, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759766663, + "createAt": 1758759766663 + } + }, + "Ii9wxgmQKXIrnM2pleOQ9": { + "id": "Ii9wxgmQKXIrnM2pleOQ9", + "tableId": "0SUAXsejoiaHZwmW8msS3", + "name": "updated_at", + "comment": "", + "dataType": "TIMESTAMP", + "default": "", + "options": 0, + "ui": { + "keys": 0, + "widthName": 62, + "widthComment": 60, + "widthDataType": 65, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759766664, + "createAt": 1758759766663 + } + }, + "JO8ymjcCNe_MPrVmKRWn-": { + "id": "JO8ymjcCNe_MPrVmKRWn-", + "tableId": "0SUAXsejoiaHZwmW8msS3", + "name": "created_at", + "comment": "", + "dataType": "TIMESTAMP", + "default": "CURRENT_TIMESTAMP", + "options": 8, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 65, + "widthDefault": 122 + }, + "meta": { + "updateAt": 1758759766664, + "createAt": 1758759766664 + } + }, + "LrJ1wi95G76oooLA-9Etg": { + "id": "LrJ1wi95G76oooLA-9Etg", + "tableId": "0SUAXsejoiaHZwmW8msS3", + "name": "deleted_at", + "comment": "", + "dataType": "TIMESTAMP", + "default": "", + "options": 0, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 65, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759766664, + "createAt": 1758759766664 + } + }, + "Asn7nwT9GjjMmYcTX4wXv": { + "id": "Asn7nwT9GjjMmYcTX4wXv", + "tableId": "6lQ2M_5glzZEDHxKHx83G", + "name": "uid", + "comment": "PART정보", + "dataType": "INT", + "default": "", + "options": 11, + "ui": { + "keys": 1, + "widthName": 60, + "widthComment": 60, + "widthDataType": 60, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759802722, + "createAt": 1758759800130 + } + }, + "QVFV0SgEZpaEUL6rh6-hW": { + "id": "QVFV0SgEZpaEUL6rh6-hW", + "tableId": "6lQ2M_5glzZEDHxKHx83G", + "name": "title", + "comment": "", + "dataType": "VARCHAR(50)", + "default": "", + "options": 12, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 75, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759800131, + "createAt": 1758759800131 + } + }, + "bPLCmetjzux-4GilvvUJO": { + "id": "bPLCmetjzux-4GilvvUJO", + "tableId": "6lQ2M_5glzZEDHxKHx83G", + "name": "price", + "comment": "기본금액", + "dataType": "INT", + "default": "0", + "options": 8, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 60, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759800131, + "createAt": 1758759800131 + } + }, + "Cok4UfkV3u1dy_1jLeNrJ": { + "id": "Cok4UfkV3u1dy_1jLeNrJ", + "tableId": "6lQ2M_5glzZEDHxKHx83G", + "name": "stock", + "comment": "재고", + "dataType": "INT", + "default": "0", + "options": 8, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 60, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759800131, + "createAt": 1758759800131 + } + }, + "2r_fNpMagzMepzWTKJx81": { + "id": "2r_fNpMagzMepzWTKJx81", + "tableId": "6lQ2M_5glzZEDHxKHx83G", + "name": "status", + "comment": "", + "dataType": "VARCHAR(20)", + "default": "'available'", + "options": 8, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 75, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759800131, + "createAt": 1758759800131 + } + }, + "yP_JqcAeT0xKY_owDhIfH": { + "id": "yP_JqcAeT0xKY_owDhIfH", + "tableId": "6lQ2M_5glzZEDHxKHx83G", + "name": "updated_at", + "comment": "", + "dataType": "TIMESTAMP", + "default": "", + "options": 0, + "ui": { + "keys": 0, + "widthName": 62, + "widthComment": 60, + "widthDataType": 65, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759800131, + "createAt": 1758759800131 + } + }, + "OilD9PfUMTNqJI69gKWtw": { + "id": "OilD9PfUMTNqJI69gKWtw", + "tableId": "6lQ2M_5glzZEDHxKHx83G", + "name": "created_at", + "comment": "", + "dataType": "TIMESTAMP", + "default": "CURRENT_TIMESTAMP", + "options": 8, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 65, + "widthDefault": 122 + }, + "meta": { + "updateAt": 1758759800131, + "createAt": 1758759800131 + } + }, + "GpF8nYONyRFaSexZvhzu5": { + "id": "GpF8nYONyRFaSexZvhzu5", + "tableId": "6lQ2M_5glzZEDHxKHx83G", + "name": "deleted_at", + "comment": "", + "dataType": "TIMESTAMP", + "default": "", + "options": 0, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 65, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759800131, + "createAt": 1758759800131 + } + }, + "-aoGmupxR3WVamDcIRdR5": { + "id": "-aoGmupxR3WVamDcIRdR5", + "tableId": "0SUAXsejoiaHZwmW8msS3", + "name": "format", + "comment": "포맷수", + "dataType": "INT", + "default": "0", + "options": 8, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 60, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758759988420, + "createAt": 1758759927103 + } + }, + "QdsS-0uL_5e3e06QA_j3Q": { + "id": "QdsS-0uL_5e3e06QA_j3Q", + "tableId": "FfKKPJaDUSq_L0PzVw0qB", + "name": "uid", + "comment": "DISK정보", + "dataType": "INT", + "default": "", + "options": 11, + "ui": { + "keys": 1, + "widthName": 60, + "widthComment": 60, + "widthDataType": 60, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758760725178, + "createAt": 1758760723082 + } + }, + "DJt6tYEL_T0gaWiKYG3xx": { + "id": "DJt6tYEL_T0gaWiKYG3xx", + "tableId": "FfKKPJaDUSq_L0PzVw0qB", + "name": "title", + "comment": "", + "dataType": "VARCHAR(50)", + "default": "", + "options": 12, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 75, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758760723082, + "createAt": 1758760723082 + } + }, + "DSGSteH2BTfk7qHRhLwjO": { + "id": "DSGSteH2BTfk7qHRhLwjO", + "tableId": "FfKKPJaDUSq_L0PzVw0qB", + "name": "price", + "comment": "기본금액", + "dataType": "INT", + "default": "0", + "options": 8, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 60, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758760723082, + "createAt": 1758760723082 + } + }, + "104uG3QE6lGMgJeJZdLbP": { + "id": "104uG3QE6lGMgJeJZdLbP", + "tableId": "FfKKPJaDUSq_L0PzVw0qB", + "name": "stock", + "comment": "재고", + "dataType": "INT", + "default": "0", + "options": 8, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 60, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758760723083, + "createAt": 1758760723082 + } + }, + "Si6K8JqHNqw_lz_1sDo6b": { + "id": "Si6K8JqHNqw_lz_1sDo6b", + "tableId": "FfKKPJaDUSq_L0PzVw0qB", + "name": "format", + "comment": "포맷수", + "dataType": "INT", + "default": "0", + "options": 8, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 60, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758760723083, + "createAt": 1758760723083 + } + }, + "J3W8i89XtySWfcPJMsDyW": { + "id": "J3W8i89XtySWfcPJMsDyW", + "tableId": "FfKKPJaDUSq_L0PzVw0qB", + "name": "status", + "comment": "", + "dataType": "VARCHAR(20)", + "default": "'available'", + "options": 8, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 75, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758760723083, + "createAt": 1758760723083 + } + }, + "ZMYQFNu7YhdsurJW_74qc": { + "id": "ZMYQFNu7YhdsurJW_74qc", + "tableId": "FfKKPJaDUSq_L0PzVw0qB", + "name": "updated_at", + "comment": "", + "dataType": "TIMESTAMP", + "default": "", + "options": 0, + "ui": { + "keys": 0, + "widthName": 62, + "widthComment": 60, + "widthDataType": 65, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758760723083, + "createAt": 1758760723083 + } + }, + "i0qqJAwb21-h-qVQwsJCL": { + "id": "i0qqJAwb21-h-qVQwsJCL", + "tableId": "FfKKPJaDUSq_L0PzVw0qB", + "name": "created_at", + "comment": "", + "dataType": "TIMESTAMP", + "default": "CURRENT_TIMESTAMP", + "options": 8, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 65, + "widthDefault": 122 + }, + "meta": { + "updateAt": 1758760723083, + "createAt": 1758760723083 + } + }, + "s-UqSelR4i1Nkogv6fWsD": { + "id": "s-UqSelR4i1Nkogv6fWsD", + "tableId": "FfKKPJaDUSq_L0PzVw0qB", + "name": "deleted_at", + "comment": "", + "dataType": "TIMESTAMP", + "default": "", + "options": 0, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 65, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758760723083, + "createAt": 1758760723083 + } + }, + "0mMuq9X72PA3WvfurTA0d": { + "id": "0mMuq9X72PA3WvfurTA0d", + "tableId": "6lQ2M_5glzZEDHxKHx83G", + "name": "stock", + "comment": "재고", + "dataType": "INT", + "default": "0", + "options": 8, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 60, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758762819103, + "createAt": 1758762819102 + } + }, + "PsRm4Fikl-4V0UP4zMDmc": { + "id": "PsRm4Fikl-4V0UP4zMDmc", + "tableId": "FfKKPJaDUSq_L0PzVw0qB", + "name": "stock", + "comment": "재고", + "dataType": "INT", + "default": "0", + "options": 8, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 60, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1758762826114, + "createAt": 1758762826113 + } } }, "relationshipEntities": { @@ -8946,8 +9822,8 @@ "columnIds": [ "RITMHZcQAJ7KvtxkTtMv-" ], - "x": 1341.7756, - "y": 2042.6057, + "x": 1551.9021, + "y": 2142.6056, "direction": 4 }, "end": { @@ -8974,8 +9850,8 @@ "columnIds": [ "RITMHZcQAJ7KvtxkTtMv-" ], - "x": 1472.7756, - "y": 2272.6057, + "x": 1682.9021, + "y": 2372.6056, "direction": 2 }, "end": { @@ -9011,8 +9887,8 @@ "columnIds": [ "4iRyOhmW3b7kbiZT8lQyY" ], - "x": 1472.7756, - "y": 2088.6057, + "x": 1682.9021, + "y": 2188.6056, "direction": 2 }, "meta": { @@ -9039,8 +9915,8 @@ "columnIds": [ "JRdeV7n53lb1iSmmYnhHX" ], - "x": 1079.7756, - "y": 2042.6057, + "x": 1289.9021, + "y": 2142.6056, "direction": 4 }, "meta": { @@ -9086,8 +9962,8 @@ "columnIds": [ "RITMHZcQAJ7KvtxkTtMv-" ], - "x": 948.7756, - "y": 2226.6057, + "x": 1158.9021, + "y": 2326.6056, "direction": 1 }, "end": { @@ -9114,8 +9990,8 @@ "columnIds": [ "RITMHZcQAJ7KvtxkTtMv-" ], - "x": 1472.7756, - "y": 2364.6057, + "x": 1682.9021, + "y": 2464.6056, "direction": 2 }, "end": { @@ -9450,8 +10326,8 @@ "columnIds": [ "RITMHZcQAJ7KvtxkTtMv-" ], - "x": 1472.7756, - "y": 2180.6057, + "x": 1682.9021, + "y": 2280.6056, "direction": 2 }, "end": { diff --git a/app/Database/dbmsv2_init.sql b/app/Database/dbmsv2_init.sql index bbc8be3..65dfdfc 100644 --- a/app/Database/dbmsv2_init.sql +++ b/app/Database/dbmsv2_init.sql @@ -128,6 +128,37 @@ LOCK TABLES `couponinfo` WRITE; /*!40000 ALTER TABLE `couponinfo` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `cpuinfo` +-- + +DROP TABLE IF EXISTS `cpuinfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `cpuinfo` ( + `uid` int(11) NOT NULL AUTO_INCREMENT COMMENT 'CPU정보', + `title` varchar(50) NOT NULL, + `price` int(11) NOT NULL DEFAULT 0 COMMENT '기본금액', + `stock` int(11) NOT NULL DEFAULT 0 COMMENT '재고', + `status` varchar(20) NOT NULL DEFAULT 'available', + `updated_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `deleted_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`uid`), + UNIQUE KEY `UQ_title` (`title`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='CPU정보'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `cpuinfo` +-- + +LOCK TABLES `cpuinfo` WRITE; +/*!40000 ALTER TABLE `cpuinfo` DISABLE KEYS */; +INSERT INTO `cpuinfo` VALUES (1,'Xeon E5530 2.4Ghz 4Core',50000,97,'available','2025-09-25 04:13:04','2025-09-25 01:15:29',NULL),(2,'Xeon E5540 2.4Ghz 4Core',50000,100,'available',NULL,'2025-09-25 01:15:29',NULL),(3,'Xeon X5560 2.8Ghz 8Core',80000,99,'available','2025-09-25 04:14:07','2025-09-25 01:15:29',NULL),(4,'Xeon X5650 2.6Ghz 12Core',100000,99,'available','2025-09-25 04:15:13','2025-09-25 01:15:29',NULL),(5,'Xeon E5-2690v2 2.6Ghz 12Core',100000,99,'available','2025-09-25 04:08:25','2025-09-25 01:15:29',NULL),(6,'Xeon E5-2690v4 3.0Ghz 20Core',150000,99,'available','2025-09-25 04:10:09','2025-09-25 01:15:29',NULL); +/*!40000 ALTER TABLE `cpuinfo` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `csinfo` -- @@ -170,6 +201,38 @@ INSERT INTO `csinfo` VALUES (4,NULL,NULL,NULL,'VPC-CS','10.22.22.11',NULL,NULL,1 /*!40000 ALTER TABLE `csinfo` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `diskinfo` +-- + +DROP TABLE IF EXISTS `diskinfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `diskinfo` ( + `uid` int(11) NOT NULL AUTO_INCREMENT COMMENT 'DISK정보', + `title` varchar(50) NOT NULL, + `price` int(11) NOT NULL DEFAULT 0 COMMENT '기본금액', + `stock` int(11) NOT NULL DEFAULT 0 COMMENT '재고', + `format` int(11) NOT NULL DEFAULT 0 COMMENT '포맷수', + `status` varchar(20) NOT NULL DEFAULT 'available', + `updated_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `deleted_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`uid`), + UNIQUE KEY `UQ_title` (`title`) +) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COMMENT='DISK정보'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `diskinfo` +-- + +LOCK TABLES `diskinfo` WRITE; +/*!40000 ALTER TABLE `diskinfo` DISABLE KEYS */; +INSERT INTO `diskinfo` VALUES (1,'SATA 128G',50000,100,0,'available',NULL,'2025-09-25 01:15:29',NULL),(2,'SATA 256G',70000,100,0,'available',NULL,'2025-09-25 01:15:29',NULL),(3,'SATA 512G',90000,100,0,'available',NULL,'2025-09-25 01:15:29',NULL),(4,'SAS 128G',60000,100,0,'available',NULL,'2025-09-25 01:15:29',NULL),(5,'SAS 256G',80000,100,0,'available',NULL,'2025-09-25 01:15:29',NULL),(6,'SAS 512G',100000,100,0,'available',NULL,'2025-09-25 01:15:29',NULL),(7,'SSD 128G',60000,99,0,'available','2025-09-25 04:09:52','2025-09-25 01:15:29',NULL),(8,'SSD 256G',80000,97,0,'available','2025-09-25 04:12:06','2025-09-25 01:15:29',NULL),(9,'SSD 512G',100000,98,0,'available','2025-09-25 04:14:51','2025-09-25 01:15:29',NULL),(10,'SSD 1T',120000,99,0,'available','2025-09-25 04:15:53','2025-09-25 01:15:29',NULL),(11,'SSD 2T',150000,100,0,'available',NULL,'2025-09-25 01:15:29',NULL),(12,'NVME 512G',120000,100,0,'available',NULL,'2025-09-25 01:15:29',NULL),(13,'NVME 1T',150000,100,0,'available',NULL,'2025-09-25 01:15:29',NULL),(14,'NVME 2T',180000,100,0,'available',NULL,'2025-09-25 01:15:29',NULL); +/*!40000 ALTER TABLE `diskinfo` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `ipinfo` -- @@ -249,35 +312,34 @@ INSERT INTO `lineinfo` VALUES (1,'normal','Softbank 10G','23.125.207.0/24','2025 UNLOCK TABLES; -- --- Table structure for table `partinfo` +-- Table structure for table `osinfo` -- -DROP TABLE IF EXISTS `partinfo`; +DROP TABLE IF EXISTS `osinfo`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `partinfo` ( - `uid` int(11) NOT NULL AUTO_INCREMENT COMMENT 'PART정보', - `type` varchar(20) NOT NULL COMMENT '부품구분', +CREATE TABLE `osinfo` ( + `uid` int(11) NOT NULL AUTO_INCREMENT COMMENT 'DISK정보', `title` varchar(50) NOT NULL, `price` int(11) NOT NULL DEFAULT 0 COMMENT '기본금액', - `stock` int(11) NOT NULL DEFAULT 0 COMMENT '재고수', + `stock` int(11) NOT NULL DEFAULT 0 COMMENT '재고', `status` varchar(20) NOT NULL DEFAULT 'available', `updated_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT current_timestamp(), `deleted_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`uid`), UNIQUE KEY `UQ_title` (`title`) -) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8 COMMENT='PART정보'; +) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COMMENT='OS정보'; /*!40101 SET character_set_client = @saved_cs_client */; -- --- Dumping data for table `partinfo` +-- Dumping data for table `osinfo` -- -LOCK TABLES `partinfo` WRITE; -/*!40000 ALTER TABLE `partinfo` DISABLE KEYS */; -INSERT INTO `partinfo` VALUES (1,'CPU','Xeon E5530 2.4Ghz 4Core',50000,99,'available','2025-09-22 02:25:05','2025-09-04 04:54:34',NULL),(2,'CPU','Xeon E5540 2.4Ghz 4Core',50000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(3,'CPU','Xeon X5560 2.8Ghz 8Core',80000,99,'available','2025-09-22 02:29:43','2025-09-04 04:54:34',NULL),(4,'CPU','Xeon X5650 2.6Ghz 12Core',100000,99,'available','2025-09-22 02:30:46','2025-09-04 04:54:34',NULL),(5,'CPU','Xeon E5-2690v2 2.6Ghz 12Core',100000,95,'available','2025-09-22 02:35:58','2025-09-04 04:54:34',NULL),(6,'CPU','Xeon E5-2690v4 3.0Ghz 20Core',150000,100,'available','2025-09-05 00:04:09','2025-09-04 04:54:34',NULL),(7,'RAM','2G',20000,99,'available','2025-09-22 02:28:56','2025-09-04 04:54:34',NULL),(8,'RAM','4G',30000,99,'available','2025-09-22 02:30:01','2025-09-04 04:54:34',NULL),(9,'RAM','8G',40000,99,'available','2025-09-22 02:31:04','2025-09-04 04:54:34',NULL),(10,'RAM','16G',60000,97,'available','2025-09-22 02:35:08','2025-09-04 04:54:34',NULL),(11,'RAM','32G',100000,99,'available','2025-09-22 02:36:15','2025-09-04 04:54:34',NULL),(12,'RAM','64G',100000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(13,'DISK','SATA 128G',50000,99,'available','2025-09-22 02:29:14','2025-09-04 04:54:34',NULL),(14,'DISK','SATA 256G',70000,99,'available','2025-09-22 02:30:26','2025-09-04 04:54:34',NULL),(15,'DISK','SATA 512G',90000,99,'available','2025-09-22 02:33:05','2025-09-04 04:54:34',NULL),(16,'DISK','SAS 128G',60000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(17,'DISK','SAS 256G',80000,100,'available','2025-09-22 02:33:05','2025-09-04 04:54:34',NULL),(18,'DISK','SAS 512G',100000,98,'available','2025-09-22 02:35:34','2025-09-04 04:54:34',NULL),(19,'DISK','SSD 128G',60000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(20,'DISK','SSD 256G',80000,99,'available','2025-09-22 02:34:23','2025-09-04 04:54:34',NULL),(21,'DISK','SSD 512G',100000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(22,'DISK','SSD 1T',120000,100,'available','2025-09-05 00:04:09','2025-09-04 04:54:34',NULL),(23,'DISK','SSD 2T',150000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(24,'DISK','NVME 512G',120000,99,'available','2025-09-22 02:36:30','2025-09-04 04:54:34',NULL),(25,'DISK','NVME 1T',150000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(26,'DISK','NVME 2T',180000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(27,'OS','Windows 10',10000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(28,'OS','Windows 11',20000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(29,'OS','Windows NT 2008R2',30000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(30,'OS','Windows NT 2012R2',30000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(31,'OS','Windows NT 2016R2',30000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(32,'OS','Windows NT 2019R2',30000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(33,'OS','CentOS 7',10000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(34,'OS','CentOS 8',10000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(35,'OS','CentOS 9',10000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(36,'OS','Ununtu 20.04',10000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(37,'OS','Ununtu 21.04',10000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(38,'OS','Ununtu 22.04',10000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(39,'DB','Windows MSSQL 2008',10000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(40,'DB','Windows MSSQL 2012',10000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(41,'DB','Mysql',10000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(42,'DB','Postgress',10000,100,'available',NULL,'2025-09-04 04:54:34',NULL),(43,'SOFTWARE','닷디펜더',50000,100,'available','2025-09-18 03:12:40','2025-09-04 04:54:34',NULL),(44,'SOFTWARE','딥파인더',50000,100,'available',NULL,'2025-09-04 04:54:34',NULL); -/*!40000 ALTER TABLE `partinfo` ENABLE KEYS */; +LOCK TABLES `osinfo` WRITE; +/*!40000 ALTER TABLE `osinfo` DISABLE KEYS */; +INSERT INTO `osinfo` VALUES (1,'Windows 10',10000,100,'available',NULL,'2025-09-25 01:15:29',NULL),(2,'Windows 11',20000,100,'available',NULL,'2025-09-25 01:15:29',NULL),(3,'Windows NT 2008R2',30000,100,'available',NULL,'2025-09-25 01:15:29',NULL),(4,'Windows NT 2012R2',30000,100,'available',NULL,'2025-09-25 01:15:29',NULL),(5,'Windows NT 2016R2',30000,100,'available',NULL,'2025-09-25 01:15:29',NULL),(6,'Windows NT 2019R2',30000,100,'available',NULL,'2025-09-25 01:15:29',NULL),(7,'CentOS 7',10000,100,'available',NULL,'2025-09-25 01:15:29',NULL),(8,'CentOS 8',10000,100,'available',NULL,'2025-09-25 01:15:29',NULL),(9,'CentOS 9',10000,100,'available',NULL,'2025-09-25 01:15:29',NULL),(10,'Ununtu 20.04',10000,100,'available',NULL,'2025-09-25 01:15:29',NULL),(11,'Ununtu 21.04',10000,100,'available',NULL,'2025-09-25 01:15:29',NULL),(12,'Ununtu 22.04',10000,100,'available',NULL,'2025-09-25 01:15:29',NULL); +/*!40000 ALTER TABLE `osinfo` ENABLE KEYS */; UNLOCK TABLES; -- @@ -354,6 +416,37 @@ LOCK TABLES `pointinfo` WRITE; /*!40000 ALTER TABLE `pointinfo` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `raminfo` +-- + +DROP TABLE IF EXISTS `raminfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `raminfo` ( + `uid` int(11) NOT NULL AUTO_INCREMENT COMMENT 'RAM정보', + `title` varchar(50) NOT NULL, + `price` int(11) NOT NULL DEFAULT 0 COMMENT '기본금액', + `stock` int(11) NOT NULL DEFAULT 0 COMMENT '재고', + `status` varchar(20) NOT NULL DEFAULT 'available', + `updated_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `deleted_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`uid`), + UNIQUE KEY `UQ_title` (`title`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='RAM정보'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `raminfo` +-- + +LOCK TABLES `raminfo` WRITE; +/*!40000 ALTER TABLE `raminfo` DISABLE KEYS */; +INSERT INTO `raminfo` VALUES (1,'2G',20000,99,'available','2025-09-25 04:09:26','2025-09-25 01:15:29',NULL),(2,'4G',30000,97,'available','2025-09-25 04:11:36','2025-09-25 01:15:29',NULL),(3,'8G',40000,99,'available','2025-09-25 04:13:26','2025-09-25 01:15:29',NULL),(4,'16G',60000,99,'available','2025-09-25 04:14:28','2025-09-25 01:15:29',NULL),(5,'32G',100000,99,'available','2025-09-25 04:15:33','2025-09-25 01:15:29',NULL),(6,'64G',100000,100,'available',NULL,'2025-09-25 01:15:29',NULL); +/*!40000 ALTER TABLE `raminfo` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `serverinfo` -- @@ -423,7 +516,7 @@ CREATE TABLE `serverpartinfo` ( CONSTRAINT `FK_payment_TO_serverpartinfo` FOREIGN KEY (`payment_uid`) REFERENCES `payment` (`uid`), CONSTRAINT `FK_serverinfo_TO_serverpartinfo` FOREIGN KEY (`serverinfo_uid`) REFERENCES `serverinfo` (`uid`), CONSTRAINT `FK_serviceinfo_TO_serverpartinfo` FOREIGN KEY (`serviceinfo_uid`) REFERENCES `serviceinfo` (`uid`) -) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COMMENT='서버파트정보'; +) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8 COMMENT='서버파트정보'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -432,7 +525,7 @@ CREATE TABLE `serverpartinfo` ( LOCK TABLES `serverpartinfo` WRITE; /*!40000 ALTER TABLE `serverpartinfo` DISABLE KEYS */; -INSERT INTO `serverpartinfo` VALUES (1,NULL,NULL,1,17,NULL,'Xeon E5530 2.4Ghz 4Core','CPU','base',50000,1,NULL,NULL,'2025-09-22 02:25:05'),(2,NULL,NULL,7,17,NULL,'2G','RAM','base',20000,1,NULL,NULL,'2025-09-22 02:28:56'),(3,NULL,NULL,13,17,NULL,'SATA 128G','DISK','base',50000,1,NULL,NULL,'2025-09-22 02:29:14'),(4,NULL,NULL,3,18,NULL,'Xeon X5560 2.8Ghz 8Core','CPU','base',80000,1,NULL,NULL,'2025-09-22 02:29:43'),(5,NULL,NULL,8,18,NULL,'4G','RAM','base',30000,1,NULL,NULL,'2025-09-22 02:30:01'),(6,NULL,NULL,14,18,NULL,'SATA 256G','DISK','base',70000,1,NULL,NULL,'2025-09-22 02:30:26'),(7,NULL,NULL,4,19,NULL,'Xeon X5650 2.6Ghz 12Core','CPU','base',100000,1,NULL,NULL,'2025-09-22 02:30:46'),(8,NULL,NULL,9,19,NULL,'8G','RAM','base',40000,1,NULL,NULL,'2025-09-22 02:31:04'),(9,NULL,NULL,15,19,NULL,'SATA 512G','DISK','base',90000,1,NULL,'2025-09-22 02:33:05','2025-09-22 02:31:29'),(10,NULL,NULL,5,20,NULL,'Xeon E5-2690v2 2.6Ghz 12Core','CPU','base',100000,1,NULL,NULL,'2025-09-22 02:33:29'),(11,NULL,NULL,10,20,NULL,'16G','RAM','base',60000,1,NULL,NULL,'2025-09-22 02:33:54'),(12,NULL,NULL,20,20,NULL,'SSD 256G','DISK','base',80000,1,NULL,NULL,'2025-09-22 02:34:23'),(13,NULL,NULL,5,21,NULL,'Xeon E5-2690v2 2.6Ghz 12Core','CPU','base',100000,2,NULL,NULL,'2025-09-22 02:34:47'),(14,NULL,NULL,10,21,NULL,'16G','RAM','base',60000,2,NULL,NULL,'2025-09-22 02:35:08'),(15,NULL,NULL,18,21,NULL,'SAS 512G','DISK','base',100000,2,'RAID1',NULL,'2025-09-22 02:35:34'),(16,NULL,NULL,5,22,NULL,'Xeon E5-2690v2 2.6Ghz 12Core','CPU','base',100000,2,NULL,NULL,'2025-09-22 02:35:58'),(17,NULL,NULL,11,22,NULL,'32G','RAM','base',100000,1,NULL,NULL,'2025-09-22 02:36:15'),(18,NULL,NULL,24,22,NULL,'NVME 512G','DISK','base',120000,1,NULL,NULL,'2025-09-22 02:36:30'); +INSERT INTO `serverpartinfo` VALUES (19,NULL,NULL,5,17,NULL,'Xeon E5-2690v2 2.6Ghz 12Core','CPU','base',100000,1,NULL,NULL,'2025-09-25 04:08:25'),(20,NULL,NULL,1,17,NULL,'2G','RAM','base',20000,1,NULL,NULL,'2025-09-25 04:09:26'),(21,NULL,NULL,7,17,NULL,'SSD 128G','DISK','base',60000,1,NULL,NULL,'2025-09-25 04:09:52'),(22,NULL,NULL,6,18,NULL,'Xeon E5-2690v4 3.0Ghz 20Core','CPU','base',150000,1,NULL,NULL,'2025-09-25 04:10:09'),(23,NULL,NULL,2,18,NULL,'4G','RAM','base',30000,1,NULL,NULL,'2025-09-25 04:10:27'),(24,NULL,NULL,8,18,NULL,'SSD 256G','DISK','base',80000,1,NULL,NULL,'2025-09-25 04:10:49'),(25,NULL,NULL,1,19,NULL,'Xeon E5530 2.4Ghz 4Core','CPU','base',50000,2,NULL,'2025-09-25 04:12:26','2025-09-25 04:11:12'),(26,NULL,NULL,2,19,NULL,'4G','RAM','base',30000,2,NULL,NULL,'2025-09-25 04:11:36'),(27,NULL,NULL,8,19,NULL,'SSD 256G','DISK','base',80000,2,'RAID1',NULL,'2025-09-25 04:12:06'),(28,NULL,NULL,1,20,NULL,'Xeon E5530 2.4Ghz 4Core','CPU','base',50000,1,NULL,NULL,'2025-09-25 04:13:04'),(29,NULL,NULL,3,20,NULL,'8G','RAM','base',40000,1,NULL,NULL,'2025-09-25 04:13:26'),(30,NULL,NULL,9,20,NULL,'SSD 512G','DISK','base',100000,1,NULL,NULL,'2025-09-25 04:13:45'),(31,NULL,NULL,3,21,NULL,'Xeon X5560 2.8Ghz 8Core','CPU','base',80000,1,NULL,NULL,'2025-09-25 04:14:07'),(32,NULL,NULL,4,21,NULL,'16G','RAM','base',60000,1,NULL,NULL,'2025-09-25 04:14:28'),(33,NULL,NULL,9,21,NULL,'SSD 512G','DISK','base',100000,1,NULL,NULL,'2025-09-25 04:14:51'),(34,NULL,NULL,4,22,NULL,'Xeon X5650 2.6Ghz 12Core','CPU','base',100000,1,NULL,NULL,'2025-09-25 04:15:13'),(35,NULL,NULL,5,22,NULL,'32G','RAM','base',100000,1,NULL,NULL,'2025-09-25 04:15:33'),(36,NULL,NULL,10,22,NULL,'SSD 1T','DISK','base',120000,1,NULL,NULL,'2025-09-25 04:15:53'); /*!40000 ALTER TABLE `serverpartinfo` ENABLE KEYS */; UNLOCK TABLES; @@ -486,6 +579,37 @@ LOCK TABLES `serviceinfo` WRITE; /*!40000 ALTER TABLE `serviceinfo` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `softwareinfo` +-- + +DROP TABLE IF EXISTS `softwareinfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `softwareinfo` ( + `uid` int(11) NOT NULL AUTO_INCREMENT COMMENT 'PART정보', + `title` varchar(50) NOT NULL, + `price` int(11) NOT NULL DEFAULT 0 COMMENT '기본금액', + `stock` int(11) NOT NULL DEFAULT 0 COMMENT '재고', + `status` varchar(20) NOT NULL DEFAULT 'available', + `updated_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `deleted_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`uid`), + UNIQUE KEY `UQ_title` (`title`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='소프트웨어정보'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `softwareinfo` +-- + +LOCK TABLES `softwareinfo` WRITE; +/*!40000 ALTER TABLE `softwareinfo` DISABLE KEYS */; +INSERT INTO `softwareinfo` VALUES (1,'닷디펜더',50000,100,'available',NULL,'2025-09-25 01:15:29',NULL),(2,'딥파인더',50000,100,'available',NULL,'2025-09-25 01:15:29',NULL); +/*!40000 ALTER TABLE `softwareinfo` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `switchinfo` -- @@ -600,4 +724,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2025-09-23 17:57:24 +-- Dump completed on 2025-09-25 13:16:08 diff --git a/app/Database/dbmsv2_part.txt b/app/Database/dbmsv2_part.txt index 4646b06..01e2f3b 100644 --- a/app/Database/dbmsv2_part.txt +++ b/app/Database/dbmsv2_part.txt @@ -36,9 +36,5 @@ OS,CentOS 9,10000 OS,Ununtu 20.04,10000 OS,Ununtu 21.04,10000 OS,Ununtu 22.04,10000 -DB,Windows MSSQL 2008,10000 -DB,Windows MSSQL 2012,10000 -DB,Mysql,10000 -DB,Postgress,10000 SOFTWARE,닷디펜더,50000 SOFTWARE,딥파인더,50000 diff --git a/app/Database/dbmsv2_test1.sql b/app/Database/dbmsv2_test1.sql index c370477..1293a4d 100644 --- a/app/Database/dbmsv2_test1.sql +++ b/app/Database/dbmsv2_test1.sql @@ -433,7 +433,7 @@ CREATE TABLE `serverpartinfo` ( LOCK TABLES `serverpartinfo` WRITE; /*!40000 ALTER TABLE `serverpartinfo` DISABLE KEYS */; -INSERT INTO `serverpartinfo` VALUES (1,NULL,NULL,1,17,NULL,'Xeon E5530 2.4Ghz 4Core','CPU','base',50000,1,NULL,NULL,'2025-09-22 02:25:05'),(2,NULL,NULL,7,17,NULL,'2G','RAM','base',20000,1,NULL,NULL,'2025-09-22 02:28:56'),(3,NULL,NULL,13,17,NULL,'SATA 128G','DISK','base',50000,1,NULL,NULL,'2025-09-22 02:29:14'),(4,NULL,NULL,3,18,NULL,'Xeon X5560 2.8Ghz 8Core','CPU','base',80000,1,NULL,NULL,'2025-09-22 02:29:43'),(5,NULL,NULL,8,18,NULL,'4G','RAM','base',30000,1,NULL,NULL,'2025-09-22 02:30:01'),(6,NULL,NULL,14,18,NULL,'SATA 256G','DISK','base',70000,1,NULL,NULL,'2025-09-22 02:30:26'),(7,NULL,NULL,4,19,NULL,'Xeon X5650 2.6Ghz 12Core','CPU','base',100000,1,NULL,NULL,'2025-09-22 02:30:46'),(8,NULL,NULL,9,19,NULL,'8G','RAM','base',40000,1,NULL,NULL,'2025-09-22 02:31:04'),(9,NULL,NULL,15,19,NULL,'SATA 512G','DISK','base',90000,1,NULL,'2025-09-22 02:33:05','2025-09-22 02:31:29'),(10,NULL,NULL,5,20,NULL,'Xeon E5-2690v2 2.6Ghz 12Core','CPU','base',100000,1,NULL,NULL,'2025-09-22 02:33:29'),(11,NULL,NULL,10,20,NULL,'16G','RAM','base',60000,1,NULL,NULL,'2025-09-22 02:33:54'),(12,NULL,NULL,20,20,NULL,'SSD 256G','DISK','base',80000,1,NULL,NULL,'2025-09-22 02:34:23'),(13,NULL,NULL,5,21,NULL,'Xeon E5-2690v2 2.6Ghz 12Core','CPU','base',100000,2,NULL,NULL,'2025-09-22 02:34:47'),(14,NULL,NULL,10,21,NULL,'16G','RAM','base',60000,2,NULL,NULL,'2025-09-22 02:35:08'),(15,NULL,NULL,18,21,NULL,'SAS 512G','DISK','base',100000,2,'RAID1',NULL,'2025-09-22 02:35:34'),(16,NULL,NULL,5,22,NULL,'Xeon E5-2690v2 2.6Ghz 12Core','CPU','base',100000,2,NULL,NULL,'2025-09-22 02:35:58'),(17,NULL,NULL,11,22,NULL,'32G','RAM','base',100000,1,NULL,NULL,'2025-09-22 02:36:15'),(18,NULL,NULL,24,22,NULL,'NVME 512G','DISK','base',120000,1,NULL,NULL,'2025-09-22 02:36:30'),(19,772,NULL,661,17,30,'C01PA46','SWITCH','base',0,1,NULL,NULL,'2025-09-23 23:57:41'),(20,772,NULL,261,17,30,'13.220.20.4','IP','base',0,1,NULL,'2025-09-24 00:37:51','2025-09-23 23:58:13'),(21,772,NULL,27,17,30,'Windows 10','OS','base',0,1,NULL,NULL,'2025-09-23 23:58:38'),(22,790,NULL,40,18,31,'C02PA09','SWITCH','base',0,1,NULL,NULL,'2025-09-24 00:07:56'),(23,790,NULL,128,18,31,'23.125.207.127','IP','base',0,1,NULL,'2025-09-24 00:37:40','2025-09-24 00:08:38'),(24,790,NULL,35,18,31,'CentOS 9','OS','base',10000,1,NULL,NULL,'2025-09-24 00:08:59'),(25,820,NULL,466,22,32,'C03PA08','SWITCH','base',0,1,NULL,NULL,'2025-09-24 00:10:14'),(26,820,NULL,269,22,32,'13.220.20.12','IP','base',0,1,NULL,'2025-09-24 00:37:27','2025-09-24 00:10:44'),(27,820,NULL,32,22,32,'Windows NT 2019R2','OS','base',30000,1,NULL,NULL,'2025-09-24 00:11:05'),(28,820,NULL,43,22,32,'닷디펜더','SOFTWARE','month',100000,1,NULL,'2025-09-24 01:07:32','2025-09-24 00:11:39'),(29,820,NULL,264,22,32,'13.220.20.7','IP','month',50000,1,NULL,NULL,'2025-09-24 01:08:14'); +INSERT INTO `serverpartinfo` VALUES (1,NULL,NULL,1,17,NULL,'Xeon E5530 2.4Ghz 4Core','CPU','base',50000,1,NULL,NULL,'2025-09-22 02:25:05'),(2,NULL,NULL,7,17,NULL,'2G','RAM','base',20000,1,NULL,NULL,'2025-09-22 02:28:56'),(3,NULL,NULL,13,17,NULL,'SATA 128G','DISK','base',50000,1,NULL,NULL,'2025-09-22 02:29:14'),(4,NULL,NULL,3,18,NULL,'Xeon X5560 2.8Ghz 8Core','CPU','base',80000,1,NULL,NULL,'2025-09-22 02:29:43'),(5,NULL,NULL,8,18,NULL,'4G','RAM','base',30000,1,NULL,NULL,'2025-09-22 02:30:01'),(6,NULL,NULL,14,18,NULL,'SATA 256G','DISK','base',70000,1,NULL,NULL,'2025-09-22 02:30:26'),(7,NULL,NULL,4,19,NULL,'Xeon X5650 2.6Ghz 12Core','CPU','base',100000,1,NULL,NULL,'2025-09-22 02:30:46'),(8,NULL,NULL,9,19,NULL,'8G','RAM','base',40000,1,NULL,NULL,'2025-09-22 02:31:04'),(9,NULL,NULL,15,19,NULL,'SATA 512G','DISK','base',90000,1,NULL,'2025-09-22 02:33:05','2025-09-22 02:31:29'),(10,NULL,NULL,5,20,NULL,'Xeon E5-2690v2 2.6Ghz 12Core','CPU','base',100000,1,NULL,NULL,'2025-09-22 02:33:29'),(11,NULL,NULL,10,20,NULL,'16G','RAM','base',60000,1,NULL,NULL,'2025-09-22 02:33:54'),(12,NULL,NULL,20,20,NULL,'SSD 256G','DISK','base',80000,1,NULL,NULL,'2025-09-22 02:34:23'),(13,NULL,NULL,5,21,NULL,'Xeon E5-2690v2 2.6Ghz 12Core','CPU','base',100000,2,NULL,NULL,'2025-09-22 02:34:47'),(14,NULL,NULL,10,21,NULL,'16G','RAM','base',60000,2,NULL,NULL,'2025-09-22 02:35:08'),(15,NULL,NULL,18,21,NULL,'SAS 512G','DISK','base',100000,2,'RAID1',NULL,'2025-09-22 02:35:34'),(16,NULL,NULL,5,22,NULL,'Xeon E5-2690v2 2.6Ghz 12Core','CPU','base',100000,2,NULL,NULL,'2025-09-22 02:35:58'),(17,NULL,NULL,11,22,NULL,'32G','RAM','base',100000,1,NULL,NULL,'2025-09-22 02:36:15'),(18,NULL,NULL,24,22,NULL,'NVME 512G','DISK','base',120000,1,NULL,NULL,'2025-09-22 02:36:30'),(19,772,NULL,661,17,30,'C01PA46','Switch','base',0,1,NULL,NULL,'2025-09-23 23:57:41'),(20,772,NULL,261,17,30,'13.220.20.4','IP','base',0,1,NULL,'2025-09-24 00:37:51','2025-09-23 23:58:13'),(21,772,NULL,27,17,30,'Windows 10','OS','base',0,1,NULL,NULL,'2025-09-23 23:58:38'),(22,790,NULL,40,18,31,'C02PA09','Switch','base',0,1,NULL,NULL,'2025-09-24 00:07:56'),(23,790,NULL,128,18,31,'23.125.207.127','IP','base',0,1,NULL,'2025-09-24 00:37:40','2025-09-24 00:08:38'),(24,790,NULL,35,18,31,'CentOS 9','OS','base',10000,1,NULL,NULL,'2025-09-24 00:08:59'),(25,820,NULL,466,22,32,'C03PA08','Switch','base',0,1,NULL,NULL,'2025-09-24 00:10:14'),(26,820,NULL,269,22,32,'13.220.20.12','IP','base',0,1,NULL,'2025-09-24 00:37:27','2025-09-24 00:10:44'),(27,820,NULL,32,22,32,'Windows NT 2019R2','OS','base',30000,1,NULL,NULL,'2025-09-24 00:11:05'),(28,820,NULL,43,22,32,'닷디펜더','SOFTWARE','month',100000,1,NULL,'2025-09-24 01:07:32','2025-09-24 00:11:39'),(29,820,NULL,264,22,32,'13.220.20.7','IP','month',50000,1,NULL,NULL,'2025-09-24 01:08:14'); /*!40000 ALTER TABLE `serverpartinfo` ENABLE KEYS */; UNLOCK TABLES; diff --git a/app/Entities/Equipment/CSEntity.php b/app/Entities/Equipment/CSEntity.php deleted file mode 100644 index d37c0ad..0000000 --- a/app/Entities/Equipment/CSEntity.php +++ /dev/null @@ -1,33 +0,0 @@ -attributes['clientinfo_uid']; - } - final public function getServiceInfoUID(): string|null - { - return $this->attributes['serviceinfo_uid']; - } - final public function getServerInfoUID(): string|null - { - return $this->attributes['serverinfo_uid']; - } - //기본기능 - public function getPrice(): int - { - return $this->attributes['price']; - } - public function getCustomTitle(): string - { - return $this->getTitle() . " " . number_format($this->getPrice()) . "원"; - } -} diff --git a/app/Entities/Equipment/PartEntity.php b/app/Entities/Equipment/PartEntity.php deleted file mode 100644 index dfa7575..0000000 --- a/app/Entities/Equipment/PartEntity.php +++ /dev/null @@ -1,29 +0,0 @@ -attributes['type']; - } - public function getPrice(): int - { - return $this->attributes['price']; - } - public function getStock(): int - { - return $this->attributes['stock']; - } - public function getCustomTitle(): string - { - return $this->getTitle() . " " . number_format($this->getPrice()) . "원"; - } -} diff --git a/app/Entities/Equipment/SwitchEntity.php b/app/Entities/Equipment/SwitchEntity.php deleted file mode 100644 index 5b474f5..0000000 --- a/app/Entities/Equipment/SwitchEntity.php +++ /dev/null @@ -1,29 +0,0 @@ -attributes['clientinfo_uid']; - } - final public function getServiceInfoUID(): string|null - { - return $this->attributes['serviceinfo_uid']; - } - final public function getServerInfoUID(): string|null - { - return $this->attributes['serverinfo_uid']; - } - //기본기능 - public function getPrice(): int - { - return $this->attributes['price'] ?? 0; - } -} diff --git a/app/Entities/Part/CPUEntity.php b/app/Entities/Part/CPUEntity.php new file mode 100644 index 0000000..31e5af1 --- /dev/null +++ b/app/Entities/Part/CPUEntity.php @@ -0,0 +1,12 @@ +attributes['old_clientinfo_uid']; + } + //기본기능 + public function getIP(): string + { + return $this->attributes['ip']; + } +} diff --git a/app/Entities/Part/OSEntity.php b/app/Entities/Part/OSEntity.php new file mode 100644 index 0000000..0ec675d --- /dev/null +++ b/app/Entities/Part/OSEntity.php @@ -0,0 +1,12 @@ +attributes['clientinfo_uid']; } - final public function getOldClientInfoUID(): string|null - { - return $this->attributes['old_clientinfo_uid']; - } final public function getServiceInfoUID(): string|null { return $this->attributes['serviceinfo_uid']; @@ -29,16 +26,15 @@ class IPEntity extends EquipmentEntity { return $this->attributes['lineinfo_uid']; } - //기본기능 - public function getIP(): string - { - return $this->attributes['ip']; - } - public function getPrice(): int + final public function getPrice(): int { return $this->attributes['price']; } - public function getCustomTitle(): string + final public function getStock(): int + { + return $this->attributes['stock']; + } + final public function getCustomTitle(): string { return $this->getTitle() . " " . number_format($this->getPrice()) . "원"; } diff --git a/app/Entities/Part/RAMEntity.php b/app/Entities/Part/RAMEntity.php new file mode 100644 index 0000000..612b041 --- /dev/null +++ b/app/Entities/Part/RAMEntity.php @@ -0,0 +1,12 @@ +setTitleField(field: PartModel::TITLE); - } -} diff --git a/app/Helpers/Equipment/ServerPartHelper.php b/app/Helpers/Equipment/ServerPartHelper.php index 42ecf1c..149923b 100644 --- a/app/Helpers/Equipment/ServerPartHelper.php +++ b/app/Helpers/Equipment/ServerPartHelper.php @@ -105,14 +105,12 @@ class ServerPartHelper extends EquipmentHelper case 'RAM': case 'DISK': case 'OS': - case 'DB': case 'SOFTWARE': - case 'SWITCH': + case 'Switch': case 'IP': case 'CS': - case 'ETC': //파트 Entity - $title = $field === 'ETC' ? $viewDatas['entity']->getTitle() : $viewDatas['entity']->getPartEntity()->getTitle(); + $title = $viewDatas['entity']->getPartEntity()->getTitle(); $title .= $viewDatas['entity']->getCnt() > 1 ? "*" . $viewDatas['entity']->getCnt() . "개" : ""; $title .= $viewDatas['entity']->getExtra() !== "" ? "[" . $viewDatas['entity']->getExtra() . "]" : ""; if (array_key_exists('return', $extras) && $extras['return'] == 'onlyText') { @@ -144,16 +142,14 @@ class ServerPartHelper extends EquipmentHelper public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string { switch ($action) { - case 'SWITCH': + case 'Switch': case 'IP': case 'CS': case 'CPU': case 'RAM': case 'DISK': case 'OS': - case 'DB': case 'SOFTWARE': - case 'ETC': $extras = [ "class" => "btn btn-sm btn-outline btn-circle", "target" => "_self", diff --git a/app/Helpers/Part/CPUHelper.php b/app/Helpers/Part/CPUHelper.php new file mode 100644 index 0000000..49fa8c2 --- /dev/null +++ b/app/Helpers/Part/CPUHelper.php @@ -0,0 +1,14 @@ +setTitleField(field: CPUModel::TITLE); + } +} diff --git a/app/Helpers/Equipment/CSHelper.php b/app/Helpers/Part/CSHelper.php similarity index 57% rename from app/Helpers/Equipment/CSHelper.php rename to app/Helpers/Part/CSHelper.php index 40fb995..2db02c4 100644 --- a/app/Helpers/Equipment/CSHelper.php +++ b/app/Helpers/Part/CSHelper.php @@ -1,10 +1,10 @@ setTitleField(field: DISKModel::TITLE); + } +} diff --git a/app/Helpers/Equipment/IPHelper.php b/app/Helpers/Part/IPHelper.php similarity index 57% rename from app/Helpers/Equipment/IPHelper.php rename to app/Helpers/Part/IPHelper.php index 7d83008..12b68f0 100644 --- a/app/Helpers/Equipment/IPHelper.php +++ b/app/Helpers/Part/IPHelper.php @@ -1,10 +1,10 @@ setTitleField(field: OSModel::TITLE); + } +} diff --git a/app/Helpers/Part/PartHelper.php b/app/Helpers/Part/PartHelper.php new file mode 100644 index 0000000..cf5353c --- /dev/null +++ b/app/Helpers/Part/PartHelper.php @@ -0,0 +1,13 @@ +setTitleField(field: RAMModel::TITLE); + } +} diff --git a/app/Helpers/Part/SOFTWAREHelper.php b/app/Helpers/Part/SOFTWAREHelper.php new file mode 100644 index 0000000..d33f896 --- /dev/null +++ b/app/Helpers/Part/SOFTWAREHelper.php @@ -0,0 +1,14 @@ +setTitleField(field: SOFTWAREModel::TITLE); + } +} diff --git a/app/Helpers/Equipment/SwitchHelper.php b/app/Helpers/Part/SwitchHelper.php similarity index 84% rename from app/Helpers/Equipment/SwitchHelper.php rename to app/Helpers/Part/SwitchHelper.php index 78b8457..f4b9ff9 100644 --- a/app/Helpers/Equipment/SwitchHelper.php +++ b/app/Helpers/Part/SwitchHelper.php @@ -1,10 +1,10 @@ "스위치", "IP" => "IP", "CS" => "CS", - "ETC" => "기타", ], "EXTRA" => [ 'DISK' => [ diff --git a/app/Language/en/Equipment/Part.php b/app/Language/en/Part/CPU.php similarity index 58% rename from app/Language/en/Equipment/Part.php rename to app/Language/en/Part/CPU.php index 1ef7ccb..17e55a9 100644 --- a/app/Language/en/Equipment/Part.php +++ b/app/Language/en/Part/CPU.php @@ -1,8 +1,7 @@ "부품정보", + 'title' => "CPU정보", 'label' => [ - 'type' => "종류", 'title' => "모델명", 'price' => "기본가", 'stock' => "재고", @@ -11,14 +10,6 @@ return [ 'created_at' => "작성일", 'deleted_at' => "삭제일", ], - "TYPE" => [ - "CPU" => "CPU", - "RAM" => "메모리", - "DISK" => "저장장치", - "OS" => "운영체제", - "DB" => "데이터베이스", - "SOFTWARE" => "소프트웨어", - ], "STATUS" => [ STATUS['AVAILABLE'] => "사용가능", STATUS['FORBIDDEN'] => "사용불가", diff --git a/app/Language/en/Equipment/CS.php b/app/Language/en/Part/CS.php similarity index 95% rename from app/Language/en/Equipment/CS.php rename to app/Language/en/Part/CS.php index 863bfc7..e85497a 100644 --- a/app/Language/en/Equipment/CS.php +++ b/app/Language/en/Part/CS.php @@ -1,6 +1,6 @@ "CS(VPN)정보", + 'title' => "CS정보", 'label' => [ '' => "서버", 'clientinfo_uid' => "고객", diff --git a/app/Language/en/Part/DISK.php b/app/Language/en/Part/DISK.php new file mode 100644 index 0000000..071058d --- /dev/null +++ b/app/Language/en/Part/DISK.php @@ -0,0 +1,17 @@ + "DISK정보", + 'label' => [ + 'title' => "모델명", + 'price' => "기본가", + 'stock' => "재고", + 'status' => "상태", + 'updated_at' => "수정일", + 'created_at' => "작성일", + 'deleted_at' => "삭제일", + ], + "STATUS" => [ + STATUS['AVAILABLE'] => "사용가능", + STATUS['FORBIDDEN'] => "사용불가", + ], +]; diff --git a/app/Language/en/Equipment/IP.php b/app/Language/en/Part/IP.php similarity index 100% rename from app/Language/en/Equipment/IP.php rename to app/Language/en/Part/IP.php diff --git a/app/Language/en/Part/OS.php b/app/Language/en/Part/OS.php new file mode 100644 index 0000000..ab5c191 --- /dev/null +++ b/app/Language/en/Part/OS.php @@ -0,0 +1,17 @@ + "OS정보", + 'label' => [ + 'title' => "모델명", + 'price' => "기본가", + 'stock' => "재고", + 'status' => "상태", + 'updated_at' => "수정일", + 'created_at' => "작성일", + 'deleted_at' => "삭제일", + ], + "STATUS" => [ + STATUS['AVAILABLE'] => "사용가능", + STATUS['FORBIDDEN'] => "사용불가", + ], +]; diff --git a/app/Language/en/Part/RAM.php b/app/Language/en/Part/RAM.php new file mode 100644 index 0000000..793d51b --- /dev/null +++ b/app/Language/en/Part/RAM.php @@ -0,0 +1,17 @@ + "RAM정보", + 'label' => [ + 'title' => "모델명", + 'price' => "기본가", + 'stock' => "재고", + 'status' => "상태", + 'updated_at' => "수정일", + 'created_at' => "작성일", + 'deleted_at' => "삭제일", + ], + "STATUS" => [ + STATUS['AVAILABLE'] => "사용가능", + STATUS['FORBIDDEN'] => "사용불가", + ], +]; diff --git a/app/Language/en/Part/SOFTWARE.php b/app/Language/en/Part/SOFTWARE.php new file mode 100644 index 0000000..1e038b4 --- /dev/null +++ b/app/Language/en/Part/SOFTWARE.php @@ -0,0 +1,17 @@ + "SOFTWARE정보", + 'label' => [ + 'title' => "모델명", + 'price' => "기본가", + 'stock' => "재고", + 'status' => "상태", + 'updated_at' => "수정일", + 'created_at' => "작성일", + 'deleted_at' => "삭제일", + ], + "STATUS" => [ + STATUS['AVAILABLE'] => "사용가능", + STATUS['FORBIDDEN'] => "사용불가", + ], +]; diff --git a/app/Language/en/Equipment/Switch.php b/app/Language/en/Part/Switch.php similarity index 100% rename from app/Language/en/Equipment/Switch.php rename to app/Language/en/Part/Switch.php diff --git a/app/Libraries/DBMigration/Process/PartCodeProcess.php b/app/Libraries/DBMigration/Process/PartCodeProcess.php index 474facf..7b36cca 100644 --- a/app/Libraries/DBMigration/Process/PartCodeProcess.php +++ b/app/Libraries/DBMigration/Process/PartCodeProcess.php @@ -2,7 +2,6 @@ namespace App\Libraries\DBMigration\Process; -use App\Entities\Equipment\PartEntity; use CodeIgniter\Database\BaseConnection; class PartCodeProcess implements MigrationProcessInterface @@ -20,30 +19,32 @@ class PartCodeProcess implements MigrationProcessInterface } $temps = []; - $temps['type'] = trim($row[0]); $temps['title'] = trim($row[1]); $temps['price'] = trim($row[2]); - $temps['status'] = PartEntity::DEFAULT_STATUS; - - // INSERT - $result = $this->db->table('partinfo')->insert($temps); - + $temps['stock'] = 100; + $temps['status'] = "available"; + switch (trim($row[0])) { + case 'CPU': + $table = 'cpuinfo'; + break; + case 'RAM': + $table = 'raminfo'; + break; + case 'DISK': + $table = 'diskinfo'; + break; + case 'OS': + $table = 'osinfo'; + break; + case 'SOFTWARE': + $table = 'softwareinfo'; + break; + } + $result = $this->db->table($table)->insert($temps); if (!$result) { throw new \Exception($this->db->error()['message']); } - - // 방금 insert된 uid 가져오기 - $insertId = $this->db->insertID(); - - // code 값 생성 (예: CPU123) - $code = $row[0] . $insertId; - - // code 업데이트 - $this->db->table('partinfo') - ->where('uid', $insertId) - ->update(['code' => $code]); - - echo "{$cnt} -> {$temps['title']} ({$code}) PARTCODE 완료.\n"; + echo "{$cnt} -> {$temps['title']} 완료.\n"; } catch (\Exception $e) { echo $e->getMessage(); } diff --git a/app/Models/Equipment/PartModel.php b/app/Models/Equipment/PartModel.php deleted file mode 100644 index 2931530..0000000 --- a/app/Models/Equipment/PartModel.php +++ /dev/null @@ -1,47 +0,0 @@ - field가 array 입니다.\n" . var_export($field, true)); - } - switch ($field) { - case "type": - case "status": - $rule = "required|trim|string"; - break; - case "price": - case "stock": - $rule = "required|numeric"; - break; - default: - $rule = parent::getFormRule($action, $field); - break; - } - return $rule; - } -} diff --git a/app/Models/Part/CPUModel.php b/app/Models/Part/CPUModel.php new file mode 100644 index 0000000..435c1a9 --- /dev/null +++ b/app/Models/Part/CPUModel.php @@ -0,0 +1,27 @@ +getTable() . "." . $field . "]" : ""; break; - case "price": - $rule = "required|numeric"; - break; case "accountid": case "domain": $rule = "permit_empty|trim|string"; break; + case "status": + $rule = "required|trim|string"; + break; default: $rule = parent::getFormRule($action, $field); break; diff --git a/app/Models/Part/DISKModel.php b/app/Models/Part/DISKModel.php new file mode 100644 index 0000000..fe4fe22 --- /dev/null +++ b/app/Models/Part/DISKModel.php @@ -0,0 +1,27 @@ +table}.{$field}]" : ""; break; + case "status": + $rule = "required|trim|string"; + break; default: $rule = parent::getFormRule($action, $field); break; diff --git a/app/Models/Part/OSModel.php b/app/Models/Part/OSModel.php new file mode 100644 index 0000000..75ac52d --- /dev/null +++ b/app/Models/Part/OSModel.php @@ -0,0 +1,27 @@ + field가 array 입니다.\n" . var_export($field, true)); + } + switch ($field) { + case "title": + $rule = "required|trim|string"; + $rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[" . $this->getTable() . "." . $field . "]" : ""; + break; + case "clientinfo_uid": + case "serviceinfo_uid": + case "serverinfo_uid": + $rule = "permit_empty|trim|string"; + break; + case "price": + case "stock": + $rule = "required|numeric"; + break; + case "status": + $rule = "permit_empty|trim|string"; + break; + default: + $rule = parent::getFormRule($action, $field); + break; + } + return $rule; + } +} diff --git a/app/Models/Part/RAMModel.php b/app/Models/Part/RAMModel.php new file mode 100644 index 0000000..766ed04 --- /dev/null +++ b/app/Models/Part/RAMModel.php @@ -0,0 +1,27 @@ +getServerService()->getFormOption($field, $options); diff --git a/app/Services/Equipment/ServerPart/CPUService.php b/app/Services/Equipment/ServerPart/CPUService.php new file mode 100644 index 0000000..ed0f594 --- /dev/null +++ b/app/Services/Equipment/ServerPart/CPUService.php @@ -0,0 +1,53 @@ +getEntity($serverPartEntity->getPartUID()); + if (!$entity instanceof CPUEntity) { + throw new \Exception("{$serverPartEntity->getPartUID()}에 해당하는 부품정보를 찾을수없습니다."); + } + //부품정보에 서버정보 설정 및 서비스,고객정보 정의 + $formDatas = []; + if ($action === "return") { //해지된 부품 재고 반납 처리 + $formDatas['stock'] = $entity->getStock() + $serverPartEntity->getCnt(); + } + if ($action === "use") { //사용된 부품 재고 사용처리 + if ($entity->getStock() < $serverPartEntity->getCnt()) { + throw new \Exception("현재 재고수[{$entity->getStock()}]보다 지정하신 갯수({$serverPartEntity->getCnt()})가 더 많습니다."); + } + $formDatas['stock'] = $entity->getStock() - $serverPartEntity->getCnt(); + } + return parent::modify($entity, $formDatas); + } + + public function createServerPart(ServerPartEntity $serverPartEntity): ServerPartEntity + { + $entity = $this->action_process($serverPartEntity, "use"); + return $serverPartEntity->setPartEntity($entity); + } + public function modifyServerPart(ServerPartEntity $serverPartEntity): ServerPartEntity + { + return $this->createServerPart($serverPartEntity,); + } + public function deleteServerPart(ServerPartEntity $serverPartEntity): ServerPartEntity + { + $entity = $this->action_process($serverPartEntity, "return"); + return $serverPartEntity->setPartEntity($entity); + } +} diff --git a/app/Services/Equipment/ServerPart/CSService.php b/app/Services/Equipment/ServerPart/CSService.php index 66599d1..467e2d9 100644 --- a/app/Services/Equipment/ServerPart/CSService.php +++ b/app/Services/Equipment/ServerPart/CSService.php @@ -3,9 +3,9 @@ namespace App\Services\Equipment\ServerPart; use App\Entities\Equipment\ServerPartEntity; -use App\Entities\Equipment\CSEntity; use App\Interfaces\Equipment\ServerPartInterface; -use App\Services\Equipment\CSService as ParentService; +use App\Entities\Part\CSEntity; +use App\Services\Part\CSService as ParentService; class CSService extends ParentService implements ServerPartInterface { diff --git a/app/Services/Equipment/ServerPart/PartService.php b/app/Services/Equipment/ServerPart/DISKService.php similarity index 88% rename from app/Services/Equipment/ServerPart/PartService.php rename to app/Services/Equipment/ServerPart/DISKService.php index e28c946..55b9ab5 100644 --- a/app/Services/Equipment/ServerPart/PartService.php +++ b/app/Services/Equipment/ServerPart/DISKService.php @@ -2,12 +2,12 @@ namespace App\Services\Equipment\ServerPart; -use App\Entities\Equipment\PartEntity; use App\Entities\Equipment\ServerPartEntity; use App\Interfaces\Equipment\ServerPartInterface; -use App\Services\Equipment\PartService as ParentService; +use App\Services\Part\DISKService as ParentService; +use App\Entities\Part\DISKEntity; -class PartService extends ParentService implements ServerPartInterface +class DISKService extends ParentService implements ServerPartInterface { public function __construct() { @@ -15,11 +15,11 @@ class PartService extends ParentService implements ServerPartInterface } //서버연결정보용 등록 - private function action_process(ServerPartEntity $serverPartEntity, string $action): PartEntity + private function action_process(ServerPartEntity $serverPartEntity, string $action): DISKEntity { //부품정보가져오기 $entity = $this->getEntity($serverPartEntity->getPartUID()); - if (!$entity instanceof PartEntity) { + if (!$entity instanceof DISKEntity) { throw new \Exception("{$serverPartEntity->getPartUID()}에 해당하는 부품정보를 찾을수없습니다."); } //부품정보에 서버정보 설정 및 서비스,고객정보 정의 diff --git a/app/Services/Equipment/ServerPart/IPService.php b/app/Services/Equipment/ServerPart/IPService.php index 1034760..36b9451 100644 --- a/app/Services/Equipment/ServerPart/IPService.php +++ b/app/Services/Equipment/ServerPart/IPService.php @@ -3,9 +3,9 @@ namespace App\Services\Equipment\ServerPart; use App\Entities\Equipment\ServerPartEntity; -use App\Entities\Equipment\IPEntity; use App\Interfaces\Equipment\ServerPartInterface; -use App\Services\Equipment\IPService as ParentService; +use App\Entities\Part\IPEntity; +use App\Services\Part\IPService as ParentService; class IPService extends ParentService implements ServerPartInterface { diff --git a/app/Services/Equipment/ServerPart/OSService.php b/app/Services/Equipment/ServerPart/OSService.php new file mode 100644 index 0000000..9a89061 --- /dev/null +++ b/app/Services/Equipment/ServerPart/OSService.php @@ -0,0 +1,53 @@ +getEntity($serverPartEntity->getPartUID()); + if (!$entity instanceof OSEntity) { + throw new \Exception("{$serverPartEntity->getPartUID()}에 해당하는 부품정보를 찾을수없습니다."); + } + //부품정보에 서버정보 설정 및 서비스,고객정보 정의 + $formDatas = []; + if ($action === "return") { //해지된 부품 재고 반납 처리 + $formDatas['stock'] = $entity->getStock() + $serverPartEntity->getCnt(); + } + if ($action === "use") { //사용된 부품 재고 사용처리 + if ($entity->getStock() < $serverPartEntity->getCnt()) { + throw new \Exception("현재 재고수[{$entity->getStock()}]보다 지정하신 갯수({$serverPartEntity->getCnt()})가 더 많습니다."); + } + $formDatas['stock'] = $entity->getStock() - $serverPartEntity->getCnt(); + } + return parent::modify($entity, $formDatas); + } + + public function createServerPart(ServerPartEntity $serverPartEntity): ServerPartEntity + { + $entity = $this->action_process($serverPartEntity, "use"); + return $serverPartEntity->setPartEntity($entity); + } + public function modifyServerPart(ServerPartEntity $serverPartEntity): ServerPartEntity + { + return $this->createServerPart($serverPartEntity,); + } + public function deleteServerPart(ServerPartEntity $serverPartEntity): ServerPartEntity + { + $entity = $this->action_process($serverPartEntity, "return"); + return $serverPartEntity->setPartEntity($entity); + } +} diff --git a/app/Services/Equipment/ServerPart/PaymentService.php b/app/Services/Equipment/ServerPart/PaymentService.php index 304e237..310374c 100644 --- a/app/Services/Equipment/ServerPart/PaymentService.php +++ b/app/Services/Equipment/ServerPart/PaymentService.php @@ -28,7 +28,7 @@ class PaymentService extends ParentService implements ServerPartInterface $formDatas['serviceinfo_uid'] = $serverPartEntity->getServiceInfoUID(); $formDatas['serverinfo_uid'] = $serverPartEntity->getServerInfoUID(); //서버연결정보 수정시에 필요함 //타이틀은 기타의 경우 직접작성한 제목을 등록하고 아닌경우는 Part의 Title을 사용한다. - $formDatas['title'] = $serverPartEntity->getType() === 'ETC' ? $serverPartEntity->getTitle() : $serverPartEntity->getPartEntity()->getTitle(); + $formDatas['title'] = $serverPartEntity->getPartEntity()->getTitle(); $formDatas['amount'] = $serverPartEntity->getCaculatedAmount(); //단가*cnt $formDatas['billing'] = $serverPartEntity->getBilling(); return $formDatas; diff --git a/app/Services/Equipment/ServerPart/RAMService.php b/app/Services/Equipment/ServerPart/RAMService.php new file mode 100644 index 0000000..a1401a5 --- /dev/null +++ b/app/Services/Equipment/ServerPart/RAMService.php @@ -0,0 +1,53 @@ +getEntity($serverPartEntity->getPartUID()); + if (!$entity instanceof RAMEntity) { + throw new \Exception("{$serverPartEntity->getPartUID()}에 해당하는 부품정보를 찾을수없습니다."); + } + //부품정보에 서버정보 설정 및 서비스,고객정보 정의 + $formDatas = []; + if ($action === "return") { //해지된 부품 재고 반납 처리 + $formDatas['stock'] = $entity->getStock() + $serverPartEntity->getCnt(); + } + if ($action === "use") { //사용된 부품 재고 사용처리 + if ($entity->getStock() < $serverPartEntity->getCnt()) { + throw new \Exception("현재 재고수[{$entity->getStock()}]보다 지정하신 갯수({$serverPartEntity->getCnt()})가 더 많습니다."); + } + $formDatas['stock'] = $entity->getStock() - $serverPartEntity->getCnt(); + } + return parent::modify($entity, $formDatas); + } + + public function createServerPart(ServerPartEntity $serverPartEntity): ServerPartEntity + { + $entity = $this->action_process($serverPartEntity, "use"); + return $serverPartEntity->setPartEntity($entity); + } + public function modifyServerPart(ServerPartEntity $serverPartEntity): ServerPartEntity + { + return $this->createServerPart($serverPartEntity,); + } + public function deleteServerPart(ServerPartEntity $serverPartEntity): ServerPartEntity + { + $entity = $this->action_process($serverPartEntity, "return"); + return $serverPartEntity->setPartEntity($entity); + } +} diff --git a/app/Services/Equipment/ServerPart/SOFTWAREService.php b/app/Services/Equipment/ServerPart/SOFTWAREService.php new file mode 100644 index 0000000..bdd3f46 --- /dev/null +++ b/app/Services/Equipment/ServerPart/SOFTWAREService.php @@ -0,0 +1,53 @@ +getEntity($serverPartEntity->getPartUID()); + if (!$entity instanceof SOFTWAREEntity) { + throw new \Exception("{$serverPartEntity->getPartUID()}에 해당하는 부품정보를 찾을수없습니다."); + } + //부품정보에 서버정보 설정 및 서비스,고객정보 정의 + $formDatas = []; + if ($action === "return") { //해지된 부품 재고 반납 처리 + $formDatas['stock'] = $entity->getStock() + $serverPartEntity->getCnt(); + } + if ($action === "use") { //사용된 부품 재고 사용처리 + if ($entity->getStock() < $serverPartEntity->getCnt()) { + throw new \Exception("현재 재고수[{$entity->getStock()}]보다 지정하신 갯수({$serverPartEntity->getCnt()})가 더 많습니다."); + } + $formDatas['stock'] = $entity->getStock() - $serverPartEntity->getCnt(); + } + return parent::modify($entity, $formDatas); + } + + public function createServerPart(ServerPartEntity $serverPartEntity): ServerPartEntity + { + $entity = $this->action_process($serverPartEntity, "use"); + return $serverPartEntity->setPartEntity($entity); + } + public function modifyServerPart(ServerPartEntity $serverPartEntity): ServerPartEntity + { + return $this->createServerPart($serverPartEntity,); + } + public function deleteServerPart(ServerPartEntity $serverPartEntity): ServerPartEntity + { + $entity = $this->action_process($serverPartEntity, "return"); + return $serverPartEntity->setPartEntity($entity); + } +} diff --git a/app/Services/Equipment/ServerPart/SwitchService.php b/app/Services/Equipment/ServerPart/SwitchService.php index 12fa329..561e5bd 100644 --- a/app/Services/Equipment/ServerPart/SwitchService.php +++ b/app/Services/Equipment/ServerPart/SwitchService.php @@ -3,9 +3,9 @@ namespace App\Services\Equipment\ServerPart; use App\Entities\Equipment\ServerPartEntity; -use App\Entities\Equipment\SwitchEntity; use App\Interfaces\Equipment\ServerPartInterface; -use App\Services\Equipment\SwitchService as ParentService; +use App\Entities\Part\SwitchEntity; +use App\Services\Part\SwitchService as ParentService; class SwitchService extends ParentService implements ServerPartInterface { diff --git a/app/Services/Equipment/ServerPartService.php b/app/Services/Equipment/ServerPartService.php index 6203f2d..f181832 100644 --- a/app/Services/Equipment/ServerPartService.php +++ b/app/Services/Equipment/ServerPartService.php @@ -7,24 +7,17 @@ use App\Entities\Equipment\ServerPartEntity; use App\Entities\PaymentEntity; use App\Helpers\Equipment\ServerPartHelper; use App\Models\Equipment\ServerPartModel; -use App\Services\Equipment\EquipmentService; -use App\Services\Equipment\ServerPart\CSService; -use App\Services\Equipment\ServerPart\IPService; -use App\Services\Equipment\ServerPart\PartService; -use App\Services\Equipment\ServerPart\PaymentService; -use App\Services\Equipment\ServerPart\ServiceService; -use App\Services\Equipment\ServerPart\SwitchService; use App\Services\Equipment\ServerService; +use App\Services\Equipment\EquipmentService; +use App\Services\Equipment\ServerPart\ServiceService; +use App\Services\Equipment\ServerPart\PaymentService; class ServerPartService extends EquipmentService { private ?ServiceService $_serviceService = null; private ?ServerService $_serverService = null; - private ?SwitchService $_switchService = null; - private ?PartService $_partService = null; - private ?IPService $_ipService = null; - private ?CSService $_csService = null; private ?PaymentService $_paymentService = null; + private $_partServices = []; public function __construct() { parent::__construct(new ServerPartModel(), new ServerPartHelper()); @@ -92,34 +85,6 @@ class ServerPartService extends EquipmentService } return $this->_serverService; } - final public function getPartService(): PartService - { - if (!$this->_partService) { - $this->_partService = new PartService(); - } - return $this->_partService; - } - final public function getSwitchService(): SwitchService - { - if (!$this->_switchService) { - $this->_switchService = new SwitchService(); - } - return $this->_switchService; - } - final public function getIPService(): IPService - { - if (!$this->_ipService) { - $this->_ipService = new IPService(); - } - return $this->_ipService; - } - final public function getCSService(): CSService - { - if (!$this->_csService) { - $this->_csService = new CSService(); - } - return $this->_csService; - } final public function getPaymentService(): PaymentService { if (!$this->_paymentService) { @@ -127,31 +92,25 @@ class ServerPartService extends EquipmentService } return $this->_paymentService; } + final public function getPartService(string $type): object + { + if (!array_key_exists($type, $this->_partServices)) { + $class = "App\\Services\\Equipment\\ServerPart\\{$type}Service"; + if (!class_exists($class)) { + throw new \Exception("{$class} 클래스가 존재하지 않습니다."); + } + $this->_partServices[$type] = new $class(); + } + return $this->_partServices[$type]; + } //partEntity 정보 추가 protected function getEntity_process(mixed $entity): ServerPartEntity { if (!$entity instanceof ServerPartEntity) { throw new \Exception(__METHOD__ . "에서 형식오류:ServicePartEntity만 허용됩니다."); } - switch ($entity->getType()) { - case 'CPU': - case 'RAM': - case 'DISK': - case 'OS': - case 'DB': - case 'SOFTWARE': - $entity->setPartEntity($this->getPartService()->getEntity($entity->getPartUID())); - break; - case 'SWITCH': - $entity->setPartEntity($this->getSwitchService()->getEntity($entity->getPartUID())); - break; - case 'IP': - $entity->setPartEntity($this->getIPService()->getEntity($entity->getPartUID())); - break; - case 'CS': - $entity->setPartEntity($this->getCSService()->getEntity($entity->getPartUID())); - break; - } + //각 파트서비스 정의 + $entity->setPartEntity($this->getPartService($entity->getType())->getEntity($entity->getPartUID())); //결제정보 정의 if ($entity->getPaymentUID()) { $paymentEntity = $this->getPaymentService()->getEntity($entity->getPaymentUID()); @@ -172,28 +131,7 @@ class ServerPartService extends EquipmentService case 'part_uid': $partOptions = []; foreach (SERVERPART['ALL_PARTTYPES'] as $partType) { - switch ($partType) { - case 'CPU': - case 'RAM': - case 'DISK': - case 'OS': - case 'DB': - case 'SOFTWARE': - $partOptions[$partType] = $this->getPartService()->getEntities(['type' => $partType]); - break; - case 'SWITCH': - $partOptions[$partType] = $this->getSwitchService()->getEntities(); - break; - case 'IP': - $partOptions[$partType] = $this->getIPService()->getEntities(); - break; - case 'CS': - $partOptions[$partType] = $this->getCSService()->getEntities(); - break; - default: - $partOptions[$partType] = []; - break; - } + $partOptions[$partType] = $this->getPartService($partType)->getEntities(); } $options = $partOptions; // dd($options); @@ -211,25 +149,7 @@ class ServerPartService extends EquipmentService private function action_process(ServerPartEntity $entity, string $action): ServerPartEntity { //Type에 따른 부품서비스 정의 - switch ($entity->getType()) { - case 'CPU': - case 'RAM': - case 'DISK': - case 'OS': - case 'DB': - case 'SOFTWARE': //재고수 처리 필요 - $entity = $this->getPartService()->$action($entity); - break; - case 'SWITCH': //사용여부 처리 필요 - $entity = $this->getSwitchService()->$action($entity); - break; - case 'IP': //사용여부 처리 필요 - $entity = $this->getIPService()->$action($entity); - break; - case 'CS': //사용여부 처리 필요 - $entity = $this->getCSService()->$action($entity); - break; - } + $this->getPartService($entity->getType())->$action($entity); //서비스 및 결제정보 처리 switch ($entity->getBilling()) { case PAYMENT['BILLING']['MONTH']: //월별과금일때만 처리 diff --git a/app/Services/Equipment/PartService.php b/app/Services/Part/CPUService.php similarity index 63% rename from app/Services/Equipment/PartService.php rename to app/Services/Part/CPUService.php index 2a9e69d..92d21bc 100644 --- a/app/Services/Equipment/PartService.php +++ b/app/Services/Part/CPUService.php @@ -1,23 +1,22 @@ addClassName('Part'); + parent::__construct(new CPUModel(), new CPUHelper()); + $this->addClassName('CPU'); } public function getFormFields(): array { return [ - "type", "title", "price", "stock", @@ -27,14 +26,12 @@ class PartService extends EquipmentService public function getFormFilters(): array { return [ - 'type', 'status', ]; } public function getIndexFields(): array { return [ - "type", "title", "price", "stock", @@ -43,14 +40,14 @@ class PartService extends EquipmentService } public function getBatchjobFields(): array { - return ['type', 'status']; + return ['status']; } //기본 기능부분 //FieldForm관련용 //OrderBy 처리 public function setOrderBy(mixed $field = null, mixed $value = null): void { - $this->getModel()->orderBy('type ASC,uid ASC'); + $this->getModel()->orderBy('title ASC'); parent::setOrderBy($field, $value); } } diff --git a/app/Services/Equipment/CSService.php b/app/Services/Part/CSService.php similarity index 94% rename from app/Services/Equipment/CSService.php rename to app/Services/Part/CSService.php index 243ef7a..de0774f 100644 --- a/app/Services/Equipment/CSService.php +++ b/app/Services/Part/CSService.php @@ -1,13 +1,14 @@ addClassName('DISK'); + } + public function getFormFields(): array + { + return [ + "title", + "price", + "stock", + "status", + ]; + } + public function getFormFilters(): array + { + return [ + 'status', + ]; + } + public function getIndexFields(): array + { + return [ + "title", + "price", + "stock", + "status", + ]; + } + public function getBatchjobFields(): array + { + return ['status']; + } + //기본 기능부분 + //FieldForm관련용 + //OrderBy 처리 + public function setOrderBy(mixed $field = null, mixed $value = null): void + { + $this->getModel()->orderBy('title ASC'); + parent::setOrderBy($field, $value); + } +} diff --git a/app/Services/Equipment/IPService.php b/app/Services/Part/IPService.php similarity index 94% rename from app/Services/Equipment/IPService.php rename to app/Services/Part/IPService.php index e4b4f1e..463e001 100644 --- a/app/Services/Equipment/IPService.php +++ b/app/Services/Part/IPService.php @@ -1,15 +1,16 @@ addClassName('OS'); + } + public function getFormFields(): array + { + return [ + "title", + "price", + "stock", + "status", + ]; + } + public function getFormFilters(): array + { + return [ + 'status', + ]; + } + public function getIndexFields(): array + { + return [ + "title", + "price", + "stock", + "status", + ]; + } + public function getBatchjobFields(): array + { + return ['status']; + } + //기본 기능부분 + //FieldForm관련용 + //OrderBy 처리 + public function setOrderBy(mixed $field = null, mixed $value = null): void + { + $this->getModel()->orderBy('title ASC'); + parent::setOrderBy($field, $value); + } +} diff --git a/app/Services/Part/PartService.php b/app/Services/Part/PartService.php new file mode 100644 index 0000000..39a181f --- /dev/null +++ b/app/Services/Part/PartService.php @@ -0,0 +1,18 @@ +addClassName('Part'); + } +} diff --git a/app/Services/Part/RAMService.php b/app/Services/Part/RAMService.php new file mode 100644 index 0000000..0faef57 --- /dev/null +++ b/app/Services/Part/RAMService.php @@ -0,0 +1,53 @@ +addClassName('RAM'); + } + public function getFormFields(): array + { + return [ + "title", + "price", + "stock", + "status", + ]; + } + public function getFormFilters(): array + { + return [ + 'status', + ]; + } + public function getIndexFields(): array + { + return [ + "title", + "price", + "stock", + "status", + ]; + } + public function getBatchjobFields(): array + { + return ['status']; + } + //기본 기능부분 + //FieldForm관련용 + //OrderBy 처리 + public function setOrderBy(mixed $field = null, mixed $value = null): void + { + $this->getModel()->orderBy('title ASC'); + parent::setOrderBy($field, $value); + } +} diff --git a/app/Services/Part/SOFTWAREService.php b/app/Services/Part/SOFTWAREService.php new file mode 100644 index 0000000..a39a8b5 --- /dev/null +++ b/app/Services/Part/SOFTWAREService.php @@ -0,0 +1,53 @@ +addClassName('SOFTWARE'); + } + public function getFormFields(): array + { + return [ + "title", + "price", + "stock", + "status", + ]; + } + public function getFormFilters(): array + { + return [ + 'status', + ]; + } + public function getIndexFields(): array + { + return [ + "title", + "price", + "stock", + "status", + ]; + } + public function getBatchjobFields(): array + { + return ['status']; + } + //기본 기능부분 + //FieldForm관련용 + //OrderBy 처리 + public function setOrderBy(mixed $field = null, mixed $value = null): void + { + $this->getModel()->orderBy('title ASC'); + parent::setOrderBy($field, $value); + } +} diff --git a/app/Services/Equipment/SwitchService.php b/app/Services/Part/SwitchService.php similarity index 91% rename from app/Services/Equipment/SwitchService.php rename to app/Services/Part/SwitchService.php index b608402..928c979 100644 --- a/app/Services/Equipment/SwitchService.php +++ b/app/Services/Part/SwitchService.php @@ -1,13 +1,14 @@ include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/base'); ?> include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/customer'); ?> include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/equipment'); ?> + include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/part'); ?> diff --git a/app/Views/layouts/admin/left_menu/equipment.php b/app/Views/layouts/admin/left_menu/equipment.php index 3dff04a..8672162 100644 --- a/app/Views/layouts/admin/left_menu/equipment.php +++ b/app/Views/layouts/admin/left_menu/equipment.php @@ -5,22 +5,13 @@
-
- Switch정보 -
회선정보
-
- IP정보 -
-
- CS정보 -
Server정보
- 부품정보 + Server부품연결정보
\ No newline at end of file diff --git a/app/Views/layouts/admin/left_menu/part.php b/app/Views/layouts/admin/left_menu/part.php new file mode 100644 index 0000000..2dfc9ec --- /dev/null +++ b/app/Views/layouts/admin/left_menu/part.php @@ -0,0 +1,32 @@ +

+ +

+
+
+ Switch정보 +
+
+ IP정보 +
+
+ CS정보 +
+
+ CPU정보 +
+
+ RAM정보 +
+
+ DISK정보 +
+
+ OS정보 +
+
+ Software정보 +
+
\ No newline at end of file