dbmsv2 init...1

This commit is contained in:
choi.jh 2025-09-05 16:35:03 +09:00
parent 3d8d7a6c65
commit a2d73523a4
8 changed files with 246 additions and 173 deletions

View File

@ -210,6 +210,7 @@ define('ICONS', [
'BOX' => '<i class="bi bi-box"></i>',
'BOXS' => '<i class="bi bi-boxes"></i>',
'ONETIME' => '<i class="bi bi-1-circle-fill text-warning"></i>',
'MONTH' => '<i class="bi bi-calendar-check text-warning"></i>',
'EMAIL' => '<i class="bi bi-mailbox"></i>',
'MAIL' => '<i class="bi bi-envelope"></i>',
'PHONE' => '<i class="bi bi-phone"></i>',

View File

@ -4,8 +4,8 @@
"settings": {
"width": 3000,
"height": 3000,
"scrollTop": -1818.7976,
"scrollLeft": -968.7437,
"scrollTop": -1984.7976,
"scrollLeft": -1393,
"zoomLevel": 0.91,
"show": 511,
"database": 4,
@ -75,7 +75,8 @@
"xBEcgXJ9gdmBDCdg1kmTd",
"v69SOu4bJ3yPh0LPCs06I",
"zEgsZkg-rIZbtF9AWri-c",
"wM3eezHxl6nAo_rtAeJ_s"
"wM3eezHxl6nAo_rtAeJ_s",
"FvUQ_UzlR7zPl1ZcdWxRd"
],
"indexIds": [],
"memoIds": []
@ -834,15 +835,15 @@
"S-_BBM4Qv5LCTvGVKmQQw"
],
"ui": {
"x": 1953.7142,
"y": 1801.7031,
"x": 1726.2417,
"y": 1843.4613,
"zIndex": 4045,
"widthName": 60,
"widthComment": 201,
"color": ""
},
"meta": {
"updateAt": 1756961412059,
"updateAt": 1757047795862,
"createAt": 1755244574868
}
},
@ -852,9 +853,10 @@
"comment": "서버파트정보",
"columnIds": [
"XXQzeCrEymboccXMZCzMo",
"l2g7xess8DY86_ZOm7Ca1",
"IbWdZlEEF70bGqUDkU5ub",
"nlrS7pAK108Hen0g1_yRG",
"eu4eV0U7BRaP7Zk-oyBhV",
"IbWdZlEEF70bGqUDkU5ub",
"l2g7xess8DY86_ZOm7Ca1",
"cHqRVW_Ce77LXwoPpG3OP",
"mYEan5gjLS5bBthtFCc6w",
"tmSvn-3Kqlf7oUbiedFDh",
@ -869,9 +871,11 @@
"CvilrbKyyz1NnLPndNkb8",
"x23F_sFvFpqLOXzldHBFn",
"HZIdc4faH9k91g-JN-NhW",
"l2g7xess8DY86_ZOm7Ca1",
"IbWdZlEEF70bGqUDkU5ub",
"I0MUX9JOn0h2IzMY2mLlF",
"nlrS7pAK108Hen0g1_yRG",
"eu4eV0U7BRaP7Zk-oyBhV",
"IbWdZlEEF70bGqUDkU5ub",
"l2g7xess8DY86_ZOm7Ca1",
"czO0QNJkidvlfvj3hL6xs",
"cHqRVW_Ce77LXwoPpG3OP",
"mYEan5gjLS5bBthtFCc6w",
@ -886,15 +890,15 @@
"IMTeN4-Evbpr5MMraE__C"
],
"ui": {
"x": 2243.3624,
"y": 2299.7793,
"x": 2001.6042,
"y": 2348.1309,
"zIndex": 4514,
"widthName": 76,
"widthComment": 74,
"color": ""
},
"meta": {
"updateAt": 1756961728419,
"updateAt": 1757047817870,
"createAt": 1755476453282
}
},
@ -8299,6 +8303,46 @@
"updateAt": 1756961786936,
"createAt": 1756961726238
}
},
"I0MUX9JOn0h2IzMY2mLlF": {
"id": "I0MUX9JOn0h2IzMY2mLlF",
"tableId": "8GYAVBvZGaMFeq3QuXk_B",
"name": "clientinfo_uid",
"comment": "고객정보",
"dataType": "INT",
"default": "",
"options": 0,
"ui": {
"keys": 0,
"widthName": 73,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1757047671412,
"createAt": 1757047671410
}
},
"nlrS7pAK108Hen0g1_yRG": {
"id": "nlrS7pAK108Hen0g1_yRG",
"tableId": "8GYAVBvZGaMFeq3QuXk_B",
"name": "clientinfo_uid",
"comment": "고객정보",
"dataType": "INT",
"default": "",
"options": 0,
"ui": {
"keys": 2,
"widthName": 73,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1757047738379,
"createAt": 1757047705586
}
}
},
"relationshipEntities": {
@ -8621,7 +8665,7 @@
"V6BuLrtFrGgCWaHSUkSLb"
],
"x": 1397.4650000000001,
"y": 1142.9008333333334,
"y": 1179.5675,
"direction": 2
},
"end": {
@ -8649,7 +8693,7 @@
"V6BuLrtFrGgCWaHSUkSLb"
],
"x": 1397.4650000000001,
"y": 1289.5675,
"y": 1399.5675,
"direction": 2
},
"end": {
@ -8741,8 +8785,8 @@
"columnIds": [
"GtBqjKsmtYWvsd0fckBc0"
],
"x": 1953.7142,
"y": 2095.7030999999997,
"x": 1726.2417,
"y": 2137.4613,
"direction": 1
},
"meta": {
@ -8788,7 +8832,7 @@
"columnIds": [
"V6BuLrtFrGgCWaHSUkSLb"
],
"x": 1130.9650000000001,
"x": 953.2983333333333,
"y": 1509.5675,
"direction": 8
},
@ -8881,8 +8925,8 @@
"columnIds": [
"IbWdZlEEF70bGqUDkU5ub"
],
"x": 2243.3624,
"y": 2459.7793,
"x": 2001.6042,
"y": 2606.1309,
"direction": 1
},
"meta": {
@ -8965,8 +9009,8 @@
"columnIds": [
"7Tqt0jVOln16nire8AE2K"
],
"x": 2222.7142,
"y": 1801.7031,
"x": 1995.2417,
"y": 1843.4613,
"direction": 4
},
"meta": {
@ -8993,8 +9037,8 @@
"columnIds": [
"eu4eV0U7BRaP7Zk-oyBhV"
],
"x": 2540.3624,
"y": 2299.7793,
"x": 2298.6041999999998,
"y": 2348.1309,
"direction": 4
},
"meta": {
@ -9040,17 +9084,17 @@
"columnIds": [
"V6BuLrtFrGgCWaHSUkSLb"
],
"x": 1397.4650000000001,
"y": 1436.2341666666669,
"direction": 2
"x": 1130.965,
"y": 1509.5675,
"direction": 8
},
"end": {
"tableId": "SEgsi7mbM-56Rsx5-qj8K",
"columnIds": [
"q_IaRBb367b9mgGozh6jB"
],
"x": 1953.7142,
"y": 1899.7031,
"x": 1726.2417,
"y": 1941.4613,
"direction": 1
},
"meta": {
@ -9085,6 +9129,34 @@
"updateAt": 1755666739577,
"createAt": 1755666739577
}
},
"FvUQ_UzlR7zPl1ZcdWxRd": {
"id": "FvUQ_UzlR7zPl1ZcdWxRd",
"identification": false,
"relationshipType": 4,
"startRelationshipType": 1,
"start": {
"tableId": "6ajvOCaGuXU9pzV0Y9jEi",
"columnIds": [
"V6BuLrtFrGgCWaHSUkSLb"
],
"x": 1308.6316666666667,
"y": 1509.5675,
"direction": 8
},
"end": {
"tableId": "8GYAVBvZGaMFeq3QuXk_B",
"columnIds": [
"nlrS7pAK108Hen0g1_yRG"
],
"x": 2001.6042,
"y": 2434.1309,
"direction": 1
},
"meta": {
"updateAt": 1757047705587,
"createAt": 1757047705587
}
}
},
"indexEntities": {},

View File

@ -279,7 +279,7 @@ CREATE TABLE `partinfo` (
LOCK TABLES `partinfo` WRITE;
/*!40000 ALTER TABLE `partinfo` DISABLE KEYS */;
INSERT INTO `partinfo` VALUES (1,'CPU1','CPU','Xeon E5530 2.4Ghz 4Core',50000,'available','2025-09-04 08:09:50','2025-09-04 04:54:34',NULL),(2,'CPU2','CPU','Xeon E5540 2.4Ghz 4Core',50000,'available',NULL,'2025-09-04 04:54:34',NULL),(3,'CPU3','CPU','Xeon X5560 2.8Ghz 8Core',80000,'available','2025-09-05 00:05:26','2025-09-04 04:54:34',NULL),(4,'CPU4','CPU','Xeon X5650 2.6Ghz 12Core',100000,'available',NULL,'2025-09-04 04:54:34',NULL),(5,'CPU5','CPU','Xeon E5-2690v2 2.6Ghz 12Core',100000,'available',NULL,'2025-09-04 04:54:34',NULL),(6,'CPU6','CPU','Xeon E5-2690v4 3.0Ghz 20Core',150000,'available','2025-09-05 00:04:09','2025-09-04 04:54:34',NULL),(7,'RAM7','RAM','2G',20000,'available','2025-09-04 08:09:50','2025-09-04 04:54:34',NULL),(8,'RAM8','RAM','4G',30000,'available',NULL,'2025-09-04 04:54:34',NULL),(9,'RAM9','RAM','8G',40000,'available','2025-09-05 00:05:26','2025-09-04 04:54:34',NULL),(10,'RAM10','RAM','16G',60000,'available','2025-09-05 00:04:09','2025-09-04 04:54:34',NULL),(11,'RAM11','RAM','32G',100000,'available',NULL,'2025-09-04 04:54:34',NULL),(12,'RAM12','RAM','64G',100000,'available',NULL,'2025-09-04 04:54:34',NULL),(13,'DISK13','DISK','SATA 128G',50000,'available',NULL,'2025-09-04 04:54:34',NULL),(14,'DISK14','DISK','SATA 256G',70000,'available','2025-09-05 00:05:26','2025-09-04 04:54:34',NULL),(15,'DISK15','DISK','SATA 512G',90000,'available',NULL,'2025-09-04 04:54:34',NULL),(16,'DISK16','DISK','SAS 128G',60000,'available',NULL,'2025-09-04 04:54:34',NULL),(17,'DISK17','DISK','SAS 256G',80000,'available',NULL,'2025-09-04 04:54:34',NULL),(18,'DISK18','DISK','SAS 512G',100000,'available',NULL,'2025-09-04 04:54:34',NULL),(19,'DISK19','DISK','SSD 128G',60000,'available',NULL,'2025-09-04 04:54:34',NULL),(20,'DISK20','DISK','SSD 256G',80000,'available',NULL,'2025-09-04 04:54:34',NULL),(21,'DISK21','DISK','SSD 512G',100000,'available',NULL,'2025-09-04 04:54:34',NULL),(22,'DISK22','DISK','SSD 1T',120000,'available','2025-09-05 00:04:09','2025-09-04 04:54:34',NULL),(23,'DISK23','DISK','SSD 2T',150000,'available',NULL,'2025-09-04 04:54:34',NULL),(24,'DISK24','DISK','NVME 512G',120000,'available',NULL,'2025-09-04 04:54:34',NULL),(25,'DISK25','DISK','NVME 1T',150000,'available',NULL,'2025-09-04 04:54:34',NULL),(26,'DISK26','DISK','NVME 2T',180000,'available',NULL,'2025-09-04 04:54:34',NULL),(27,'OS27','OS','Windows 10',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(28,'OS28','OS','Windows 11',20000,'available',NULL,'2025-09-04 04:54:34',NULL),(29,'OS29','OS','Windows NT 2008R2',30000,'available',NULL,'2025-09-04 04:54:34',NULL),(30,'OS30','OS','Windows NT 2012R2',30000,'available',NULL,'2025-09-04 04:54:34',NULL),(31,'OS31','OS','Windows NT 2016R2',30000,'available',NULL,'2025-09-04 04:54:34',NULL),(32,'OS32','OS','Windows NT 2019R2',30000,'available',NULL,'2025-09-04 04:54:34',NULL),(33,'OS33','OS','CentOS 7',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(34,'OS34','OS','CentOS 8',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(35,'OS35','OS','CentOS 9',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(36,'OS36','OS','Ununtu 20.04',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(37,'OS37','OS','Ununtu 21.04',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(38,'OS38','OS','Ununtu 22.04',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(39,'DB39','DB','Windows MSSQL 2008',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(40,'DB40','DB','Windows MSSQL 2012',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(41,'DB41','DB','Mysql',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(42,'DB42','DB','Postgress',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(43,'SOFTWARE43','SOFTWARE','닷디펜더',50000,'available',NULL,'2025-09-04 04:54:34',NULL),(44,'SOFTWARE44','SOFTWARE','딥파인더',50000,'available',NULL,'2025-09-04 04:54:34',NULL);
INSERT INTO `partinfo` VALUES (1,'CPU1','CPU','Xeon E5530 2.4Ghz 4Core',50000,'occupied','2025-09-05 01:27:05','2025-09-04 04:54:34',NULL),(2,'CPU2','CPU','Xeon E5540 2.4Ghz 4Core',50000,'available',NULL,'2025-09-04 04:54:34',NULL),(3,'CPU3','CPU','Xeon X5560 2.8Ghz 8Core',80000,'available','2025-09-05 00:05:26','2025-09-04 04:54:34',NULL),(4,'CPU4','CPU','Xeon X5650 2.6Ghz 12Core',100000,'available',NULL,'2025-09-04 04:54:34',NULL),(5,'CPU5','CPU','Xeon E5-2690v2 2.6Ghz 12Core',100000,'available',NULL,'2025-09-04 04:54:34',NULL),(6,'CPU6','CPU','Xeon E5-2690v4 3.0Ghz 20Core',150000,'available','2025-09-05 00:04:09','2025-09-04 04:54:34',NULL),(7,'RAM7','RAM','2G',20000,'occupied','2025-09-05 01:27:05','2025-09-04 04:54:34',NULL),(8,'RAM8','RAM','4G',30000,'available',NULL,'2025-09-04 04:54:34',NULL),(9,'RAM9','RAM','8G',40000,'available','2025-09-05 00:05:26','2025-09-04 04:54:34',NULL),(10,'RAM10','RAM','16G',60000,'available','2025-09-05 00:04:09','2025-09-04 04:54:34',NULL),(11,'RAM11','RAM','32G',100000,'available',NULL,'2025-09-04 04:54:34',NULL),(12,'RAM12','RAM','64G',100000,'available',NULL,'2025-09-04 04:54:34',NULL),(13,'DISK13','DISK','SATA 128G',50000,'available',NULL,'2025-09-04 04:54:34',NULL),(14,'DISK14','DISK','SATA 256G',70000,'occupied','2025-09-05 01:27:05','2025-09-04 04:54:34',NULL),(15,'DISK15','DISK','SATA 512G',90000,'available',NULL,'2025-09-04 04:54:34',NULL),(16,'DISK16','DISK','SAS 128G',60000,'available',NULL,'2025-09-04 04:54:34',NULL),(17,'DISK17','DISK','SAS 256G',80000,'available',NULL,'2025-09-04 04:54:34',NULL),(18,'DISK18','DISK','SAS 512G',100000,'available',NULL,'2025-09-04 04:54:34',NULL),(19,'DISK19','DISK','SSD 128G',60000,'available',NULL,'2025-09-04 04:54:34',NULL),(20,'DISK20','DISK','SSD 256G',80000,'available',NULL,'2025-09-04 04:54:34',NULL),(21,'DISK21','DISK','SSD 512G',100000,'available',NULL,'2025-09-04 04:54:34',NULL),(22,'DISK22','DISK','SSD 1T',120000,'available','2025-09-05 00:04:09','2025-09-04 04:54:34',NULL),(23,'DISK23','DISK','SSD 2T',150000,'available',NULL,'2025-09-04 04:54:34',NULL),(24,'DISK24','DISK','NVME 512G',120000,'available',NULL,'2025-09-04 04:54:34',NULL),(25,'DISK25','DISK','NVME 1T',150000,'available',NULL,'2025-09-04 04:54:34',NULL),(26,'DISK26','DISK','NVME 2T',180000,'available',NULL,'2025-09-04 04:54:34',NULL),(27,'OS27','OS','Windows 10',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(28,'OS28','OS','Windows 11',20000,'available',NULL,'2025-09-04 04:54:34',NULL),(29,'OS29','OS','Windows NT 2008R2',30000,'available',NULL,'2025-09-04 04:54:34',NULL),(30,'OS30','OS','Windows NT 2012R2',30000,'available',NULL,'2025-09-04 04:54:34',NULL),(31,'OS31','OS','Windows NT 2016R2',30000,'available',NULL,'2025-09-04 04:54:34',NULL),(32,'OS32','OS','Windows NT 2019R2',30000,'available',NULL,'2025-09-04 04:54:34',NULL),(33,'OS33','OS','CentOS 7',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(34,'OS34','OS','CentOS 8',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(35,'OS35','OS','CentOS 9',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(36,'OS36','OS','Ununtu 20.04',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(37,'OS37','OS','Ununtu 21.04',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(38,'OS38','OS','Ununtu 22.04',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(39,'DB39','DB','Windows MSSQL 2008',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(40,'DB40','DB','Windows MSSQL 2012',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(41,'DB41','DB','Mysql',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(42,'DB42','DB','Postgress',10000,'available',NULL,'2025-09-04 04:54:34',NULL),(43,'SOFTWARE43','SOFTWARE','닷디펜더',50000,'available',NULL,'2025-09-04 04:54:34',NULL),(44,'SOFTWARE44','SOFTWARE','딥파인더',50000,'available',NULL,'2025-09-04 04:54:34',NULL);
/*!40000 ALTER TABLE `partinfo` ENABLE KEYS */;
UNLOCK TABLES;
@ -394,7 +394,7 @@ CREATE TABLE `serverinfo` (
LOCK TABLES `serverinfo` WRITE;
/*!40000 ALTER TABLE `serverinfo` DISABLE KEYS */;
INSERT INTO `serverinfo` VALUES (3,NULL,NULL,'250904-M1','hp','HP DL360 Gen6',400000,300000,'2025-08-31 15:00:00','2025-09-29 15:00:00','available',NULL,'2025-09-04 08:09:50',NULL),(4,NULL,NULL,'250905-M4','hp','Hitach HA3000',400000,200000,'2025-09-02 15:00:00','2025-09-28 15:00:00','available',NULL,'2025-09-05 00:04:09',NULL),(5,NULL,NULL,'250905-M5','del','HP DL360 Gen9',100000,100000,'2025-09-03 15:00:00','2025-09-26 15:00:00','available',NULL,'2025-09-05 00:05:26',NULL);
INSERT INTO `serverinfo` VALUES (3,564,2,'250904-M1','hp','HP DL360 Gen6',400000,300000,'2025-08-31 15:00:00','2025-09-29 15:00:00','occupied','2025-09-05 01:27:05','2025-09-04 08:09:50',NULL),(4,NULL,NULL,'250905-M4','hp','Hitach HA3000',400000,200000,'2025-09-02 15:00:00','2025-09-28 15:00:00','available',NULL,'2025-09-05 00:04:09',NULL),(5,NULL,NULL,'250905-M5','del','HP DL360 Gen9',100000,100000,'2025-09-03 15:00:00','2025-09-26 15:00:00','available',NULL,'2025-09-05 00:05:26',NULL);
/*!40000 ALTER TABLE `serverinfo` ENABLE KEYS */;
UNLOCK TABLES;
@ -431,7 +431,7 @@ CREATE TABLE `serverpartinfo` (
LOCK TABLES `serverpartinfo` WRITE;
/*!40000 ALTER TABLE `serverpartinfo` DISABLE KEYS */;
INSERT INTO `serverpartinfo` VALUES (1,1,3,NULL,'CPU','',0,2,NULL,NULL,'2025-09-04 08:09:50'),(2,7,3,NULL,'RAM','',0,2,NULL,NULL,'2025-09-04 08:09:50'),(3,14,3,NULL,'DISK','',0,2,'RAID1',NULL,'2025-09-04 08:09:50'),(4,6,4,NULL,'CPU','',0,4,NULL,NULL,'2025-09-05 00:04:09'),(5,10,4,NULL,'RAM','',0,4,NULL,NULL,'2025-09-05 00:04:09'),(6,22,4,NULL,'DISK','',0,2,NULL,NULL,'2025-09-05 00:04:09'),(7,3,5,NULL,'CPU','',0,3,NULL,NULL,'2025-09-05 00:05:26'),(8,9,5,NULL,'RAM','',0,3,NULL,NULL,'2025-09-05 00:05:26'),(9,14,5,NULL,'DISK','',0,3,'RAID5',NULL,'2025-09-05 00:05:26');
INSERT INTO `serverpartinfo` VALUES (1,1,3,2,'CPU','',0,2,NULL,'2025-09-05 01:27:05','2025-09-04 08:09:50'),(2,7,3,2,'RAM','',0,2,NULL,'2025-09-05 01:27:05','2025-09-04 08:09:50'),(3,14,3,2,'DISK','',0,2,'RAID1','2025-09-05 01:27:05','2025-09-04 08:09:50'),(4,6,4,NULL,'CPU','',0,4,NULL,NULL,'2025-09-05 00:04:09'),(5,10,4,NULL,'RAM','',0,4,NULL,NULL,'2025-09-05 00:04:09'),(6,22,4,NULL,'DISK','',0,2,NULL,NULL,'2025-09-05 00:04:09'),(7,3,5,NULL,'CPU','',0,3,NULL,NULL,'2025-09-05 00:05:26'),(8,9,5,NULL,'RAM','',0,3,NULL,NULL,'2025-09-05 00:05:26'),(9,14,5,NULL,'DISK','',0,3,'RAID5',NULL,'2025-09-05 00:05:26');
/*!40000 ALTER TABLE `serverpartinfo` ENABLE KEYS */;
UNLOCK TABLES;
@ -465,7 +465,7 @@ CREATE TABLE `serviceinfo` (
KEY `FK_clientinfo_TO_serviceinfo` (`clientinfo_uid`),
CONSTRAINT `FK_clientinfo_TO_serviceinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`),
CONSTRAINT `FK_user_TO_serviceinfo` FOREIGN KEY (`user_uid`) REFERENCES `user` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='서비스정보';
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='서비스정보';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -474,6 +474,7 @@ CREATE TABLE `serviceinfo` (
LOCK TABLES `serviceinfo` WRITE;
/*!40000 ALTER TABLE `serviceinfo` DISABLE KEYS */;
INSERT INTO `serviceinfo` VALUES (2,1,564,'s1757035625','prime','normal','chiba','2025-09-25',400000,'2025-09-05',NULL,NULL,'normal',NULL,'2025-09-05 01:27:05',NULL);
/*!40000 ALTER TABLE `serviceinfo` ENABLE KEYS */;
UNLOCK TABLES;
@ -590,4 +591,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2025-09-05 10:17:16
-- Dump completed on 2025-09-05 12:38:01

View File

@ -20,11 +20,15 @@ class ServerPartEntity extends EquipmentEntity
}
public function getTitle(): string
{
return $this->getPartEntity() === null ? "" : $this->getPartEntity()->getTitle();
return $this->getPartEntity() !== null ? sprintf(
"%s%s",
$this->getBilling() === "" ? "" : ($this->getBilling() === PAYMENT['BILLING']["ONETIME"] ? ICONS['ONETIME'] : ICONS['MONTH']),
$this->getPartEntity()->getTitle()
) : "";
}
public function getPrice(): int
{
return $this->getPartEntity() === null ? 0 : $this->getPartEntity()->getPrice();
return $this->getPartEntity() !== null ? $this->getPartEntity()->getPrice() : 0;
}
//기본기능용
public function getPartUID(): int

View File

@ -16,8 +16,8 @@ return [
'deleted_at' => "삭제일",
],
"BILLING" => [
"month" => "매월",
"onetime" => "일회성",
PAYMENT['BILLING']["MONTH"] => "매월",
PAYMENT['BILLING']["ONETIME"] => "일회성",
],
"TYPE" => [
"CPU" => "CPU",

View File

@ -192,23 +192,31 @@ class ServiceService extends CustomerService
}
//서버설정용
private function enableService(ServiceEntity $entity, array $formDatas): ServiceEntity
private function setServerEntity(ServiceEntity $entity, array $formDatas): ServiceEntity
{
//서버경우 서비스중으로 설정
$serverEntity = $this->getServerService()->getEntity($formDatas['serverinfo_uid']);
if (!$serverEntity) {
throw new \Exception("{$formDatas['serverinfo_uid']}에 대한 서버정보를 찾을수 없습니다.");
}
$serverEntity = $this->getServerService()->enableService($entity, $serverEntity);
$serverFormDatas = [];
$serverFormDatas["clientinfo_uid"] = $entity->getClientInfoUID();
$serverFormDatas["serviceinfo_uid"] = $entity->getPK();
$serverFormDatas["status"] = STATUS['OCCUPIED'];
$serverEntity = $this->getServerService()->modify($serverEntity, $serverFormDatas,);
$entity->setServerEntity($serverEntity);
return $entity;
}
private function disableService(ServiceEntity $entity): ServiceEntity
private function unsetServerEntity(ServiceEntity $entity): ServiceEntity
{
//기존 Server정보와 다른경우 사용가능상태로 변경
$serverEntity = $entity->getServerEntity();
if ($serverEntity !== null) {
$serverEntity = $this->getServerService()->disableService($entity, $serverEntity);
$serverFormDatas = [];
$serverFormDatas["clientinfo_uid"] = null;
$serverFormDatas["serviceinfo_uid"] = null;
$serverFormDatas["status"] = STATUS['AVAIABLE'];
$serverEntity = $this->getServerService()->modify($serverEntity, $serverFormDatas);
$entity->setServerEntity(null);
}
return $entity;
@ -221,7 +229,7 @@ class ServiceService extends CustomerService
throw new \Exception("서버가 지정되지 않았습니다.");
}
//신규정보 Enable
return $this->enableService($entity, $formDatas);
return $this->setServerEntity($entity, $formDatas);
}
//수정
public function modify(mixed $entity, array $formDatas): ServiceEntity
@ -230,16 +238,16 @@ class ServiceService extends CustomerService
throw new \Exception("서버가 지정되지 않았습니다.");
}
//기존정보 Disable
$entity = $this->disableService($entity);
$entity = $this->unsetServerEntity($entity);
//신규정보 Enable
$this->enableService($entity, $formDatas);
$this->setServerEntity($entity, $formDatas);
return parent::modify($entity, $formDatas);
}
//삭제
public function delete(mixed $entity): ServiceEntity
{
//기존정보 Disable
$entity = $this->disableService($entity);
$entity = $this->unsetServerEntity($entity);
return parent::delete($entity);
}
}

View File

@ -2,6 +2,7 @@
namespace App\Services\Equipment;
use App\Entities\Equipment\PartEntity;
use App\Entities\Equipment\ServerEntity;
use App\Entities\Equipment\ServerPartEntity;
use App\Helpers\Equipment\ServerPartHelper;
@ -125,121 +126,94 @@ class ServerPartService extends EquipmentService
}
return $options;
}
//서버별생성
public function createByServer(ServerEntity $serverEntity, array $formDatas): ServerEntity
private function action_process(ServerPartEntity $entity, array $formDatas): mixed
{
foreach (SERVERPART['PARTTYPES'] as $partType) {
if (array_key_exists($partType, $formDatas)) {
$serverPartFormDatas = [];
$serverPartFormDatas["part_uid"] = $formDatas[$partType];
$serverPartFormDatas["serverinfo_uid"] = $serverEntity->getPK();
$serverPartFormDatas["serviceinfo_uid"] = $serverEntity->getServiceInfoUID();
$serverPartFormDatas["type"] = $partType;
$serverPartFormDatas["billing"] = null;
$serverPartFormDatas["amount"] = 0;
$serverPartFormDatas["cnt"] = array_key_exists("{$partType}_cnt", $formDatas) ? $formDatas["{$partType}_cnt"] : 1;
$serverPartFormDatas["extra"] = array_key_exists("{$partType}_extra", $formDatas) ? $formDatas["{$partType}_extra"] : null;
$entity = parent::create($serverPartFormDatas);
//부품정보 정의
switch ($partType) {
case 'SWITCH':
$partService = $this->getSwitchService();
break;
case 'IP':
$partService = $this->getIPService();
break;
case 'CS':
$partService = $this->getCSService();
break;
default:
$partService = $this->getPartService();
break;
}
$partEntity = $partService->getEntity($entity->getPartUID());
if (!$partEntity) {
throw new \Exception(__METHOD__ . "에서 오류:{$partType}{$entity->getPartUID()}에 해닫하는 정보가 없습니다.");
}
$partService->modify($partEntity, [
'serverinfo_uid' => $serverEntity->getPK(),
'serviceinfo_uid' => $serverEntity->getServiceInfoUID(),
]);
$entity->setPartEntity($partEntity);
$serverEntity->addServerPartEntity($partType, $entity);
}
}
return $serverEntity;
}
//서버별삭제
public function deleteByServer(ServerEntity $serverEntity): void
{
//기존 서벼별 부품연결정보 삭제 후
foreach ($this->getEntities(['serverinfo_uid' => $serverEntity->getPK()]) as $entity) {
$this->delete($entity);
}
}
//서비스연결
public function enableService(ServerEntity $serverEntity, ServerPartEntity $entity, array $formDatas): ServerPartEntity
{
//ServerPart 수정
$formDatas["serverinfo_uid"] = $serverEntity->getPK();
$entity = parent::modify($entity, $formDatas);
//각 파트서비스별 수정
//Type에 따른 부품서비스 정의
switch ($entity->getType()) {
case 'SWITCH':
$partService = $this->getSwitchService();
$formDatas['status'] = STATUS['OCCUPIED'];;
break;
case 'IP':
$partService = $this->getIPService();
$formDatas['status'] = STATUS['OCCUPIED'];;
break;
case 'CS':
$partService = $this->getCSService();
$formDatas['status'] = STATUS['OCCUPIED'];;
break;
default:
$partService = $this->getPartService();
break;
}
//부품정보가져오기
$partEntity = $partService->getEntity($entity->getPartUID());
if (!$partEntity) {
throw new \Exception(__METHOD__ . "에서 오류:{$entity->getType()}{$entity->getPartUID()}에 해닫하는 정보가 없습니다.");
throw new \Exception(__METHOD__ . "에서 오류:{$entity->getPartUID()}에 해닫하는 {$entity->getType()}정보가 없습니다.");
}
$partEntity = $partService->modify($partEntity, $formDatas);
//파트설정
$entity->setPartEntity($partEntity);
return $entity;
}
//서비스해지
public function disableService(ServerPartEntity $entity, array $formDatas = []): ServerPartEntity
{
//ServerPart 수정
$entity = parent::modify($entity, $formDatas);
//각 파트서비스별 수정
switch ($entity->getType()) {
case 'SWITCH':
$partService = $this->getSwitchService();
$formDatas['status'] = STATUS['AVAILABLE'];
case 'CS':
$partEntity = $partService->modify($partEntity, $formDatas);
break;
case 'IP':
$partService = $this->getIPService();
$formDatas['status'] = STATUS['AVAILABLE'];
break;
case 'CS':
$partService = $this->getCSService();
$formDatas['status'] = STATUS['AVAILABLE'];
break;
default:
$partService = $this->getPartService();
//기존IP 사용자로 고객정보 설정
$formDatas['old_clientinfo_uid'] = $partEntity->getClientInfoUID();
$partEntity = $partService->modify($partEntity, $formDatas);
break;
}
$partEntity = $partService->getEntity($entity->getPartUID());
if (!$partEntity) {
throw new \Exception(__METHOD__ . "에서 오류:{$entity->getType()}{$entity->getPartUID()}에 해닫하는 정보가 없습니다.");
return $partEntity;
}
//부품연결정보생성
public function create(array $formDatas): ServerPartEntity
{
$entity = parent::create($formDatas);
//서버정보가져오기
$serverEntity = $this->getServerService()->getEntity($entity->getServerInfoUID());
if (!$serverEntity) {
throw new \Exception(__METHOD__ . "에서 오류:{$entity->getServerInfoUID()}에 해닫하는 서버정보가 없습니다.");
}
$partEntity = $partService->modify($partEntity, $formDatas);
//파트설정
$entity->setPartEntity($partEntity);
//부품연결정보에 부품정보 정의
$partFormDatas = [
'clientinfo_uid' => $serverEntity->getClientInfoUID(),
'serviceinfo_uid' => $serverEntity->getServiceInfoUID(),
'serverinfo_uid' => $serverEntity->getPK(),
'status' => STATUS['OCCUPIED']
];
$entity->setPartEntity($this->action_process($entity, $partFormDatas));
return $entity;
}
//수정
public function modify(mixed $entity, array $formDatas): ServerPartEntity
{
$entity = parent::modify($entity, $formDatas);
if (!array_key_exists('status', $formDatas)) {
throw new \Exception(__METHOD__ . "에서 상태정보가 정의되지 않았습니다.");
}
//부품정보에 서버정보 설정 및 서비스,고객정보 정의
$partFormDatas = [
'status' => $formDatas['status'],
];
if ($partFormDatas['status'] === STATUS['OCCUPIED']) {
$partFormDatas['clientinfo_uid'] = $entity->getClientInfoUID();
$partFormDatas['serviceinfo_uid'] = $entity->getServiceInfoUID();
$partFormDatas['serverinfo_uid'] = $entity->getServerInfoUID();
$entity->setPartEntity($this->action_process($entity, $partFormDatas));
} else {
$partFormDatas['clientinfo_uid'] = null;
$partFormDatas['serviceinfo_uid'] = null;
$partFormDatas['serverinfo_uid'] = null;
$entity->setPartEntity($this->action_process($entity, $partFormDatas));
}
return $entity;
}
//삭제
public function delete(mixed $entity): ServerPartEntity
{
$partFormDatas = [
'status' => STATUS['AVAIABLE'],
];
$partFormDatas['clientinfo_uid'] = null;
$partFormDatas['serviceinfo_uid'] = null;
$partFormDatas['serverinfo_uid'] = null;
$this->action_process($entity, $partFormDatas);
return parent::delete($entity);
}
}

View File

@ -138,8 +138,53 @@ class ServerService extends EquipmentService
{
$entity = parent::create($formDatas);
//신규 ServerPart정보 생성
foreach ($this->getServerPartService()->createByServer($entity, $formDatas) as $serverPartEntity) {
$entity->addServerPartEntity($serverPartEntity->getType(), $serverPartEntity);
foreach (SERVERPART['PARTTYPES'] as $partType) {
if (array_key_exists($partType, $formDatas)) {
$serverPartFormDatas = [];
$serverPartFormDatas["part_uid"] = $formDatas[$partType];
$serverPartFormDatas["clientinfo_uid"] = $entity->getClientInfoUID();
$serverPartFormDatas["serviceinfo_uid"] = $entity->getServiceInfoUID();
$serverPartFormDatas["serverinfo_uid"] = $entity->getPK();
$serverPartFormDatas["type"] = $partType;
$serverPartFormDatas["billing"] = null;
$serverPartFormDatas["amount"] = 0;
$serverPartFormDatas["cnt"] = array_key_exists("{$partType}_cnt", $formDatas) ? $formDatas["{$partType}_cnt"] : 1;
$serverPartFormDatas["extra"] = array_key_exists("{$partType}_extra", $formDatas) ? $formDatas["{$partType}_extra"] : null;
$serverPartEntity = $this->getServerPartService()->create($serverPartFormDatas);
$entity->addServerPartEntity($serverPartEntity->getType(), $serverPartEntity);
}
}
return $entity;
}
//Service별 수정
public function modify(mixed $entity, array $formDatas): ServerEntity
{
$entity = parent::modify($entity, $formDatas);
if (!array_key_exists('status', $formDatas)) {
throw new \Exception(__METHOD__ . "에서 상태정보가 정의되지 않았습니다.");
}
//부품연결정보에 서버정보 설정 및 서비스,고객정보 정의
$partFormDatas = [
'serverinfo_uid' => $entity->getPK(),
'status' => $formDatas['status'],
];
if ($partFormDatas['status'] === STATUS['OCCUPIED']) {
$partFormDatas['clientinfo_uid'] = $entity->getClientInfoUID();
$partFormDatas['serviceinfo_uid'] = $entity->getServiceInfoUID();
foreach ($this->getServerPartService()->getEntities(['serverinfo_uid' => $entity->getPK()]) as $serverPartEntity) {
$entity->addServerPartEntity(
$serverPartEntity->getType(),
$this->getServerPartService()->modify($serverPartEntity, $partFormDatas)
);
}
} else {
$partFormDatas['clientinfo_uid'] = null;
$partFormDatas['serviceinfo_uid'] = null;
$entities = [];
foreach ($this->getServerPartService()->getEntities(['serverinfo_uid' => $entity->getPK()]) as $serverPartEntity) {
$entities[] = $this->getServerPartService()->modify($serverPartEntity, $partFormDatas);
}
$entity->setServerPartEntities($entities);
}
return $entity;
}
@ -147,7 +192,9 @@ class ServerService extends EquipmentService
public function delete(mixed $entity): ServerEntity
{
//기존 ServerPart정보 삭제
$this->getServerPartService()->deleteByServer($entity);
foreach ($this->getServerPartService()->getEntities(['serverinfo_uid' => $entity->getPK()]) as $serverPartEntity) {
$this->getServerPartService()->deleteByServer($serverPartEntity);
}
return parent::delete($entity);
}
//List 검색용
@ -157,38 +204,4 @@ class ServerService extends EquipmentService
$this->getModel()->orderBy("code ASC,title ASC");
parent::setOrderBy($field, $value);
}
public function enableService(ServiceEntity $serviceEntity, ServerEntity $entity): ServerEntity
{
$formDatas = [];
$formDatas["clientinfo_uid"] = $serviceEntity->getClientInfoUID();
$formDatas["serviceinfo_uid"] = $serviceEntity->getPK();
$formDatas['status'] = STATUS['OCCUPIED'];;
$entity = parent::modify($entity, $formDatas);
//ServerPart경우 서비스번호 설정
foreach ($this->getServerPartService()->getEntities(['serverinfo_uid' => $entity->getPK()]) as $serverPartEntity) {
$entity->addServerPartEntity(
$serverPartEntity->getType(),
$this->getServerPartService()->enableService($entity, $serverPartEntity, $formDatas)
);
}
return $entity;
}
public function disableService(ServiceEntity $serviceEntity, ServerEntity $entity): ServerEntity
{
$formDatas = [];
$formDatas["clientinfo_uid"] = null;
$formDatas["serviceinfo_uid"] = null;
$formDatas['old_clientinfo_uid'] = $serviceEntity->getClientInfoUID();
$formDatas['status'] = STATUS['AVAILABLE'];
$entity = parent::modify($entity, $formDatas);
//ServerPart경우 서비스번호 해지
foreach ($this->getServerPartService()->getEntities(['serverinfo_uid' => $entity->getPK()]) as $serverPartEntity) {
$entity->addServerPartEntity(
$serverPartEntity->getType(),
$this->getServerPartService()->disableService($serverPartEntity)
);
}
return $entity;
}
}