From 5f03d7c04597e54226d330350307c4c2e2c69a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Mon, 22 Dec 2025 10:39:05 +0900 Subject: [PATCH] dbmsv4 init...3 --- app/Cells/Equipment/CHASSISCell.php | 2 +- app/Controllers/Admin/Equipment/CHASSISController.php | 2 +- app/Forms/Equipment/CHASSISForm.php | 3 +++ app/Forms/Equipment/ServerForm.php | 2 +- app/Models/Equipment/ServerModel.php | 1 + app/Services/Equipment/ServerPartService.php | 2 +- 6 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/Cells/Equipment/CHASSISCell.php b/app/Cells/Equipment/CHASSISCell.php index fd8b162..ebb61be 100644 --- a/app/Cells/Equipment/CHASSISCell.php +++ b/app/Cells/Equipment/CHASSISCell.php @@ -6,7 +6,7 @@ class CHASSISCell extends EquipmentCell { public function __construct() { - parent::__construct(service('part_chassisservice')); + parent::__construct(service('equipment_chassisservice')); } public function stock(array $params): string diff --git a/app/Controllers/Admin/Equipment/CHASSISController.php b/app/Controllers/Admin/Equipment/CHASSISController.php index adbcd39..2a85296 100644 --- a/app/Controllers/Admin/Equipment/CHASSISController.php +++ b/app/Controllers/Admin/Equipment/CHASSISController.php @@ -12,7 +12,7 @@ class CHASSISController extends EquipmentController { parent::initController($request, $response, $logger); if ($this->service === null) { - $this->service = service('part_chassisservice'); + $this->service = service('equipment_chassisservice'); } $this->addActionPaths('chassis'); } diff --git a/app/Forms/Equipment/CHASSISForm.php b/app/Forms/Equipment/CHASSISForm.php index f78c4c5..30ab0ab 100644 --- a/app/Forms/Equipment/CHASSISForm.php +++ b/app/Forms/Equipment/CHASSISForm.php @@ -13,6 +13,7 @@ class CHASSISForm extends EquipmentForm $fields = [ "title", "price", + "used", "stock", ]; $filters = [ @@ -50,6 +51,8 @@ class CHASSISForm extends EquipmentForm { switch ($field) { case "used": + case "price": + case "stock": $formRules[$field] = "required|numeric"; break; default: diff --git a/app/Forms/Equipment/ServerForm.php b/app/Forms/Equipment/ServerForm.php index a29dc61..0de5b51 100644 --- a/app/Forms/Equipment/ServerForm.php +++ b/app/Forms/Equipment/ServerForm.php @@ -146,7 +146,7 @@ class ServerForm extends EquipmentForm 'text' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택" ] ]; - foreach ($this->getFormOption_process(service('part_chassisservice'), $action, $field, $formDatas) as $tempEntity) { + foreach ($this->getFormOption_process(service('equipment_chassisservice'), $action, $field, $formDatas) as $tempEntity) { $tempOptions[$tempEntity->getPK()] = [ 'value' => $tempEntity->getPK(), 'text' => $tempEntity->getTitle(), diff --git a/app/Models/Equipment/ServerModel.php b/app/Models/Equipment/ServerModel.php index 62734b8..9e4d79f 100644 --- a/app/Models/Equipment/ServerModel.php +++ b/app/Models/Equipment/ServerModel.php @@ -20,6 +20,7 @@ class ServerModel extends EquipmentModel "serviceinfo_uid", "code", "type", + "chassisinfo_uid", "switchinfo_uid", "ip", "os", diff --git a/app/Services/Equipment/ServerPartService.php b/app/Services/Equipment/ServerPartService.php index 92d4f54..254109b 100644 --- a/app/Services/Equipment/ServerPartService.php +++ b/app/Services/Equipment/ServerPartService.php @@ -193,7 +193,7 @@ class ServerPartService extends EquipmentService //검색어조건절처리 //서버추가시 기본파트 자동추가용 - public function defaultServerPart(ServerEntity $serverEntity): void + public function attachToServer(ServerEntity $serverEntity): void { //*서버의 Title 대소문자구분 필요->서버의 Title로 구분해서 기본부품 추가 foreach (SERVERPART['SERVER_PARTTYPES'] as $parttype) {