dbmsv2 init...1

This commit is contained in:
choi.jh 2025-08-20 17:27:59 +09:00
parent dff01f8dee
commit 9fa605e130
43 changed files with 1458 additions and 226 deletions

View File

@ -384,8 +384,8 @@ define('SERVICE_UNPAID_ITEM_TYPE', $_ENV['SERVICE_UNPAID_ITEM_TYPE'] ?? $_SERVER
define( define(
'SITE_PREFIX', 'SITE_PREFIX',
[ [
'prime' => $_ENV['PREFIX_Client'] ?? $_SERVER['PREFIX_Client'] ?? 'PR', 'prime' => $_ENV['PREFIX_Client'] ?? $_SERVER['PREFIX_Client'] ?? 'PIC',
'itsolution' => $_ENV['PREFIX_Client'] ?? $_SERVER['PREFIX_Client'] ?? 'IT', 'itsolution' => $_ENV['PREFIX_Client'] ?? $_SERVER['PREFIX_Client'] ?? 'IIC',
'gdidc' => $_ENV['PREFIX_Client'] ?? $_SERVER['PREFIX_Client'] ?? 'GD', 'gdidc' => $_ENV['PREFIX_Client'] ?? $_SERVER['PREFIX_Client'] ?? 'GIC',
], ],
); );

View File

@ -4,9 +4,9 @@
"settings": { "settings": {
"width": 3000, "width": 3000,
"height": 3000, "height": 3000,
"scrollTop": -962.0994, "scrollTop": -1450.0603,
"scrollLeft": -672.1533, "scrollLeft": -1122,
"zoomLevel": 0.79, "zoomLevel": 1,
"show": 511, "show": 511,
"database": 4, "database": 4,
"databaseName": "", "databaseName": "",
@ -69,7 +69,14 @@
"sWc1LMcA0iFU_8byUhUnv", "sWc1LMcA0iFU_8byUhUnv",
"UoS3Mvohv6zri0971LA1O", "UoS3Mvohv6zri0971LA1O",
"sXGbpO3Qip9Ed7NxK_Bdj", "sXGbpO3Qip9Ed7NxK_Bdj",
"-Cg-8t54mL4p_RVJqoVEC" "-Cg-8t54mL4p_RVJqoVEC",
"y4yqEjn054HMDyVTrysPw",
"YjcBb9KuGXDVq-G904P1k",
"zprESM3XUJWWKC7ykd6bV",
"xBEcgXJ9gdmBDCdg1kmTd",
"v69SOu4bJ3yPh0LPCs06I",
"zEgsZkg-rIZbtF9AWri-c",
"wM3eezHxl6nAo_rtAeJ_s"
], ],
"indexIds": [], "indexIds": [],
"memoIds": [] "memoIds": []
@ -244,9 +251,9 @@
"9F6QpQqxeEggZ0FHM81O1", "9F6QpQqxeEggZ0FHM81O1",
"tsDqk1dzwzUtvBzpjmarJ", "tsDqk1dzwzUtvBzpjmarJ",
"IiWPO22p9r3zajF_EcPpe", "IiWPO22p9r3zajF_EcPpe",
"bh-W1plz0vCW2rURDnfDR",
"hmZlcR-Pw2C_ife1zzo5o", "hmZlcR-Pw2C_ife1zzo5o",
"AGBQ4FnuIDU-Dy5QoS0Fu", "AGBQ4FnuIDU-Dy5QoS0Fu",
"bh-W1plz0vCW2rURDnfDR",
"tNaVOzr3vywCXiQdfUJWq", "tNaVOzr3vywCXiQdfUJWq",
"6bQ_6eGfINic9LpM6PtDw", "6bQ_6eGfINic9LpM6PtDw",
"X-NZLAAPpv21iBJTwymIG" "X-NZLAAPpv21iBJTwymIG"
@ -296,9 +303,9 @@
"5LbBaqufhFMN2X15ksCbZ", "5LbBaqufhFMN2X15ksCbZ",
"gf3QFUo-9exbygXX3-0H0", "gf3QFUo-9exbygXX3-0H0",
"IiWPO22p9r3zajF_EcPpe", "IiWPO22p9r3zajF_EcPpe",
"bh-W1plz0vCW2rURDnfDR",
"hmZlcR-Pw2C_ife1zzo5o", "hmZlcR-Pw2C_ife1zzo5o",
"AGBQ4FnuIDU-Dy5QoS0Fu", "AGBQ4FnuIDU-Dy5QoS0Fu",
"bh-W1plz0vCW2rURDnfDR",
"tNaVOzr3vywCXiQdfUJWq", "tNaVOzr3vywCXiQdfUJWq",
"6bQ_6eGfINic9LpM6PtDw", "6bQ_6eGfINic9LpM6PtDw",
"yjaoHnd4nFaa-3REXvRfN", "yjaoHnd4nFaa-3REXvRfN",
@ -311,15 +318,15 @@
"aY2pn1J3VHF_qV5XFM_zf" "aY2pn1J3VHF_qV5XFM_zf"
], ],
"ui": { "ui": {
"x": 740.179, "x": 800.9385,
"y": 1541.8541, "y": 1634.2588,
"zIndex": 2, "zIndex": 2,
"widthName": 60, "widthName": 60,
"widthComment": 60, "widthComment": 60,
"color": "" "color": ""
}, },
"meta": { "meta": {
"updateAt": 1755653857413, "updateAt": 1755668734126,
"createAt": 1745819764137 "createAt": 1745819764137
} }
}, },
@ -429,11 +436,12 @@
"columnIds": [ "columnIds": [
"Id0h8QbOdlhPj9P1zTm5o", "Id0h8QbOdlhPj9P1zTm5o",
"f7_MGvRjkwL1xkCWrAgDR", "f7_MGvRjkwL1xkCWrAgDR",
"4sj8hIYAiLSSF89eeNXdQ",
"60w6M5QqxGAvJa3EEMDbR", "60w6M5QqxGAvJa3EEMDbR",
"sJfMcwfDgXnsZ89DVVDA2",
"QznZ6PY_T3OGj3YD4GdOX", "QznZ6PY_T3OGj3YD4GdOX",
"6qd6rcTkraI_AbHcVbp6T", "6qd6rcTkraI_AbHcVbp6T",
"dIY_dF7qvUpTGyBwlnHjG", "dIY_dF7qvUpTGyBwlnHjG",
"aWjaosOJdZd4AqZ-dk69F",
"nDoaVrEhO8hLuHbgZV4il", "nDoaVrEhO8hLuHbgZV4il",
"Vm1-FnoJLcJ0GRnTp0vnn", "Vm1-FnoJLcJ0GRnTp0vnn",
"R-UjmO-S2UeQdddVNwH5M", "R-UjmO-S2UeQdddVNwH5M",
@ -444,6 +452,7 @@
"Id0h8QbOdlhPj9P1zTm5o", "Id0h8QbOdlhPj9P1zTm5o",
"SFj3q5xg6pcI4RSDKPSgI", "SFj3q5xg6pcI4RSDKPSgI",
"f7_MGvRjkwL1xkCWrAgDR", "f7_MGvRjkwL1xkCWrAgDR",
"4sj8hIYAiLSSF89eeNXdQ",
"60w6M5QqxGAvJa3EEMDbR", "60w6M5QqxGAvJa3EEMDbR",
"nIeV_YUzCUo3ZwJEtefBV", "nIeV_YUzCUo3ZwJEtefBV",
"ZPFSJbnNsml6U3UKwtSVX", "ZPFSJbnNsml6U3UKwtSVX",
@ -457,6 +466,7 @@
"sWwdum3AkxFncLEFPN1CM", "sWwdum3AkxFncLEFPN1CM",
"ImCmrkHrB4nfB35PilQnf", "ImCmrkHrB4nfB35PilQnf",
"6i-Ag5fvYugIDFg9tH3HA", "6i-Ag5fvYugIDFg9tH3HA",
"sJfMcwfDgXnsZ89DVVDA2",
"QznZ6PY_T3OGj3YD4GdOX", "QznZ6PY_T3OGj3YD4GdOX",
"6qd6rcTkraI_AbHcVbp6T", "6qd6rcTkraI_AbHcVbp6T",
"0ONL4QLQRyZ32MBJ7TN7u", "0ONL4QLQRyZ32MBJ7TN7u",
@ -471,15 +481,15 @@
"CX9ODlVw-gFnxgfMJ1JyV" "CX9ODlVw-gFnxgfMJ1JyV"
], ],
"ui": { "ui": {
"x": 1514.7956, "x": 1540.5299,
"y": 1440.8948, "y": 1515.3125,
"zIndex": 2, "zIndex": 2,
"widthName": 60, "widthName": 60,
"widthComment": 60, "widthComment": 60,
"color": "" "color": ""
}, },
"meta": { "meta": {
"updateAt": 1755654232567, "updateAt": 1755677464387,
"createAt": 1745819764138 "createAt": 1745819764138
} }
}, },
@ -924,6 +934,7 @@
"Vf3bNvvEPfu1zCs4rcHTU", "Vf3bNvvEPfu1zCs4rcHTU",
"N-2m8O_JzS6-sDEcL5zTv", "N-2m8O_JzS6-sDEcL5zTv",
"1ZM86qoxmCcoKnqOpE2oj", "1ZM86qoxmCcoKnqOpE2oj",
"mIkGBA96-a6Rh6AoRddl7",
"50a08OnwVq9SXAXX5pq6s", "50a08OnwVq9SXAXX5pq6s",
"ptLUIGfIqm89XGRz_V2ww", "ptLUIGfIqm89XGRz_V2ww",
"hQ5EOPiUpDbVpWQwawtw4", "hQ5EOPiUpDbVpWQwawtw4",
@ -943,6 +954,7 @@
"Vf3bNvvEPfu1zCs4rcHTU", "Vf3bNvvEPfu1zCs4rcHTU",
"N-2m8O_JzS6-sDEcL5zTv", "N-2m8O_JzS6-sDEcL5zTv",
"1ZM86qoxmCcoKnqOpE2oj", "1ZM86qoxmCcoKnqOpE2oj",
"mIkGBA96-a6Rh6AoRddl7",
"NzxkmndrTbH7xb6fbnGV7", "NzxkmndrTbH7xb6fbnGV7",
"x3mRYyi3hsNg-7bPbddVH", "x3mRYyi3hsNg-7bPbddVH",
"KcB0lsCfyDNkaBkLXrHec", "KcB0lsCfyDNkaBkLXrHec",
@ -998,7 +1010,7 @@
"color": "" "color": ""
}, },
"meta": { "meta": {
"updateAt": 1755654974759, "updateAt": 1755660518169,
"createAt": 1748485662214 "createAt": 1748485662214
} }
}, },
@ -1046,6 +1058,8 @@
"comment": "스위치정보", "comment": "스위치정보",
"columnIds": [ "columnIds": [
"CKqk9KisacveOubGKDQHa", "CKqk9KisacveOubGKDQHa",
"9FYinSR3C6jDrEsRsCMpl",
"E30sHnqJytLlBmfL7ueOG",
"wi1XbZM3emknh42sOMkYq", "wi1XbZM3emknh42sOMkYq",
"sVypeCGZk-JXvsbwc93Rw", "sVypeCGZk-JXvsbwc93Rw",
"QEXGVSZ3sjvmtUCdgXl6_", "QEXGVSZ3sjvmtUCdgXl6_",
@ -1062,7 +1076,11 @@
"CKqk9KisacveOubGKDQHa", "CKqk9KisacveOubGKDQHa",
"GGL413h2VpSCaHyrCkWSA", "GGL413h2VpSCaHyrCkWSA",
"Li6TetD-ZbH9MNKGAK0im", "Li6TetD-ZbH9MNKGAK0im",
"_Ftnl1jfEidMZj7ag7w7v",
"9FYinSR3C6jDrEsRsCMpl",
"E30sHnqJytLlBmfL7ueOG",
"wi1XbZM3emknh42sOMkYq", "wi1XbZM3emknh42sOMkYq",
"0DqzeiTdKUa6hunIDyuc4",
"sVypeCGZk-JXvsbwc93Rw", "sVypeCGZk-JXvsbwc93Rw",
"_KISusuMe8-oGta7xOaz0", "_KISusuMe8-oGta7xOaz0",
"QEXGVSZ3sjvmtUCdgXl6_", "QEXGVSZ3sjvmtUCdgXl6_",
@ -1071,15 +1089,15 @@
"qOLH2re1rmaG-63c08R8x" "qOLH2re1rmaG-63c08R8x"
], ],
"ui": { "ui": {
"x": 88.893, "x": 74.9689,
"y": 1443.8934, "y": 1414.7795,
"zIndex": 2509, "zIndex": 2509,
"widthName": 60, "widthName": 60,
"widthComment": 62, "widthComment": 62,
"color": "" "color": ""
}, },
"meta": { "meta": {
"updateAt": 1755653730437, "updateAt": 1755666709923,
"createAt": 1750898626895 "createAt": 1750898626895
} }
}, },
@ -1364,6 +1382,8 @@
"comment": "CS정보(한서버 여러개 앞단 등록가능)", "comment": "CS정보(한서버 여러개 앞단 등록가능)",
"columnIds": [ "columnIds": [
"PuLZie9O9warTXzmBPj3F", "PuLZie9O9warTXzmBPj3F",
"q_IaRBb367b9mgGozh6jB",
"7Tqt0jVOln16nire8AE2K",
"GtBqjKsmtYWvsd0fckBc0", "GtBqjKsmtYWvsd0fckBc0",
"JtbW3CtPKBxnw4Fohhpci", "JtbW3CtPKBxnw4Fohhpci",
"2KpyBHvmw6fmuTZhPAWYf", "2KpyBHvmw6fmuTZhPAWYf",
@ -1379,6 +1399,8 @@
"PuLZie9O9warTXzmBPj3F", "PuLZie9O9warTXzmBPj3F",
"SlovGoAbswPj9pLEDGAO_", "SlovGoAbswPj9pLEDGAO_",
"pcpeNmSmqH_DtbRLyaYv9", "pcpeNmSmqH_DtbRLyaYv9",
"q_IaRBb367b9mgGozh6jB",
"7Tqt0jVOln16nire8AE2K",
"GtBqjKsmtYWvsd0fckBc0", "GtBqjKsmtYWvsd0fckBc0",
"JtbW3CtPKBxnw4Fohhpci", "JtbW3CtPKBxnw4Fohhpci",
"2KpyBHvmw6fmuTZhPAWYf", "2KpyBHvmw6fmuTZhPAWYf",
@ -1390,18 +1412,20 @@
"J6Q1DK6nYtjbR0gheWzY6", "J6Q1DK6nYtjbR0gheWzY6",
"cvcacwm-6mn2YlVM7rpSx", "cvcacwm-6mn2YlVM7rpSx",
"bhWMMkiKCtXDKt4cP-_sB", "bhWMMkiKCtXDKt4cP-_sB",
"QntZma68vv35q1xARB2R4" "QntZma68vv35q1xARB2R4",
"W4u2iQCMhE_0W4Ex8Z_2j",
"S-_BBM4Qv5LCTvGVKmQQw"
], ],
"ui": { "ui": {
"x": 87.9303, "x": 77.8039,
"y": 1724.3252, "y": 1753.4391,
"zIndex": 4045, "zIndex": 4045,
"widthName": 60, "widthName": 60,
"widthComment": 201, "widthComment": 201,
"color": "" "color": ""
}, },
"meta": { "meta": {
"updateAt": 1755653784249, "updateAt": 1755665171861,
"createAt": 1755244574868 "createAt": 1755244574868
} }
}, },
@ -1584,8 +1608,9 @@
"comment": "서버정보_part정보(CASECADE)", "comment": "서버정보_part정보(CASECADE)",
"columnIds": [ "columnIds": [
"XXQzeCrEymboccXMZCzMo", "XXQzeCrEymboccXMZCzMo",
"IbWdZlEEF70bGqUDkU5ub",
"l2g7xess8DY86_ZOm7Ca1", "l2g7xess8DY86_ZOm7Ca1",
"IbWdZlEEF70bGqUDkU5ub",
"eu4eV0U7BRaP7Zk-oyBhV",
"mYEan5gjLS5bBthtFCc6w", "mYEan5gjLS5bBthtFCc6w",
"SioEINPlR0iyL87vqa4N-", "SioEINPlR0iyL87vqa4N-",
"NdvFKvSSsZJ3s1sEMgXzt", "NdvFKvSSsZJ3s1sEMgXzt",
@ -1598,8 +1623,9 @@
"CvilrbKyyz1NnLPndNkb8", "CvilrbKyyz1NnLPndNkb8",
"x23F_sFvFpqLOXzldHBFn", "x23F_sFvFpqLOXzldHBFn",
"HZIdc4faH9k91g-JN-NhW", "HZIdc4faH9k91g-JN-NhW",
"IbWdZlEEF70bGqUDkU5ub",
"l2g7xess8DY86_ZOm7Ca1", "l2g7xess8DY86_ZOm7Ca1",
"IbWdZlEEF70bGqUDkU5ub",
"eu4eV0U7BRaP7Zk-oyBhV",
"mYEan5gjLS5bBthtFCc6w", "mYEan5gjLS5bBthtFCc6w",
"SioEINPlR0iyL87vqa4N-", "SioEINPlR0iyL87vqa4N-",
"fqqyFASOLVXWIKq61Jce7", "fqqyFASOLVXWIKq61Jce7",
@ -1610,15 +1636,15 @@
"kDyVwSigBBYnp_F9MyRAw" "kDyVwSigBBYnp_F9MyRAw"
], ],
"ui": { "ui": {
"x": 1515.6117, "x": 1543.4598,
"y": 1810.3055, "y": 1910.3055,
"zIndex": 4514, "zIndex": 4514,
"widthName": 101, "widthName": 101,
"widthComment": 165, "widthComment": 165,
"color": "" "color": ""
}, },
"meta": { "meta": {
"updateAt": 1755654072586, "updateAt": 1755664896195,
"createAt": 1755476453282 "createAt": 1755476453282
} }
}, },
@ -9972,8 +9998,8 @@
"name": "location", "name": "location",
"comment": "지역코드(chiba,tokyo,3center등)", "comment": "지역코드(chiba,tokyo,3center등)",
"dataType": "VARCHAR(20)", "dataType": "VARCHAR(20)",
"default": "", "default": "'chiba'",
"options": 0, "options": 8,
"ui": { "ui": {
"keys": 0, "keys": 0,
"widthName": 60, "widthName": 60,
@ -9982,7 +10008,7 @@
"widthDefault": 60 "widthDefault": 60
}, },
"meta": { "meta": {
"updateAt": 1755593517165, "updateAt": 1755668336051,
"createAt": 1755237587825 "createAt": 1755237587825
} }
}, },
@ -13062,7 +13088,7 @@
"widthDefault": 60 "widthDefault": 60
}, },
"meta": { "meta": {
"updateAt": 1755653797503, "updateAt": 1755664722248,
"createAt": 1755653779889 "createAt": 1755653779889
} }
}, },
@ -13185,6 +13211,246 @@
"updateAt": 1755655622958, "updateAt": 1755655622958,
"createAt": 1755654833478 "createAt": 1755654833478
} }
},
"mIkGBA96-a6Rh6AoRddl7": {
"id": "mIkGBA96-a6Rh6AoRddl7",
"tableId": "B8haiEbPc1lRBWTv1g25G",
"name": "site",
"comment": "Site구분",
"dataType": "VARCHAR(20)",
"default": "'prime'",
"options": 8,
"ui": {
"keys": 0,
"widthName": 60,
"widthComment": 60,
"widthDataType": 75,
"widthDefault": 60
},
"meta": {
"updateAt": 1755660515026,
"createAt": 1755660515026
}
},
"W4u2iQCMhE_0W4Ex8Z_2j": {
"id": "W4u2iQCMhE_0W4Ex8Z_2j",
"tableId": "SEgsi7mbM-56Rsx5-qj8K",
"name": "clientinfo_uid",
"comment": "고객정보",
"dataType": "INT",
"default": "",
"options": 0,
"ui": {
"keys": 0,
"widthName": 73,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1755664458165,
"createAt": 1755664458165
}
},
"S-_BBM4Qv5LCTvGVKmQQw": {
"id": "S-_BBM4Qv5LCTvGVKmQQw",
"tableId": "SEgsi7mbM-56Rsx5-qj8K",
"name": "serviceinfo_uid",
"comment": "서비스정보",
"dataType": "INT",
"default": "",
"options": 0,
"ui": {
"keys": 0,
"widthName": 80,
"widthComment": 62,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1755664458165,
"createAt": 1755664458165
}
},
"sJfMcwfDgXnsZ89DVVDA2": {
"id": "sJfMcwfDgXnsZ89DVVDA2",
"tableId": "ZLEpY5EjuZV21718zf-Y1",
"name": "serviceinfo_uid",
"comment": "서비스정보",
"dataType": "INT",
"default": "",
"options": 0,
"ui": {
"keys": 2,
"widthName": 80,
"widthComment": 62,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1755664545515,
"createAt": 1755664509604
}
},
"E30sHnqJytLlBmfL7ueOG": {
"id": "E30sHnqJytLlBmfL7ueOG",
"tableId": "IsMoJXzvtuoOFFt93qS0w",
"name": "serviceinfo_uid",
"comment": "서비스정보",
"dataType": "INT",
"default": "",
"options": 0,
"ui": {
"keys": 2,
"widthName": 80,
"widthComment": 62,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1755664604764,
"createAt": 1755664567491
}
},
"7Tqt0jVOln16nire8AE2K": {
"id": "7Tqt0jVOln16nire8AE2K",
"tableId": "SEgsi7mbM-56Rsx5-qj8K",
"name": "serviceinfo_uid",
"comment": "서비스정보",
"dataType": "INT",
"default": "",
"options": 0,
"ui": {
"keys": 2,
"widthName": 80,
"widthComment": 62,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1755664722936,
"createAt": 1755664615534
}
},
"eu4eV0U7BRaP7Zk-oyBhV": {
"id": "eu4eV0U7BRaP7Zk-oyBhV",
"tableId": "8GYAVBvZGaMFeq3QuXk_B",
"name": "serviceinfo_uid",
"comment": "서비스정보",
"dataType": "INT",
"default": "",
"options": 0,
"ui": {
"keys": 2,
"widthName": 80,
"widthComment": 62,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1755664953679,
"createAt": 1755664858263
}
},
"9FYinSR3C6jDrEsRsCMpl": {
"id": "9FYinSR3C6jDrEsRsCMpl",
"tableId": "IsMoJXzvtuoOFFt93qS0w",
"name": "clientinfo_uid",
"comment": "고객정보",
"dataType": "INT",
"default": "",
"options": 0,
"ui": {
"keys": 2,
"widthName": 73,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1755665914148,
"createAt": 1755665105225
}
},
"q_IaRBb367b9mgGozh6jB": {
"id": "q_IaRBb367b9mgGozh6jB",
"tableId": "SEgsi7mbM-56Rsx5-qj8K",
"name": "clientinfo_uid",
"comment": "고객정보",
"dataType": "INT",
"default": "",
"options": 0,
"ui": {
"keys": 2,
"widthName": 73,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1755665190302,
"createAt": 1755665152928
}
},
"0DqzeiTdKUa6hunIDyuc4": {
"id": "0DqzeiTdKUa6hunIDyuc4",
"tableId": "IsMoJXzvtuoOFFt93qS0w",
"name": "previous_clientinfo_uid",
"comment": "고객정보",
"dataType": "INT",
"default": "",
"options": 0,
"ui": {
"keys": 0,
"widthName": 123,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1755665948597,
"createAt": 1755665921459
}
},
"_Ftnl1jfEidMZj7ag7w7v": {
"id": "_Ftnl1jfEidMZj7ag7w7v",
"tableId": "IsMoJXzvtuoOFFt93qS0w",
"name": "old_clientinfo_uid",
"comment": "전고객정보",
"dataType": "INT",
"default": "",
"options": 0,
"ui": {
"keys": 0,
"widthName": 95,
"widthComment": 62,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1755666058411,
"createAt": 1755665990924
}
},
"4sj8hIYAiLSSF89eeNXdQ": {
"id": "4sj8hIYAiLSSF89eeNXdQ",
"tableId": "ZLEpY5EjuZV21718zf-Y1",
"name": "old_clientinfo_uid",
"comment": "전고객정보",
"dataType": "INT",
"default": "",
"options": 0,
"ui": {
"keys": 2,
"widthName": 95,
"widthComment": 62,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1755666918277,
"createAt": 1755666739577
}
} }
}, },
"relationshipEntities": { "relationshipEntities": {
@ -13207,8 +13473,8 @@
"columnIds": [ "columnIds": [
"f7_MGvRjkwL1xkCWrAgDR" "f7_MGvRjkwL1xkCWrAgDR"
], ],
"x": 2025.7956, "x": 2072.5299,
"y": 1600.8948, "y": 1687.3125,
"direction": 2 "direction": 2
}, },
"meta": { "meta": {
@ -15251,8 +15517,8 @@
"columnIds": [ "columnIds": [
"l2g7xess8DY86_ZOm7Ca1" "l2g7xess8DY86_ZOm7Ca1"
], ],
"x": 2110.6117, "x": 2138.4598,
"y": 1934.3055, "y": 2046.3055,
"direction": 2 "direction": 2
}, },
"meta": { "meta": {
@ -15467,7 +15733,7 @@
"V6BuLrtFrGgCWaHSUkSLb" "V6BuLrtFrGgCWaHSUkSLb"
], ],
"x": 1229.3092000000001, "x": 1229.3092000000001,
"y": 905.4850333333333, "y": 887.1517,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -15495,7 +15761,7 @@
"V6BuLrtFrGgCWaHSUkSLb" "V6BuLrtFrGgCWaHSUkSLb"
], ],
"x": 1229.3092000000001, "x": 1229.3092000000001,
"y": 1052.1517, "y": 997.1517,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -15504,7 +15770,7 @@
"N-2m8O_JzS6-sDEcL5zTv" "N-2m8O_JzS6-sDEcL5zTv"
], ],
"x": 1526.2804, "x": 1526.2804,
"y": 1080.8582000000001, "y": 1031.8582000000001,
"direction": 1 "direction": 1
}, },
"meta": { "meta": {
@ -15523,7 +15789,7 @@
"nNWsAWbHfKWqx8EwxvuM1" "nNWsAWbHfKWqx8EwxvuM1"
], ],
"x": 2179.2804, "x": 2179.2804,
"y": 1184.8582000000001, "y": 1196.8582000000001,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -15578,8 +15844,8 @@
"columnIds": [ "columnIds": [
"RITMHZcQAJ7KvtxkTtMv-" "RITMHZcQAJ7KvtxkTtMv-"
], ],
"x": 740.179, "x": 800.9385,
"y": 1639.8541, "y": 1732.2588,
"direction": 1 "direction": 1
}, },
"end": { "end": {
@ -15587,8 +15853,8 @@
"columnIds": [ "columnIds": [
"wi1XbZM3emknh42sOMkYq" "wi1XbZM3emknh42sOMkYq"
], ],
"x": 601.893, "x": 591.9689,
"y": 1555.8934, "y": 1641.446166666667,
"direction": 2 "direction": 2
}, },
"meta": { "meta": {
@ -15606,8 +15872,8 @@
"columnIds": [ "columnIds": [
"RITMHZcQAJ7KvtxkTtMv-" "RITMHZcQAJ7KvtxkTtMv-"
], ],
"x": 740.179, "x": 800.9385,
"y": 1835.8541, "y": 1928.2588,
"direction": 1 "direction": 1
}, },
"end": { "end": {
@ -15615,8 +15881,8 @@
"columnIds": [ "columnIds": [
"GtBqjKsmtYWvsd0fckBc0" "GtBqjKsmtYWvsd0fckBc0"
], ],
"x": 621.9303, "x": 615.8039,
"y": 1884.3252, "y": 2060.105766666667,
"direction": 2 "direction": 2
}, },
"meta": { "meta": {
@ -15635,7 +15901,7 @@
"nNWsAWbHfKWqx8EwxvuM1" "nNWsAWbHfKWqx8EwxvuM1"
], ],
"x": 1526.2804, "x": 1526.2804,
"y": 1288.8582000000001, "y": 1251.8582000000001,
"direction": 1 "direction": 1
}, },
"end": { "end": {
@ -15643,9 +15909,9 @@
"columnIds": [ "columnIds": [
"4iRyOhmW3b7kbiZT8lQyY" "4iRyOhmW3b7kbiZT8lQyY"
], ],
"x": 1319.179, "x": 1235.1885,
"y": 1607.1874333333335, "y": 1634.2588,
"direction": 2 "direction": 4
}, },
"meta": { "meta": {
"updateAt": 1755653818593, "updateAt": 1755653818593,
@ -15662,7 +15928,7 @@
"columnIds": [ "columnIds": [
"V6BuLrtFrGgCWaHSUkSLb" "V6BuLrtFrGgCWaHSUkSLb"
], ],
"x": 962.8092, "x": 1140.4758666666667,
"y": 1272.1517, "y": 1272.1517,
"direction": 8 "direction": 8
}, },
@ -15671,8 +15937,8 @@
"columnIds": [ "columnIds": [
"JRdeV7n53lb1iSmmYnhHX" "JRdeV7n53lb1iSmmYnhHX"
], ],
"x": 1029.679, "x": 945.6885,
"y": 1541.8541, "y": 1634.2588,
"direction": 4 "direction": 4
}, },
"meta": { "meta": {
@ -15691,7 +15957,7 @@
"V6BuLrtFrGgCWaHSUkSLb" "V6BuLrtFrGgCWaHSUkSLb"
], ],
"x": 1229.3092000000001, "x": 1229.3092000000001,
"y": 1198.8183666666666, "y": 1107.1517,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -15699,8 +15965,8 @@
"columnIds": [ "columnIds": [
"60w6M5QqxGAvJa3EEMDbR" "60w6M5QqxGAvJa3EEMDbR"
], ],
"x": 1514.7956, "x": 1540.5299,
"y": 1520.8948, "y": 1572.6458333333335,
"direction": 1 "direction": 1
}, },
"meta": { "meta": {
@ -15718,8 +15984,8 @@
"columnIds": [ "columnIds": [
"RITMHZcQAJ7KvtxkTtMv-" "RITMHZcQAJ7KvtxkTtMv-"
], ],
"x": 1319.179, "x": 1379.9385,
"y": 1737.8541000000002, "y": 1732.2588,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -15727,8 +15993,8 @@
"columnIds": [ "columnIds": [
"QznZ6PY_T3OGj3YD4GdOX" "QznZ6PY_T3OGj3YD4GdOX"
], ],
"x": 1514.7956, "x": 1540.5299,
"y": 1680.8948, "y": 1801.979166666667,
"direction": 1 "direction": 1
}, },
"meta": { "meta": {
@ -15746,8 +16012,8 @@
"columnIds": [ "columnIds": [
"RITMHZcQAJ7KvtxkTtMv-" "RITMHZcQAJ7KvtxkTtMv-"
], ],
"x": 1319.179, "x": 1379.9385,
"y": 1868.520766666667, "y": 1928.2588,
"direction": 2 "direction": 2
}, },
"end": { "end": {
@ -15755,14 +16021,238 @@
"columnIds": [ "columnIds": [
"IbWdZlEEF70bGqUDkU5ub" "IbWdZlEEF70bGqUDkU5ub"
], ],
"x": 1515.6117, "x": 1543.4598,
"y": 1934.3055, "y": 2046.3055,
"direction": 1 "direction": 1
}, },
"meta": { "meta": {
"updateAt": 1755654048878, "updateAt": 1755654048878,
"createAt": 1755654048878 "createAt": 1755654048878
} }
},
"y4yqEjn054HMDyVTrysPw": {
"id": "y4yqEjn054HMDyVTrysPw",
"identification": false,
"relationshipType": 16,
"startRelationshipType": 1,
"start": {
"tableId": "B8haiEbPc1lRBWTv1g25G",
"columnIds": [
"nNWsAWbHfKWqx8EwxvuM1"
],
"x": 1689.5304,
"y": 1416.8582000000001,
"direction": 8
},
"end": {
"tableId": "ZLEpY5EjuZV21718zf-Y1",
"columnIds": [
"sJfMcwfDgXnsZ89DVVDA2"
],
"x": 1806.5299,
"y": 1515.3125,
"direction": 4
},
"meta": {
"updateAt": 1755664509604,
"createAt": 1755664509604
}
},
"YjcBb9KuGXDVq-G904P1k": {
"id": "YjcBb9KuGXDVq-G904P1k",
"identification": false,
"relationshipType": 16,
"startRelationshipType": 1,
"start": {
"tableId": "B8haiEbPc1lRBWTv1g25G",
"columnIds": [
"nNWsAWbHfKWqx8EwxvuM1"
],
"x": 1526.2804,
"y": 1141.8582000000001,
"direction": 1
},
"end": {
"tableId": "IsMoJXzvtuoOFFt93qS0w",
"columnIds": [
"E30sHnqJytLlBmfL7ueOG"
],
"x": 591.9689,
"y": 1460.1128333333336,
"direction": 2
},
"meta": {
"updateAt": 1755664567491,
"createAt": 1755664567491
}
},
"zprESM3XUJWWKC7ykd6bV": {
"id": "zprESM3XUJWWKC7ykd6bV",
"identification": false,
"relationshipType": 16,
"startRelationshipType": 1,
"start": {
"tableId": "B8haiEbPc1lRBWTv1g25G",
"columnIds": [
"nNWsAWbHfKWqx8EwxvuM1"
],
"x": 1526.2804,
"y": 1361.8582000000001,
"direction": 1
},
"end": {
"tableId": "SEgsi7mbM-56Rsx5-qj8K",
"columnIds": [
"7Tqt0jVOln16nire8AE2K"
],
"x": 615.8039,
"y": 1937.4391000000003,
"direction": 2
},
"meta": {
"updateAt": 1755664615534,
"createAt": 1755664615534
}
},
"xBEcgXJ9gdmBDCdg1kmTd": {
"id": "xBEcgXJ9gdmBDCdg1kmTd",
"identification": false,
"relationshipType": 16,
"startRelationshipType": 1,
"start": {
"tableId": "B8haiEbPc1lRBWTv1g25G",
"columnIds": [
"nNWsAWbHfKWqx8EwxvuM1"
],
"x": 2016.0304,
"y": 1416.8582000000001,
"direction": 8
},
"end": {
"tableId": "8GYAVBvZGaMFeq3QuXk_B",
"columnIds": [
"eu4eV0U7BRaP7Zk-oyBhV"
],
"x": 1840.9598,
"y": 1910.3055,
"direction": 4
},
"meta": {
"updateAt": 1755664858263,
"createAt": 1755664858263
}
},
"v69SOu4bJ3yPh0LPCs06I": {
"id": "v69SOu4bJ3yPh0LPCs06I",
"identification": false,
"relationshipType": 16,
"startRelationshipType": 1,
"start": {
"tableId": "6ajvOCaGuXU9pzV0Y9jEi",
"columnIds": [
"V6BuLrtFrGgCWaHSUkSLb"
],
"x": 785.1425333333333,
"y": 1272.1517,
"direction": 8
},
"end": {
"tableId": "IsMoJXzvtuoOFFt93qS0w",
"columnIds": [
"9FYinSR3C6jDrEsRsCMpl"
],
"x": 591.9689,
"y": 1550.7795000000003,
"direction": 2
},
"meta": {
"updateAt": 1755665105225,
"createAt": 1755665105225
}
},
"zEgsZkg-rIZbtF9AWri-c": {
"id": "zEgsZkg-rIZbtF9AWri-c",
"identification": false,
"relationshipType": 16,
"startRelationshipType": 1,
"start": {
"tableId": "6ajvOCaGuXU9pzV0Y9jEi",
"columnIds": [
"V6BuLrtFrGgCWaHSUkSLb"
],
"x": 962.8091999999999,
"y": 1272.1517,
"direction": 8
},
"end": {
"tableId": "SEgsi7mbM-56Rsx5-qj8K",
"columnIds": [
"q_IaRBb367b9mgGozh6jB"
],
"x": 615.8039,
"y": 1814.7724333333335,
"direction": 2
},
"meta": {
"updateAt": 1755665152928,
"createAt": 1755665152928
}
},
"wK9OV-2kUGVkPrUoQ37Jk": {
"id": "wK9OV-2kUGVkPrUoQ37Jk",
"identification": false,
"relationshipType": 16,
"startRelationshipType": 1,
"start": {
"tableId": "6ajvOCaGuXU9pzV0Y9jEi",
"columnIds": [
"V6BuLrtFrGgCWaHSUkSLb"
],
"x": 856.2092000000001,
"y": 1272.1517,
"direction": 8
},
"end": {
"tableId": "IsMoJXzvtuoOFFt93qS0w",
"columnIds": [
"_Ftnl1jfEidMZj7ag7w7v"
],
"x": 606.9689,
"y": 1599.7795,
"direction": 2
},
"meta": {
"updateAt": 1755665990925,
"createAt": 1755665990925
}
},
"wM3eezHxl6nAo_rtAeJ_s": {
"id": "wM3eezHxl6nAo_rtAeJ_s",
"identification": false,
"relationshipType": 16,
"startRelationshipType": 1,
"start": {
"tableId": "6ajvOCaGuXU9pzV0Y9jEi",
"columnIds": [
"V6BuLrtFrGgCWaHSUkSLb"
],
"x": 1229.3092000000001,
"y": 1217.1517,
"direction": 2
},
"end": {
"tableId": "ZLEpY5EjuZV21718zf-Y1",
"columnIds": [
"4sj8hIYAiLSSF89eeNXdQ"
],
"x": 1540.5299,
"y": 1687.3125000000002,
"direction": 1
},
"meta": {
"updateAt": 1755666739577,
"createAt": 1755666739577
}
} }
}, },
"indexEntities": {}, "indexEntities": {},

View File

@ -136,6 +136,8 @@ DROP TABLE IF EXISTS `csinfo`;
/*!40101 SET character_set_client = utf8 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `csinfo` ( CREATE TABLE `csinfo` (
`uid` int(11) NOT NULL AUTO_INCREMENT, `uid` int(11) NOT NULL AUTO_INCREMENT,
`clientinfo_uid` int(11) DEFAULT NULL COMMENT '고객정보',
`serviceinfo_uid` int(11) DEFAULT NULL COMMENT '서비스정보',
`serverinfo_uid` int(11) DEFAULT NULL COMMENT '서버정보', `serverinfo_uid` int(11) DEFAULT NULL COMMENT '서버정보',
`type` varchar(20) NOT NULL COMMENT '구분(KCS,VCS)', `type` varchar(20) NOT NULL COMMENT '구분(KCS,VCS)',
`ip` varchar(50) NOT NULL, `ip` varchar(50) NOT NULL,
@ -149,7 +151,11 @@ CREATE TABLE `csinfo` (
PRIMARY KEY (`uid`), PRIMARY KEY (`uid`),
UNIQUE KEY `UQ_ip` (`ip`), UNIQUE KEY `UQ_ip` (`ip`),
KEY `FK_serverinfo_TO_csinfo` (`serverinfo_uid`), KEY `FK_serverinfo_TO_csinfo` (`serverinfo_uid`),
CONSTRAINT `FK_serverinfo_TO_csinfo` FOREIGN KEY (`serverinfo_uid`) REFERENCES `serverinfo` (`uid`) KEY `FK_serviceinfo_TO_csinfo` (`serviceinfo_uid`),
KEY `FK_clientinfo_TO_csinfo` (`clientinfo_uid`),
CONSTRAINT `FK_clientinfo_TO_csinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`),
CONSTRAINT `FK_serverinfo_TO_csinfo` FOREIGN KEY (`serverinfo_uid`) REFERENCES `serverinfo` (`uid`),
CONSTRAINT `FK_serviceinfo_TO_csinfo` FOREIGN KEY (`serviceinfo_uid`) REFERENCES `serviceinfo` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='CS정보(한서버 여러개 앞단 등록가능)'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='CS정보(한서버 여러개 앞단 등록가능)';
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
@ -172,7 +178,9 @@ DROP TABLE IF EXISTS `ipinfo`;
CREATE TABLE `ipinfo` ( CREATE TABLE `ipinfo` (
`uid` int(11) NOT NULL AUTO_INCREMENT COMMENT 'IP정보', `uid` int(11) NOT NULL AUTO_INCREMENT COMMENT 'IP정보',
`lineinfo_uid` int(11) NOT NULL COMMENT '회선정보', `lineinfo_uid` int(11) NOT NULL COMMENT '회선정보',
`old_clientinfo_uid` int(11) DEFAULT NULL COMMENT '전고객정보',
`clientinfo_uid` int(11) DEFAULT NULL COMMENT '고객정보', `clientinfo_uid` int(11) DEFAULT NULL COMMENT '고객정보',
`serviceinfo_uid` int(11) DEFAULT NULL COMMENT '서비스정보',
`serverinfo_uid` int(11) DEFAULT NULL COMMENT '서버정보', `serverinfo_uid` int(11) DEFAULT NULL COMMENT '서버정보',
`ip` char(16) NOT NULL, `ip` char(16) NOT NULL,
`price` int(11) NOT NULL DEFAULT 0 COMMENT '기본금액', `price` int(11) NOT NULL DEFAULT 0 COMMENT '기본금액',
@ -186,9 +194,13 @@ CREATE TABLE `ipinfo` (
KEY `FK_lineinfo_TO_ipinfo` (`lineinfo_uid`), KEY `FK_lineinfo_TO_ipinfo` (`lineinfo_uid`),
KEY `FK_clientinfo_TO_ipinfo` (`clientinfo_uid`), KEY `FK_clientinfo_TO_ipinfo` (`clientinfo_uid`),
KEY `FK_serverinfo_TO_ipinfo` (`serverinfo_uid`), KEY `FK_serverinfo_TO_ipinfo` (`serverinfo_uid`),
KEY `FK_serviceinfo_TO_ipinfo` (`serviceinfo_uid`),
KEY `FK_clientinfo_TO_ipinfo1` (`old_clientinfo_uid`),
CONSTRAINT `FK_clientinfo_TO_ipinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`), CONSTRAINT `FK_clientinfo_TO_ipinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`),
CONSTRAINT `FK_clientinfo_TO_ipinfo1` FOREIGN KEY (`old_clientinfo_uid`) REFERENCES `clientinfo` (`uid`),
CONSTRAINT `FK_lineinfo_TO_ipinfo` FOREIGN KEY (`lineinfo_uid`) REFERENCES `lineinfo` (`uid`), CONSTRAINT `FK_lineinfo_TO_ipinfo` FOREIGN KEY (`lineinfo_uid`) REFERENCES `lineinfo` (`uid`),
CONSTRAINT `FK_serverinfo_TO_ipinfo` FOREIGN KEY (`serverinfo_uid`) REFERENCES `serverinfo` (`uid`) CONSTRAINT `FK_serverinfo_TO_ipinfo` FOREIGN KEY (`serverinfo_uid`) REFERENCES `serverinfo` (`uid`),
CONSTRAINT `FK_serviceinfo_TO_ipinfo` FOREIGN KEY (`serviceinfo_uid`) REFERENCES `serviceinfo` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT=' IP정보'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT=' IP정보';
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
@ -386,8 +398,9 @@ DROP TABLE IF EXISTS `serverinfo_partinfo`;
/*!40101 SET character_set_client = utf8 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `serverinfo_partinfo` ( CREATE TABLE `serverinfo_partinfo` (
`uid` int(11) NOT NULL AUTO_INCREMENT, `uid` int(11) NOT NULL AUTO_INCREMENT,
`serverinfo_uid` int(11) NOT NULL COMMENT '서버정보',
`partinfo_uid` int(11) NOT NULL COMMENT 'PART정보', `partinfo_uid` int(11) NOT NULL COMMENT 'PART정보',
`serverinfo_uid` int(11) NOT NULL COMMENT '서버정보',
`serviceinfo_uid` int(11) DEFAULT NULL COMMENT '서비스정보',
`billing_method` varchar(20) NOT NULL COMMENT '청구방법(month,onetime)', `billing_method` varchar(20) NOT NULL COMMENT '청구방법(month,onetime)',
`cnt` tinyint(4) NOT NULL DEFAULT 1 COMMENT '갯수', `cnt` tinyint(4) NOT NULL DEFAULT 1 COMMENT '갯수',
`extra` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '추가정보(RAID등)', `extra` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '추가정보(RAID등)',
@ -396,8 +409,10 @@ CREATE TABLE `serverinfo_partinfo` (
PRIMARY KEY (`uid`), PRIMARY KEY (`uid`),
KEY `FK_partinfo_TO_serverinfo_partinfo` (`partinfo_uid`), KEY `FK_partinfo_TO_serverinfo_partinfo` (`partinfo_uid`),
KEY `FK_serverinfo_TO_serverinfo_partinfo` (`serverinfo_uid`), KEY `FK_serverinfo_TO_serverinfo_partinfo` (`serverinfo_uid`),
KEY `FK_serviceinfo_TO_serverinfo_partinfo` (`serviceinfo_uid`),
CONSTRAINT `FK_partinfo_TO_serverinfo_partinfo` FOREIGN KEY (`partinfo_uid`) REFERENCES `partinfo` (`uid`), CONSTRAINT `FK_partinfo_TO_serverinfo_partinfo` FOREIGN KEY (`partinfo_uid`) REFERENCES `partinfo` (`uid`),
CONSTRAINT `FK_serverinfo_TO_serverinfo_partinfo` FOREIGN KEY (`serverinfo_uid`) REFERENCES `serverinfo` (`uid`) CONSTRAINT `FK_serverinfo_TO_serverinfo_partinfo` FOREIGN KEY (`serverinfo_uid`) REFERENCES `serverinfo` (`uid`),
CONSTRAINT `FK_serviceinfo_TO_serverinfo_partinfo` FOREIGN KEY (`serviceinfo_uid`) REFERENCES `serviceinfo` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='서버정보_part정보(CASECADE)'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='서버정보_part정보(CASECADE)';
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
@ -422,6 +437,7 @@ CREATE TABLE `serviceinfo` (
`user_uid` int(11) NOT NULL COMMENT '관리자정보', `user_uid` int(11) NOT NULL COMMENT '관리자정보',
`clientinfo_uid` int(11) NOT NULL COMMENT '고객정보', `clientinfo_uid` int(11) NOT NULL COMMENT '고객정보',
`code` varchar(20) NOT NULL COMMENT '서비스코드', `code` varchar(20) NOT NULL COMMENT '서비스코드',
`site` varchar(20) NOT NULL DEFAULT 'prime' COMMENT 'Site구분',
`type` varchar(20) NOT NULL COMMENT '서비스형식((일반, 자사,코로케이션 등)', `type` varchar(20) NOT NULL COMMENT '서비스형식((일반, 자사,코로케이션 등)',
`location` varchar(20) DEFAULT NULL COMMENT '지역코드(chiba,tokyo,3center등)', `location` varchar(20) DEFAULT NULL COMMENT '지역코드(chiba,tokyo,3center등)',
`billing_at` date NOT NULL COMMENT '청구일', `billing_at` date NOT NULL COMMENT '청구일',
@ -460,6 +476,8 @@ DROP TABLE IF EXISTS `switchinfo`;
/*!40101 SET character_set_client = utf8 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `switchinfo` ( CREATE TABLE `switchinfo` (
`uid` int(11) NOT NULL AUTO_INCREMENT COMMENT '스위치정보', `uid` int(11) NOT NULL AUTO_INCREMENT COMMENT '스위치정보',
`clientinfo_uid` int(11) DEFAULT NULL COMMENT '고객정보',
`serviceinfo_uid` int(11) DEFAULT NULL COMMENT '서비스정보',
`serverinfo_uid` int(11) DEFAULT NULL COMMENT '서버정보', `serverinfo_uid` int(11) DEFAULT NULL COMMENT '서버정보',
`code` varchar(20) NOT NULL COMMENT 'switch코드', `code` varchar(20) NOT NULL COMMENT 'switch코드',
`status` varchar(20) NOT NULL DEFAULT 'available', `status` varchar(20) NOT NULL DEFAULT 'available',
@ -469,7 +487,11 @@ CREATE TABLE `switchinfo` (
PRIMARY KEY (`uid`), PRIMARY KEY (`uid`),
UNIQUE KEY `UQ_code` (`code`), UNIQUE KEY `UQ_code` (`code`),
KEY `FK_serverinfo_TO_switchinfo` (`serverinfo_uid`), KEY `FK_serverinfo_TO_switchinfo` (`serverinfo_uid`),
CONSTRAINT `FK_serverinfo_TO_switchinfo` FOREIGN KEY (`serverinfo_uid`) REFERENCES `serverinfo` (`uid`) KEY `FK_serviceinfo_TO_switchinfo` (`serviceinfo_uid`),
KEY `FK_clientinfo_TO_switchinfo` (`clientinfo_uid`),
CONSTRAINT `FK_clientinfo_TO_switchinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`),
CONSTRAINT `FK_serverinfo_TO_switchinfo` FOREIGN KEY (`serverinfo_uid`) REFERENCES `serverinfo` (`uid`),
CONSTRAINT `FK_serviceinfo_TO_switchinfo` FOREIGN KEY (`serviceinfo_uid`) REFERENCES `serviceinfo` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='스위치정보'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='스위치정보';
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
@ -557,4 +579,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2025-08-20 11:20:06 -- Dump completed on 2025-08-20 14:16:06

File diff suppressed because one or more lines are too long

View File

@ -256,9 +256,13 @@ class CommonHelper
$form = $this->form_dropdown_disabled($field, $value, $viewDatas['control']['filter_optons'][$field], $extras); $form = $this->form_dropdown_disabled($field, $value, $viewDatas['control']['filter_optons'][$field], $extras);
} }
break; break;
case 'issue_at':
case 'expired_at': case 'expired_at':
case 'billing_at': case 'billing_at':
case 'start_at': case 'start_at':
case 'end_at':
case 'manufactur_at':
case 'format_at':
case 'updated_at': case 'updated_at':
case 'created_at': case 'created_at':
$extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' calender' : 'calender'; $extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' calender' : 'calender';
@ -266,11 +270,15 @@ class CommonHelper
break; break;
case 'description': case 'description':
case 'content': case 'content':
case 'history':
$extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' tinymce' : 'tinymce'; $extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' tinymce' : 'tinymce';
$form = form_textarea($field, $value ?? "", ['id' => $field, ...$extras]); $form = form_textarea($field, $value ?? "", ['id' => $field, ...$extras]);
break; break;
case 'clientinfo_uid':
case 'user_uid': case 'user_uid':
case 'old_clientinfo_uid':
case 'clientinfo_uid':
case 'serviceinfo_uid':
case 'serverinfo_uid':
$extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' select-field' : 'select-field'; $extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' select-field' : 'select-field';
$form = $this->form_dropdown_disabled($field, $value, $viewDatas['control']['filter_optons'][$field], $extras); $form = $this->form_dropdown_disabled($field, $value, $viewDatas['control']['filter_optons'][$field], $extras);
break; break;
@ -298,8 +306,8 @@ class CommonHelper
} }
$value = implode(" , ", $roles); $value = implode(" , ", $roles);
break; break;
case 'updated_at':
case 'created_at': case 'created_at':
case 'updated_at':
case 'deleted_at': case 'deleted_at':
$value = $value ? date("Y-m-d", strtotime($value)) : ""; $value = $value ? date("Y-m-d", strtotime($value)) : "";
break; break;

View File

@ -2,11 +2,14 @@
return [ return [
'title' => "고객예치금", 'title' => "고객예치금",
'label' => [ 'label' => [
'user_uid' => "관리자",
'clientinfo_uid' => "고객명", 'clientinfo_uid' => "고객명",
'bank' => "은행",
'title' => "제목", 'title' => "제목",
'alias' => "입/출금자명", 'alias' => "입/출금자명",
'amount' => "금액", 'amount' => "금액",
'status' => "입/출금", 'status' => "상태",
'issue_at' => "수정일",
'updated_at' => "수정일", 'updated_at' => "수정일",
'created_at' => "작성일", 'created_at' => "작성일",
'deleted_at' => "삭제일", 'deleted_at' => "삭제일",

View File

@ -4,7 +4,7 @@ return [
'label' => [ 'label' => [
'user_uid' => "관리자UID", 'user_uid' => "관리자UID",
'code' => "고객코드", 'code' => "고객코드",
'site' => "구분", 'site' => "사이트",
'email' => "메일", 'email' => "메일",
'phone' => "연락처", 'phone' => "연락처",
'role' => "권한", 'role' => "권한",

View File

@ -5,6 +5,7 @@ return [
'user_uid' => "관리자", 'user_uid' => "관리자",
'clientinfo_uid' => "고객", 'clientinfo_uid' => "고객",
'serviceinfo_uid' => "서비스", 'serviceinfo_uid' => "서비스",
'title' => "청구항목",
'amount' => "청구금액", 'amount' => "청구금액",
'billing_method' => "청구방법", 'billing_method' => "청구방법",
'billing_at' => "지급기한일", 'billing_at' => "지급기한일",

View File

@ -5,10 +5,12 @@ return [
'user_uid' => "관리자", 'user_uid' => "관리자",
'clientinfo_uid' => "고객", 'clientinfo_uid' => "고객",
'serverinfo_uid' => "서버", 'serverinfo_uid' => "서버",
'type' => "서비스형식", 'site' => "사이트",
'code' => "코드",
'type' => "형식",
'location' => "위치", 'location' => "위치",
'billing_at' => "결제일", 'billing_at' => "결제일",
'amount' => "서비스금액", 'amount' => "금액",
'start_at' => "시작일", 'start_at' => "시작일",
'end_at' => "해지일", 'end_at' => "해지일",
'history' => "사용이력", 'history' => "사용이력",
@ -17,6 +19,11 @@ return [
'created_at' => "신청일", 'created_at' => "신청일",
'deleted_at' => "삭제일", 'deleted_at' => "삭제일",
], ],
"SITE" => [
"prime" => "PRIME",
"itsolution" => "ITSOLUTION",
"gdidc" => "GDIDC",
],
"LOCATION" => [ "LOCATION" => [
"chiba" => "치바", "chiba" => "치바",
"tokyo" => "도쿄", "tokyo" => "도쿄",

View File

@ -2,6 +2,10 @@
return [ return [
'title' => "CS(VPN)정보", 'title' => "CS(VPN)정보",
'label' => [ 'label' => [
'' => "서버",
'clientinfo_uid' => "고객",
'serviceinfo_uid' => "서비스",
'serverinfo_uid' => "서버",
'type' => "종류", 'type' => "종류",
'ip' => "IP", 'ip' => "IP",
'accountid' => "계정ID", 'accountid' => "계정ID",

View File

@ -3,7 +3,8 @@ return [
'title' => "IP정보", 'title' => "IP정보",
'label' => [ 'label' => [
'lineinfo_uid' => '회선정보', 'lineinfo_uid' => '회선정보',
'clientinfo_uid' => '(이전)고객정보', 'old_clientinfo_uid' => "전고객",
'clientinfo_uid' => '고객정보',
'serverinfo_uid' => '서버정보', 'serverinfo_uid' => '서버정보',
'ip' => "IP", 'ip' => "IP",
'price' => "소비자금액", 'price' => "소비자금액",

View File

@ -5,12 +5,12 @@ return [
'clientinfo_uid' => "고객번호", 'clientinfo_uid' => "고객번호",
'serviceinfo_uid' => "서비스번호", 'serviceinfo_uid' => "서비스번호",
'code' => "장비번호", 'code' => "장비번호",
'type' => "장비종류", 'type' => "장비벤더",
'title' => "장비명", 'title' => "장비명",
'price' => "기본금액", 'price' => "기본금액",
'total_price' => "최종금액", 'total_price' => "최종금액",
'manufactur_at' => "입고일", 'manufactur_at' => "입고일",
'format_at' => "포맷보", 'format_at' => "포맷보류일",
'status' => "상태", 'status' => "상태",
'updated_at' => "수정일", 'updated_at' => "수정일",
'created_at' => "작성일", 'created_at' => "작성일",

View File

@ -3,6 +3,9 @@ return [
'title' => "Switch정보", 'title' => "Switch정보",
'label' => [ 'label' => [
'code' => "코드", 'code' => "코드",
'clientinfo_uid' => "고객",
'serviceinfo_uid' => "서비스",
'serverinfo_uid' => "서버",
'status' => "사용여부", 'status' => "사용여부",
'updated_at' => "수정일", 'updated_at' => "수정일",
'created_at' => "작성일", 'created_at' => "작성일",

View File

@ -16,7 +16,7 @@ class ClientProcess implements MigrationProcessInterface
{ {
$temps = []; $temps = [];
$temps['site'] = 'prime'; $temps['site'] = 'prime';
$temps['code'] = $row['Client_Code']; $temps['code'] = 'PI' . $row['Client_Code'];
$temps['user_uid'] = 1; $temps['user_uid'] = 1;
$temps['role'] = $row['Client_Reseller'] == 30 ? "reseller" : "user"; $temps['role'] = $row['Client_Reseller'] == 30 ? "reseller" : "user";
$temps['name'] = $row['Client_Name']; $temps['name'] = $row['Client_Name'];

View File

@ -14,8 +14,8 @@ class SwitchCodeProcess implements MigrationProcessInterface
} }
public function process(array $row, int $cnt): void public function process(array $row, int $cnt): void
{ {
if (empty($row['service_sw']) || strlen($row['service_sw']) <= 4 || $row['service_sw'] === '1회성 장비') { if (!preg_match('/^C ?\d{2}PA\d{2}$/', $row['service_sw'])) {
echo "{$cnt} -> SKIP SWITCHCODE\n"; echo "{$cnt} {$row['service_sw']}-> SKIP SWITCHCODE\n";
return; return;
} }
$temps = []; $temps = [];

View File

@ -98,10 +98,10 @@ abstract class CommonModel extends Model
case "updated_at": case "updated_at":
case "created_at": case "created_at":
case "deleted_at": case "deleted_at":
$rule = "if_exist|valid_date"; $rule = "permit_empty|valid_date";
break; break;
default: default:
$rule = "if_exist|trim|string"; $rule = "permit_empty|trim|string";
break; break;
} }
return $rule; return $rule;
@ -109,10 +109,14 @@ abstract class CommonModel extends Model
// create, modify 직전 작업용 작업 // create, modify 직전 작업용 작업
protected function convert_process(string $action, string $field, array $formDatas): mixed protected function convert_process(string $action, string $field, array $formDatas): mixed
{ {
$convertedData = null;
// 필드 값 존재 여부 확인
$hasValue = array_key_exists($field, $formDatas);
$value = $hasValue ? $formDatas[$field] : null;
switch ($field) { switch ($field) {
case $this->getPKField(): case $this->getPKField():
// $formDatas에 전달된 값이 없는 경우 // PK 값이 없으면 UUID-like 값 생성
if (!array_key_exists($field, $formDatas)) { if (!$hasValue || empty($value)) {
$randomBytes = bin2hex(random_bytes(32)); $randomBytes = bin2hex(random_bytes(32));
$convertedData = sprintf( $convertedData = sprintf(
'%08s-%04s-%04x-%04x-%12s', '%08s-%04s-%04x-%04x-%12s',
@ -122,16 +126,40 @@ abstract class CommonModel extends Model
substr($randomBytes, 16, 4), substr($randomBytes, 16, 4),
substr($randomBytes, 20, 12) substr($randomBytes, 20, 12)
); );
} else {
$convertedData = $value;
} }
break; break;
case "editor": // content 등 textarea를 사용한 Field case "editor":
case "detail": //content등 textarea를 사용한 Field case "detail":
case "content": // content 등 textarea를 사용한 Field case "content":
case "discription": // content 등 textarea를 사용한 Field case "discription":
$convertedData = htmlentities($formDatas[$field], ENT_QUOTES); case "history":
// textarea 계열은 XSS 방지
if ($value === '' || $value === null) {
$convertedData = null; // 기본적으로 null
} elseif ($value === ' ') {
$convertedData = ''; // 공백 하나 → 의도적인 빈칸 저장
} else {
$convertedData = htmlentities($value, ENT_QUOTES, 'UTF-8');
}
break; break;
default: default:
$convertedData = $formDatas[$field]; if ($value === '' || $value === null) {
if ($action === 'insert') {
// INSERT → unset 해서 DB default 사용
return null;
}
if ($action === 'update') {
// UPDATE → 기본은 null 처리
$convertedData = null;
}
} elseif ($value === ' ') {
// 공백 하나 → 빈칸으로 저장
$convertedData = '';
} else {
$convertedData = $value;
}
break; break;
} }
return $convertedData; return $convertedData;

View File

@ -13,12 +13,14 @@ class AccountModel extends CustomerModel
protected $primaryKey = self::PK; protected $primaryKey = self::PK;
protected $returnType = AccountEntity::class; protected $returnType = AccountEntity::class;
protected $allowedFields = [ protected $allowedFields = [
"user_uid",
"clientinfo_uid", "clientinfo_uid",
"status", "bank",
"alias",
"title", "title",
"alias",
"issue_at",
"amount", "amount",
"updated_at" "status",
]; ];
public function __construct() public function __construct()
{ {
@ -30,15 +32,20 @@ class AccountModel extends CustomerModel
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true)); throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
} }
switch ($field) { switch ($field) {
case "user_uid":
case "clientinfo_uid": case "clientinfo_uid":
case "amount": case "amount":
$rule = "required|numeric"; $rule = "required|numeric";
break; break;
case "bank":
case "title": case "title":
case "alias": case "alias":
case "status": case "status":
$rule = "required|trim|string"; $rule = "required|trim|string";
break; break;
case "issue_at":
$rule = "required|valid_date";
break;
default: default:
$rule = parent::getFormFieldRule($action, $field); $rule = parent::getFormFieldRule($action, $field);
break; break;

View File

@ -15,17 +15,17 @@ class ClientModel extends CustomerModel
protected $returnType = ClientEntity::class; protected $returnType = ClientEntity::class;
protected $allowedFields = [ protected $allowedFields = [
"user_uid", "user_uid",
"site",
"code", "code",
"name", "site",
"email",
"phone",
"role", "role",
"name",
"phone",
"email",
"history",
"account_balance", "account_balance",
"coupon_balance", "coupon_balance",
"point_balance", "point_balance",
"status", "status"
"updated_at"
]; ];
public function __construct() public function __construct()
{ {
@ -38,11 +38,7 @@ class ClientModel extends CustomerModel
} }
switch ($field) { switch ($field) {
case "user_uid": case "user_uid":
$rule = "required|numeric"; $rule = "required|numeric";
break;
case "code":
$rule = "required|trim|alpha_numeric|min_length[4]|max_length[20]";
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
break; break;
case "name": case "name":
$rule = "required|trim|string"; $rule = "required|trim|string";
@ -53,12 +49,16 @@ class ClientModel extends CustomerModel
$rule = "required|trim|string"; $rule = "required|trim|string";
break; break;
case "email": case "email":
$rule = "if_exist|trim|valid_email"; $rule = "permit_empty|trim|valid_email";
break;
case "phone":
case "history":
$rule = "permit_empty|trim|string";
break; break;
case "account_balance": case "account_balance":
case "coupon_balance": case "coupon_balance":
case "point_balance": case "point_balance":
$rule = "if_exist|numeric"; $rule = "permit_empty|numeric";
break; break;
default: default:
$rule = parent::getFormFieldRule($action, $field); $rule = parent::getFormFieldRule($action, $field);

View File

@ -13,11 +13,11 @@ class CouponModel extends CustomerModel
protected $primaryKey = self::PK; protected $primaryKey = self::PK;
protected $returnType = CouponEntity::class; protected $returnType = CouponEntity::class;
protected $allowedFields = [ protected $allowedFields = [
"user_uid",
"clientinfo_uid", "clientinfo_uid",
"status",
"title", "title",
"amount", "cnt",
"updated_at" "status",
]; ];
public function __construct() public function __construct()
{ {
@ -29,8 +29,9 @@ class CouponModel extends CustomerModel
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true)); throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
} }
switch ($field) { switch ($field) {
case "user_uid":
case "clientinfo_uid": case "clientinfo_uid":
case "amount": case "cnt":
$rule = "required|numeric"; $rule = "required|numeric";
break; break;
case "title": case "title":

View File

@ -12,4 +12,36 @@ abstract class CustomerModel extends CommonModel
{ {
parent::__construct(); parent::__construct();
} }
public function getFormFieldRule(string $action, string $field): string
{
if (is_array($field)) {
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
}
switch ($field) {
case "user_uid":
$rule = "required|numeric";
break;
case "clientinfo_uid":
case "serviceinfo_uid":
case "serverinfo_uid":
$rule = "permit_empty|trim|numeric";
break;
case "title":
$rule = "required|trim|string";
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[" . $this->getTable() . "." . $field . "]" : "";
break;
case "code":
$rule = "required|trim|alpha_numeric|min_length[4]|max_length[20]";
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[" . $this->getTable() . "." . $field . "]" : "";
break;
case "status":
$rule = "permit_empty|trim|string";
break;
default:
$rule = parent::getFormFieldRule($action, $field);
break;
}
return $rule;
}
} }

View File

@ -22,8 +22,7 @@ class PaymentModel extends CustomerModel
"billing_method", "billing_method",
"billing_at", "billing_at",
"pay_method", "pay_method",
"status", "status"
"updated_at"
]; ];
public function __construct() public function __construct()
{ {
@ -36,21 +35,21 @@ class PaymentModel extends CustomerModel
} }
switch ($field) { switch ($field) {
case "user_uid": case "user_uid":
case "clientinfo_uid":
case "serviceinfo_uid":
case "amount": case "amount":
$rule = "required|numeric"; $rule = "required|numeric";
break; break;
case "title": case "title":
case "billing_method": case "billing_method":
case "clientinfo_uid": case "status":
case "serviceinfo_uid":
$rule = "required|trim|string"; $rule = "required|trim|string";
break; break;
case "billing_at": case "billing_at":
$rule = "required|valid_date"; $rule = "required|valid_date";
break; break;
case "pay_method": case "pay_method":
case "status": $rule = "permit_empty|trim|string";
$rule = "if_exist|trim|string";
break; break;
default: default:
$rule = parent::getFormFieldRule($action, $field); $rule = parent::getFormFieldRule($action, $field);
@ -58,4 +57,25 @@ class PaymentModel extends CustomerModel
} }
return $rule; return $rule;
} }
/**
* 서비스(고객) 미납결제정보
* @param array<string> checkDate = 'now' , '-1 day' , '-2 day'
* @return array<string, array<string,int>>
* [serviceinfo_uid => count], [clientinfo_uid => count]
*/
final public function getUnPaidCount(string $checkDate = 'now', string $idx_field = "serviceinfo_uid"): array
{
// strtotime 기준으로 날짜 계산
$dateTime = date('Y-m-d H:i:s', strtotime($checkDate));
$rows = $this->asArray()
->select("{$idx_field}, COUNT(*) as cnt")
->where('billing_at <', $dateTime)
->where('amount >', 0)
->where('status', PaymentEntity::STATUS_UNPAID)
->groupBy($idx_field)
->findAll();
//array_column($rows, 'cnt', 'serviceinfo_uid')는 serviceinfo_uid를 키로 하고 cnt를 값으로 하는 연관 배열을 생성합니다.
return array_column($rows, 'cnt', $idx_field);
}
} }

View File

@ -13,11 +13,11 @@ class PointModel extends CustomerModel
protected $primaryKey = self::PK; protected $primaryKey = self::PK;
protected $returnType = PointEntity::class; protected $returnType = PointEntity::class;
protected $allowedFields = [ protected $allowedFields = [
"user_uid",
"clientinfo_uid", "clientinfo_uid",
"status",
"title", "title",
"amount", "amount",
"updated_at" "status",
]; ];
public function __construct() public function __construct()
{ {
@ -29,6 +29,7 @@ class PointModel extends CustomerModel
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true)); throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
} }
switch ($field) { switch ($field) {
case "user_uid":
case "clientinfo_uid": case "clientinfo_uid":
case "amount": case "amount":
$rule = "required|numeric"; $rule = "required|numeric";

View File

@ -18,12 +18,14 @@ class ServiceModel extends CustomerModel
"user_uid", "user_uid",
"clientinfo_uid", "clientinfo_uid",
"code", "code",
"site",
"type", "type",
"location", "location",
"billing_at", "billing_at",
"amount", "amount",
"start_at", "start_at",
"end_at", "end_at",
"history",
"status", "status",
]; ];
public function __construct() public function __construct()
@ -36,15 +38,12 @@ class ServiceModel extends CustomerModel
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true)); throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
} }
switch ($field) { switch ($field) {
case "code":
$rule = "required|trim|alpha_numeric|min_length[4]|max_length[20]";
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
break;
case "user_uid": case "user_uid":
case "clientinfo_uid": case "clientinfo_uid":
case "amount": case "amount":
$rule = "required|numeric"; $rule = "required|numeric";
break; break;
case "site":
case "type": case "type":
case "location": case "location":
case "status": case "status":
@ -55,7 +54,10 @@ class ServiceModel extends CustomerModel
$rule = "required|valid_date"; $rule = "required|valid_date";
break; break;
case "end_at": case "end_at":
$rule = "if_exist|valid_date"; $rule = "permit_empty|valid_date";
break;
case "history":
$rule = "permit_empty|trim|string";
break; break;
default: default:
$rule = parent::getFormFieldRule($action, $field); $rule = parent::getFormFieldRule($action, $field);

View File

@ -13,6 +13,9 @@ class CSModel extends EquipmentModel
protected $primaryKey = self::PK; protected $primaryKey = self::PK;
protected $returnType = CSEntity::class; protected $returnType = CSEntity::class;
protected $allowedFields = [ protected $allowedFields = [
"clientinfo_uid",
"serviceinfo_uid",
"serverinfo_uid",
"type", "type",
"ip", "ip",
"accountid", "accountid",
@ -35,13 +38,11 @@ class CSModel extends EquipmentModel
break; break;
case "ip": case "ip":
$rule = "required|trim|valid_ip[both]"; //ipv4 , ipv6 , both(ipv4,ipv6) $rule = "required|trim|valid_ip[both]"; //ipv4 , ipv6 , both(ipv4,ipv6)
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : ""; $rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[" . $this->getTable() . "." . $field . "]" : "";
break;
case "price":
$rule = "required|numeric";
break; break;
case "accountid":
case "domain": case "domain":
$rule = "if_exist|trim|string"; $rule = "permit_empty|trim|string";
break; break;
default: default:
$rule = parent::getFormFieldRule($action, $field); $rule = parent::getFormFieldRule($action, $field);

View File

@ -10,4 +10,36 @@ abstract class EquipmentModel extends CommonModel
{ {
parent::__construct(); parent::__construct();
} }
public function getFormFieldRule(string $action, string $field): string
{
if (is_array($field)) {
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
}
switch ($field) {
case "title":
$rule = "required|trim|string";
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[" . $this->getTable() . "." . $field . "]" : "";
break;
case "code":
$rule = "required|trim|alpha_numeric|min_length[4]|max_length[20]";
$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":
$rule = "required|numeric";
break;
case "status":
$rule = "permit_empty|trim|string";
break;
default:
$rule = parent::getFormFieldRule($action, $field);
break;
}
return $rule;
}
} }

View File

@ -14,14 +14,13 @@ class IpModel extends EquipmentModel
protected $returnType = IpEntity::class; protected $returnType = IpEntity::class;
protected $allowedFields = [ protected $allowedFields = [
"lineinfo_uid", "lineinfo_uid",
"old_clientinfo_uid",
"clientinfo_uid", "clientinfo_uid",
"serviceinfo_uid",
"serverinfo_uid", "serverinfo_uid",
"ip", "ip",
"price", "price",
"amount",
"history",
"status", "status",
"updated_at"
]; ];
public function __construct() public function __construct()
{ {
@ -34,21 +33,19 @@ class IpModel extends EquipmentModel
} }
switch ($field) { switch ($field) {
case "lineinfo_uid": case "lineinfo_uid":
case "price":
$rule = "required|numeric"; $rule = "required|numeric";
break; break;
case "clientinfo_uid": case "old_clientinfo_uid":
case "serverinfo_uid": $rule = "permit_empty|numeric";
case "history": break;
$rule = "if_exist|trim|string"; case "status":
$rule = "permit_empty|trim|string";
break; break;
case "ip": case "ip":
$rule = "required|trim|valid_ip[both]"; //ipv4 , ipv6 , both(ipv4,ipv6) $rule = "required|trim|valid_ip[both]"; //ipv4 , ipv6 , both(ipv4,ipv6)
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : ""; $rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
break; break;
case "price":
case "amount":
$rule = "if_exist|numeric";
break;
default: default:
$rule = parent::getFormFieldRule($action, $field); $rule = parent::getFormFieldRule($action, $field);
break; break;

View File

@ -19,7 +19,6 @@ class LineModel extends EquipmentModel
"start_at", "start_at",
"end_at", "end_at",
"status", "status",
"updated_at"
]; ];
public function __construct() public function __construct()
{ {
@ -31,17 +30,14 @@ class LineModel extends EquipmentModel
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true)); throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
} }
switch ($field) { switch ($field) {
case "price":
$rule = "required|numeric";
break;
case "title":
$rule = "required|trim|string";
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
break;
case "bandwith": case "bandwith":
case "type": case "type":
$rule = "required|trim|string"; $rule = "required|trim|string";
break; break;
case "start_at":
case "end_at":
$rule = "permit_empty|valid_date";
break;
default: default:
$rule = parent::getFormFieldRule($action, $field); $rule = parent::getFormFieldRule($action, $field);
break; break;

View File

@ -28,10 +28,6 @@ class PartModel extends EquipmentModel
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true)); throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
} }
switch ($field) { switch ($field) {
case "title":
$rule = "required|trim|string";
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
break;
case "type": case "type":
case "status": case "status":
$rule = "required|trim|string"; $rule = "required|trim|string";

View File

@ -20,6 +20,7 @@ class ServerModel extends EquipmentModel
"type", "type",
"title", "title",
"price", "price",
"total_price",
"manufactur_at", "manufactur_at",
"format_at", "format_at",
"status", "status",
@ -34,26 +35,21 @@ class ServerModel extends EquipmentModel
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true)); throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
} }
switch ($field) { switch ($field) {
case "code": case "serviceinfo_uid":
$rule = "required|trim|alpha_numeric|min_length[4]|max_length[20]"; $rule = "required|trim|string";
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
break; break;
case "type": case "type":
case "status": case "status":
$rule = "required|trim|string"; $rule = "required|trim|string";
break; break;
case "title": case "total_price":
$rule = "required|trim|string"; $rule = "permit_empty|numeric";
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
break;
case "price":
$rule = "required|numeric";
break; break;
case "manufactur_at": case "manufactur_at":
$rule = "required|valid_date"; $rule = "required|valid_date";
break; break;
case "format_at": case "format_at":
$rule = "if_exist|valid_date"; $rule = "permit_empty|valid_date";
break; break;
default: default:
$rule = parent::getFormFieldRule($action, $field); $rule = parent::getFormFieldRule($action, $field);

View File

@ -14,8 +14,10 @@ class SwitchModel extends EquipmentModel
// protected $useAutoIncrement = false; // protected $useAutoIncrement = false;
protected $returnType = SwitchEntity::class; protected $returnType = SwitchEntity::class;
protected $allowedFields = [ protected $allowedFields = [
"code", "clientinfo_uid",
"serviceinfo_uid",
"serverinfo_uid", "serverinfo_uid",
"code",
"status", "status",
]; ];
public function __construct() public function __construct()
@ -28,10 +30,6 @@ class SwitchModel extends EquipmentModel
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true)); throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
} }
switch ($field) { switch ($field) {
case "code":
$rule = "required|trim|alpha_numeric|min_length[4]|max_length[20]";
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
break;
case "status": case "status":
$rule = "required|trim|string"; $rule = "required|trim|string";
break; break;

View File

@ -30,7 +30,16 @@ class MyLogModel extends CommonModel
} }
switch ($field) { switch ($field) {
case "user_uid": case "user_uid":
$rule = "if_exist|numeric"; $rule = "permit_empty|numeric";
break;
case 'titler':
$rule = "required|trim|string";
break;
case 'content':
$rule = "permit_empty|trim|string";
break;
case 'status':
$rule = "permit_empty|trim|string";
break; break;
default: default:
$rule = parent::getFormFieldRule($action, $field); $rule = parent::getFormFieldRule($action, $field);

View File

@ -37,10 +37,10 @@ class UserModel extends CommonModel
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : ""; $rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
break; break;
case "passwd": case "passwd":
$rule = in_array($action, ["create", "create_form"]) ? "required|trim|string" : "if_exist|trim|string"; $rule = in_array($action, ["create", "create_form"]) ? "required|trim|string" : "permit_empty|trim|string";
break; break;
case "confirmpassword": case "confirmpassword":
$rule = in_array($action, ["create", "create_form"]) ? "required|trim|string|matches[passwd]" : "if_exist|trim|string|matches[passwd]"; $rule = in_array($action, ["create", "create_form"]) ? "required|trim|string|matches[passwd]" : "permit_empty|trim|string|matches[passwd]";
break; break;
case "email": case "email":
$rule = "required|trim|valid_email"; $rule = "required|trim|valid_email";

View File

@ -53,10 +53,10 @@ class UserSNSModel extends CommonModel
return $rule; return $rule;
} }
//List 검색용 //List 검색용
public function setList_WordFilter(string $word): void // public function setList_WordFilter(string $word): void
{ // {
$this->orLike(self::TABLE . '.id', $word, 'both'); // $this->orLike(self::TABLE . '.id', $word, 'both');
$this->orLike(self::TABLE . "." . self::TITLE, $word, 'both'); // $this->orLike(self::TABLE . "." . self::TITLE, $word, 'both');
$this->orLike(self::TABLE . '.email', $word, 'both'); // $this->orLike(self::TABLE . '.email', $word, 'both');
} // }
} }

View File

@ -17,10 +17,12 @@ class AccountService extends CustomerService
{ {
return [ return [
"clientinfo_uid", "clientinfo_uid",
"status", "bank",
"alias",
"title", "title",
"amount" "alias",
"issue_at",
"amount",
"status",
]; ];
} }
public function getFilterFields(): array public function getFilterFields(): array

View File

@ -17,9 +17,9 @@ class CouponService extends CustomerService
{ {
return [ return [
"clientinfo_uid", "clientinfo_uid",
"status",
"title", "title",
"amount", "cnt",
"status",
]; ];
} }
public function getFilterFields(): array public function getFilterFields(): array
@ -40,11 +40,11 @@ class CouponService extends CustomerService
if (!$entity) { if (!$entity) {
throw new \Exception("{$formDatas['clientinfo_uid']}에 대한 고객정보를 찾을수 없습니다."); throw new \Exception("{$formDatas['clientinfo_uid']}에 대한 고객정보를 찾을수 없습니다.");
} }
$amount = intval($formDatas['amount']); $cnt = intval($formDatas['cnt']);
if ($formDatas['status'] === CouponEntity::DEFAULT_STATUS) { //입금, 쿠폰추가 if ($formDatas['status'] === CouponEntity::DEFAULT_STATUS) { //입금, 쿠폰추가
$entity = $this->getClientService()->deposit($entity, 'coupon_balance', $amount); $entity = $this->getClientService()->deposit($entity, 'coupon_balance', $cnt);
} else { // 출금, 쿠폰사용 } else { // 출금, 쿠폰사용
$entity = $this->getClientService()->withdrawal($entity, 'coupon_balance', $amount); $entity = $this->getClientService()->withdrawal($entity, 'coupon_balance', $cnt);
} }
} }
public function create(array $formDatas): CouponEntity public function create(array $formDatas): CouponEntity

View File

@ -32,8 +32,7 @@ class PaymentService extends CustomerService
"billing_method", "billing_method",
"billing_at", "billing_at",
"pay_method", "pay_method",
"status", "status"
"updated_at"
]; ];
} }
public function getFilterFields(): array public function getFilterFields(): array
@ -46,7 +45,7 @@ class PaymentService extends CustomerService
} }
public function getIndexFields(): array public function getIndexFields(): array
{ {
return ['clientinfo_uid', 'billing_method', 'amount', 'billing_at', 'pay_method', 'status', 'countdown', 'user_uid']; return ['clientinfo_uid', 'billing_method', 'title', 'amount', 'billing_at', 'pay_method', 'status', 'countdown', 'user_uid'];
} }
public function getBatchJobButtons(): array public function getBatchJobButtons(): array
{ {
@ -74,19 +73,6 @@ class PaymentService extends CustomerService
} }
return $options; return $options;
} }
//미납서비스 정보
final public function getUnPaidCount(): array
{
$sql = sprintf("SELECT serviceinfo_uid,COUNT(*) as CNT
FROM payment
WHERE billing_at < NOW() AND amount > 0 AND status = '%s'
GROUP BY serviceinfo_uid", PaymentEntity::DEFAULT_STATUS);
$unpaids = [];
foreach ($this->getModel()->query($sql)->getResult() as $row) {
$unpaids[$row->serverinfo_uid] = $row->CNT;
}
return $unpaids;
}
//List 검색용 //List 검색용
//OrderBy 처리 //OrderBy 처리
public function setOrderBy(mixed $field = null, mixed $value = null): void public function setOrderBy(mixed $field = null, mixed $value = null): void
@ -94,4 +80,9 @@ class PaymentService extends CustomerService
$this->getModel()->orderBy('billing_at ASC'); $this->getModel()->orderBy('billing_at ASC');
parent::setOrderBy($field, $value); parent::setOrderBy($field, $value);
} }
//미납서비스 정보
final public function getUnPaidCount(string $checkDate = 'now', string $idx_field = "serviceinfo_uid"): array
{
return $this->getModel()->getUnPaidCount($checkDate, $idx_field);
}
} }

View File

@ -17,9 +17,9 @@ class PointService extends CustomerService
{ {
return [ return [
"clientinfo_uid", "clientinfo_uid",
"status",
"title", "title",
"amount" "amount",
"status",
]; ];
} }
public function getFilterFields(): array public function getFilterFields(): array

View File

@ -20,24 +20,26 @@ class ServiceService extends CustomerService
"clientinfo_uid", "clientinfo_uid",
"type", "type",
"location", "location",
"serverinfo_uid",
"billing_at", "billing_at",
"amount", "amount",
"start_at", "start_at",
"end_at", "end_at",
"history",
"status", "status",
]; ];
} }
public function getFilterFields(): array public function getFilterFields(): array
{ {
return ['clientinfo_uid', 'serverinfo_uid', 'type', 'location', 'status']; return ['site', 'clientinfo_uid', 'serverinfo_uid', 'type', 'location', 'status'];
} }
public function getBatchJobFields(): array public function getBatchJobFields(): array
{ {
return ['clientinfo_uid', 'status']; return ['site', 'clientinfo_uid', 'status'];
} }
public function getIndexFields(): array public function getIndexFields(): array
{ {
return ['clientinfo_uid', 'type', 'location', 'serverinfo_uid', 'billing_at', 'amount', 'start_at', 'end_at', 'updated_at', 'status', 'user_uid']; return ['site', 'clientinfo_uid', 'type', 'location', 'serverinfo_uid', 'billing_at', 'amount', 'start_at', 'end_at', 'updated_at', 'status', 'user_uid'];
} }
//Entity의 관련객체정의용 //Entity의 관련객체정의용
public function setSearchIp(string $ip): void public function setSearchIp(string $ip): void

View File

@ -15,6 +15,7 @@ class CSService extends EquipmentService
public function getFormFields(): array public function getFormFields(): array
{ {
return [ return [
"serverinfo_uid",
"type", "type",
"ip", "ip",
"accountid", "accountid",
@ -25,7 +26,7 @@ class CSService extends EquipmentService
} }
public function getFilterFields(): array public function getFilterFields(): array
{ {
return ["type", 'status']; return ["clientinfo_uid", 'serverinfo_uid', 'type', 'status'];
} }
public function getBatchJobFields(): array public function getBatchJobFields(): array
{ {
@ -33,7 +34,7 @@ class CSService extends EquipmentService
} }
public function getIndexFields(): array public function getIndexFields(): array
{ {
return ['type', 'ip', 'accountid', 'domain', 'price', 'status']; return ["clientinfo_uid", 'serverinfo_uid', 'type', 'ip', 'accountid', 'domain', 'price', 'status'];
} }
//List 검색용 //List 검색용
//OrderBy 처리 //OrderBy 처리

View File

@ -50,7 +50,6 @@ abstract class EquipmentService extends CommonService
} }
return $this->_serverService; return $this->_serverService;
} }
//ServiceItemController,ServiceController에서 사용
//기본기능 //기본기능
//FieldForm관련용 //FieldForm관련용
public function getFormFieldOption(string $field, array $options = []): array public function getFormFieldOption(string $field, array $options = []): array

View File

@ -20,18 +20,15 @@ class IpService extends EquipmentService
{ {
return [ return [
"lineinfo_uid", "lineinfo_uid",
"clientinfo_uid",
"serverinfo_uid", "serverinfo_uid",
"ip", "ip",
"price", "price",
"amount",
"history",
"status", "status",
]; ];
} }
public function getFilterFields(): array public function getFilterFields(): array
{ {
return ["lineinfo_uid", 'status']; return ['old_clientinfo_uid', 'clientinfo_uid', 'serverinfo_uid', "lineinfo_uid", 'status'];
} }
public function getBatchJobFields(): array public function getBatchJobFields(): array
{ {
@ -39,7 +36,7 @@ class IpService extends EquipmentService
} }
public function getIndexFields(): array public function getIndexFields(): array
{ {
return ['lineinfo_uid', 'clientinfo_uid', 'serverinfo_uid', 'ip', 'price', 'amount', 'status']; return ['lineinfo_uid', 'ip', 'price', 'amount', 'status', 'clientinfo_uid', 'serverinfo_uid', 'old_clientinfo_uid'];
} }
final public function getLineService(): LineService final public function getLineService(): LineService
{ {
@ -56,12 +53,9 @@ class IpService extends EquipmentService
case 'lineinfo_uid': case 'lineinfo_uid':
$options = $this->getLineService()->getEntities(); $options = $this->getLineService()->getEntities();
break; break;
case 'clientinfo_uid': case 'old_clientinfo_uid':
$options = $this->getClientService()->getEntities(); $options = $this->getClientService()->getEntities();
break; break;
case 'serverinfo_uid':
$options = $this->getServerService()->getEntities();
break;
default: default:
$options = parent::getFormFieldOption($field, $options); $options = parent::getFormFieldOption($field, $options);
break; break;

View File

@ -16,6 +16,7 @@ class ServerService extends EquipmentService
public function getFormFields(): array public function getFormFields(): array
{ {
return [ return [
"serviceinfo_uid",
"code", "code",
"type", "type",
"title", "title",
@ -27,7 +28,7 @@ class ServerService extends EquipmentService
} }
public function getFilterFields(): array public function getFilterFields(): array
{ {
return ['clientinfo_uid', 'serviceinfo_uid', 'status']; return ['clientinfo_uid', 'serviceinfo_uid', 'type', 'status'];
} }
public function getBatchJobFields(): array public function getBatchJobFields(): array
{ {

View File

@ -16,22 +16,25 @@ class SwitchService extends EquipmentService
public function getFormFields(): array public function getFormFields(): array
{ {
return [ return [
"serverinfo_uid",
"code", "code",
"status", "status",
]; ];
} }
public function getFilterFields(): array public function getFilterFields(): array
{ {
return ['status']; return ['clientinfo_uid', 'serviceinfo_uid', 'serverinfo_uid', 'status'];
} }
public function getBatchJobFields(): array public function getBatchJobFields(): array
{ {
return ['status']; return ['clientinfo_uid', 'serverinfo_uid', 'status'];
} }
public function getIndexFields(): array public function getIndexFields(): array
{ {
return ['code', 'status']; return ['code', 'clientinfo_uid', 'serviceinfo_uid', 'serverinfo_uid', 'status'];
} }
//기본기능
//FieldForm관련용
//상태변경 //상태변경
public function setStatus(string $code, string $status): SwitchEntity public function setStatus(string $code, string $status): SwitchEntity
{ {