diff --git a/app/Controllers/Admin/Customer/ServiceController.php b/app/Controllers/Admin/Customer/ServiceController.php index b91e9c5..e01c6b8 100644 --- a/app/Controllers/Admin/Customer/ServiceController.php +++ b/app/Controllers/Admin/Customer/ServiceController.php @@ -92,16 +92,14 @@ class ServiceController extends CustomerController } return $options; } - protected function getResultSuccess(string $message = MESSAGES["SUCCESS"]): RedirectResponse|string + protected function getResultSuccess(string $message = MESSAGES["SUCCESS"], ?string $actionTemplate = null): RedirectResponse|string { switch ($this->getAction()) { case 'index': - $this->control = $this->getControlDatas(); - $this->getHelper()->setViewDatas($this->getViewDatas()); - $result = view($this->view_path . 'service' . DIRECTORY_SEPARATOR . $this->getAction(), ['viewDatas' => $this->getViewDatas()]); + $result = parent::getResultSuccess($message, $this->request->getVar('ActionTemplate') ?? 'service'); break; default: - $result = parent::getResultSuccess($message); + $result = parent::getResultSuccess($message, $actionTemplate); break; } return $result; diff --git a/app/Controllers/Admin/Customer/ServiceHistoryController.php b/app/Controllers/Admin/Customer/ServiceHistoryController.php index 490305c..e9b824e 100644 --- a/app/Controllers/Admin/Customer/ServiceHistoryController.php +++ b/app/Controllers/Admin/Customer/ServiceHistoryController.php @@ -61,16 +61,14 @@ class ServiceHistoryController extends CustomerController } return $options; } - protected function getResultSuccess(string $message = MESSAGES["SUCCESS"]): RedirectResponse|string + protected function getResultSuccess(string $message = MESSAGES["SUCCESS"], ?string $actionTemplate = null): RedirectResponse|string { switch ($this->getAction()) { case 'index': - $this->control = $this->getControlDatas(); - $this->getHelper()->setViewDatas($this->getViewDatas()); - $result = view($this->view_path . 'popup' . DIRECTORY_SEPARATOR . $this->getAction(), ['viewDatas' => $this->getViewDatas()]); + $result = parent::getResultSuccess($message, $this->request->getVar('ActionTemplate') ?? 'popup'); break; default: - $result = parent::getResultSuccess($message); + $result = parent::getResultSuccess($message, $actionTemplate); break; } return $result; diff --git a/app/Controllers/Admin/Home.php b/app/Controllers/Admin/Home.php index 7485de8..a45b54a 100644 --- a/app/Controllers/Admin/Home.php +++ b/app/Controllers/Admin/Home.php @@ -2,11 +2,12 @@ namespace App\Controllers\Admin; +use App\Helpers\UserHelper; +use App\Services\UserService; +use CodeIgniter\HTTP\RedirectResponse; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use Psr\Log\LoggerInterface; -use App\Services\UserService; -use App\Helpers\UserHelper; class Home extends AdminController { @@ -32,7 +33,7 @@ class Home extends AdminController } //Index,FieldForm관련 - public function index(): string + public function index(): RedirectResponse|string { helper(['form']); return view('admin/welcome_message', ['viewDatas' => $this->getViewDatas()]); diff --git a/app/Controllers/Admin/MyLogController.php b/app/Controllers/Admin/MyLogController.php index 34f230e..ad632ff 100644 --- a/app/Controllers/Admin/MyLogController.php +++ b/app/Controllers/Admin/MyLogController.php @@ -55,9 +55,10 @@ class MyLogController extends AdminController } break; default: - $options = parent::getFormFieldOption($field . $options); + $options = parent::getFormFieldOption($field, $options); break; } + // dd($options); return $options; } //Index,FieldForm관련 diff --git a/app/Controllers/Auth/AuthController.php b/app/Controllers/Auth/AuthController.php index 7267489..30376ba 100644 --- a/app/Controllers/Auth/AuthController.php +++ b/app/Controllers/Auth/AuthController.php @@ -35,24 +35,14 @@ abstract class AuthController extends CommonController return $this->_helper; } - //로그인 실패시 오류에서는 Logger에 남기지 않아야 함. - protected function getResultFail(string $message = MESSAGES["FAILED"]): RedirectResponse|string - { - if (env('app.debug.' . $this->getAction())) { - $result = $message; - } else { - $result = redirect()->back()->withInput()->with('error', $message); - } - return $result; - } - protected function getResultSuccess(string $message = MESSAGES["SUCCESS"]): RedirectResponse|string + protected function getResultSuccess(string $message = MESSAGES["SUCCESS"], ?string $actionTemplate = null): RedirectResponse|string { switch ($this->getAction()) { case 'create': $result = redirect()->to($this->getMyAuth()->popPreviousUrl())->with('error', $message); break; default: - $result = parent::getResultSuccess($message); + $result = parent::getResultSuccess($message, $actionTemplate); break; } return $result; diff --git a/app/Controllers/CommonController.php b/app/Controllers/CommonController.php index 469fe9c..8197356 100644 --- a/app/Controllers/CommonController.php +++ b/app/Controllers/CommonController.php @@ -220,18 +220,13 @@ abstract class CommonController extends BaseController return $formDatas; // return $validation->getValidated(); } - protected function getResultFail(string $message = MESSAGES["FAILED"]): RedirectResponse|string + final protected function getResultFail(string $message = MESSAGES["FAILED"]): RedirectResponse { - if (env('app.debug.' . $this->getAction())) { - $result = $message; - } else { - LogCollector::debug($message); - $this->getMyLogService()->save($this->getService(), __FUNCTION__, $this->getMyAuth(), $message); - $result = redirect()->back()->withInput()->with('error', $message); - } - return $result; + LogCollector::debug($message); + $this->getMyLogService()->save($this->getService(), __FUNCTION__, $this->getMyAuth(), $message); + return redirect()->back()->withInput()->with('error', $message); } - protected function getResultSuccess(string $message = MESSAGES["SUCCESS"]): RedirectResponse|string + protected function getResultSuccess(string $message = MESSAGES["SUCCESS"], ?string $actionTemplate = null): RedirectResponse|string { switch ($this->getAction()) { case 'create': @@ -242,17 +237,18 @@ abstract class CommonController extends BaseController case 'create_form': case 'modify_form': case 'login_form': - case 'index': case 'view': + case 'index': case 'download': - $this->view_template = $this->view_path . $this->getAction(); - $actionFrameType = $this->request->getVar('ActionFrameType'); - if ($actionFrameType) { - $this->view_template = $this->view_path . $actionFrameType . DIRECTORY_SEPARATOR . $this->getAction(); - } $this->control = $this->getControlDatas(); $this->getHelper()->setViewDatas($this->getViewDatas()); - $result = view($this->view_template, ['viewDatas' => $this->getViewDatas()]); + $actionTemplate = $this->request->getVar('ActionTemplate') ?? $actionTemplate; + if ($actionTemplate) { + $view_file = $this->view_path . $actionTemplate . DIRECTORY_SEPARATOR . $this->getAction(); + } else { + $view_file = $this->view_path . $this->getAction(); + } + $result = view($view_file, ['viewDatas' => $this->getViewDatas()]); break; default: $result = redirect()->to($this->getMyAuth()->popPreviousUrl())->with('error', $message); @@ -667,7 +663,7 @@ abstract class CommonController extends BaseController $this->getService()->getModel()->offset(($this->page - 1) * $this->per_page); return $this->getService()->getEntities(); } - public function index() + public function index(): RedirectResponse|string { try { //각 Field 초기화 @@ -682,7 +678,8 @@ abstract class CommonController extends BaseController $this->entities = $this->index_process(); return $this->getResultSuccess(); } catch (\Exception $e) { - return $this->getResultFail($e->getMessage()); + return $e->getMessage(); + // return $this->getResultFail($e->getMessage()); } } diff --git a/app/Helpers/CommonHelper.php b/app/Helpers/CommonHelper.php index c50c75b..57da0eb 100644 --- a/app/Helpers/CommonHelper.php +++ b/app/Helpers/CommonHelper.php @@ -275,7 +275,7 @@ class CommonHelper $extra_class = isset($extras['class']) ? $extras['class'] . ' select-field' : 'select-field'; $form = form_dropdown($field, $formOptions, $value, ['class' => $extra_class, ...array_diff_key($extras, ['class' => ''])]); } else { - $form = form_input($field, $value ?? "", ["autocomplete" => $field, $extras]); + $form = form_input($field, $value ?? "", $extras); } break; } diff --git a/app/Helpers/Customer/ClientHelper.php b/app/Helpers/Customer/ClientHelper.php index 5354187..86aa370 100644 --- a/app/Helpers/Customer/ClientHelper.php +++ b/app/Helpers/Customer/ClientHelper.php @@ -23,7 +23,7 @@ class ClientHelper extends CustomerHelper number_format(intval($value)), 'index', [ - "data-src" => "/admin/customer/account?clientinfo_uid={$viewDatas['entity']->getPK()}&ActionFrameType=popup", + "data-src" => "/admin/customer/account?clientinfo_uid={$viewDatas['entity']->getPK()}&ActionTemplate=popup", "data-bs-toggle" => "modal", "data-bs-target" => "#index_action_form", ...$extras @@ -36,7 +36,7 @@ class ClientHelper extends CustomerHelper number_format(intval($value)), 'index', [ - "data-src" => "/admin/customer/coupon?clientinfo_uid={$viewDatas['entity']->getPK()}&ActionFrameType=popup", + "data-src" => "/admin/customer/coupon?clientinfo_uid={$viewDatas['entity']->getPK()}&ActionTemplate=popup", "data-bs-toggle" => "modal", "data-bs-target" => "#index_action_form", ...$extras @@ -49,7 +49,7 @@ class ClientHelper extends CustomerHelper number_format(intval($value)), 'index', [ - "data-src" => "/admin/customer/point?clientinfo_uid={$viewDatas['entity']->getPK()}&ActionFrameType=popup", + "data-src" => "/admin/customer/point?clientinfo_uid={$viewDatas['entity']->getPK()}&ActionTemplate=popup", "data-bs-toggle" => "modal", "data-bs-target" => "#index_action_form", ...$extras diff --git a/app/Helpers/Customer/ServiceHelper.php b/app/Helpers/Customer/ServiceHelper.php index 3bcd9b0..ba73f57 100644 --- a/app/Helpers/Customer/ServiceHelper.php +++ b/app/Helpers/Customer/ServiceHelper.php @@ -31,7 +31,7 @@ class ServiceHelper extends CustomerHelper ICONS['SETUP'], $field, [ - "data-src" => "/admin/customer/serviceitem?serviceinfo_uid={$viewDatas['entity']->getPK()}&item_type={$field}&ActionFrameType=popup", + "data-src" => "/admin/customer/serviceitem?serviceinfo_uid={$viewDatas['entity']->getPK()}&item_type={$field}&ActionTemplate=popup", "data-bs-toggle" => "modal", "data-bs-target" => "#index_action_form", ...$extras diff --git a/app/Helpers/MyLogHelper.php b/app/Helpers/MyLogHelper.php index ac7a042..812557a 100644 --- a/app/Helpers/MyLogHelper.php +++ b/app/Helpers/MyLogHelper.php @@ -16,7 +16,7 @@ class MyLogHelper extends CommonHelper public function getFieldView(string $field, array $viewDatas, array $extras = []): string { - $value = $viewDatas['entity']->$field; + $value = $viewDatas['entity']->$field ?? ""; switch ($field) { case 'content': $value = nl2br($value); diff --git a/app/Services/CommonService.php b/app/Services/CommonService.php index 589b8db..a5d8746 100644 --- a/app/Services/CommonService.php +++ b/app/Services/CommonService.php @@ -26,7 +26,7 @@ abstract class CommonService } public function getViewFields(): array { - return $this->getModel()->getAllowedFields(); + return $this->getFormFields(); } final public function __get($name) { diff --git a/app/Services/MyLogService.php b/app/Services/MyLogService.php index 1203b21..3e03e6c 100644 --- a/app/Services/MyLogService.php +++ b/app/Services/MyLogService.php @@ -45,7 +45,7 @@ class MyLogService extends CommonService } public function getIndexFields(): array { - return ['user_uid', 'class_name', 'method_name', 'title', 'status', 'created_at', 'content']; + return ['user_uid', 'class_name', 'method_name', 'title', 'status', 'created_at']; } public function save($service, string $method, AuthService $myauth, string $title): MyLogEntity { diff --git a/dbms_init_all.sq b/dbms_init_all.sq new file mode 100644 index 0000000..62cda62 --- /dev/null +++ b/dbms_init_all.sq @@ -0,0 +1,714 @@ +-- MySQL dump 10.19 Distrib 10.3.28-MariaDB, for Linux (x86_64) +-- +-- Host: localhost Database: dbms +-- ------------------------------------------------------ +-- Server version 10.3.28-MariaDB-log + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `accountinfo` +-- + +DROP TABLE IF EXISTS `accountinfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `accountinfo` ( + `uid` int(11) NOT NULL AUTO_INCREMENT, + `clientinfo_uid` int(11) NOT NULL, + `title` varchar(255) NOT NULL, + `alias` varchar(50) NOT NULL COMMENT '입출금자명', + `amount` int(11) NOT NULL DEFAULT 0 COMMENT '압출금액', + `status` varchar(20) NOT NULL DEFAULT 'default', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`uid`), + KEY `FK_clientinfo_TO_accountinfo` (`clientinfo_uid`), + CONSTRAINT `FK_clientinfo_TO_accountinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='예치금계좌'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `accountinfo` +-- + +LOCK TABLES `accountinfo` WRITE; +/*!40000 ALTER TABLE `accountinfo` DISABLE KEYS */; +INSERT INTO `accountinfo` VALUES (1,1,'5월예치금입금','Test111',100000,'default','2025-05-29 06:08:43'),(2,1,'5월예치금출금','Test111',50000,'out','2025-05-29 06:09:07'); +/*!40000 ALTER TABLE `accountinfo` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `clientinfo` +-- + +DROP TABLE IF EXISTS `clientinfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `clientinfo` ( + `uid` int(11) NOT NULL AUTO_INCREMENT, + `role` varchar(50) NOT NULL DEFAULT 'user', + `name` varchar(100) NOT NULL, + `phone` varchar(50) DEFAULT NULL, + `email` varchar(50) NOT NULL, + `account_balance` int(11) NOT NULL DEFAULT 0 COMMENT '예치금', + `coupon_balance` int(11) NOT NULL DEFAULT 0 COMMENT '쿠폰수', + `point_balance` int(11) NOT NULL DEFAULT 0 COMMENT '포인트', + `status` varchar(20) NOT NULL DEFAULT 'default', + `updated_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`uid`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='고객정보'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `clientinfo` +-- + +LOCK TABLES `clientinfo` WRITE; +/*!40000 ALTER TABLE `clientinfo` DISABLE KEYS */; +INSERT INTO `clientinfo` VALUES (1,'user','Test111','1111','test111@co.kr',50000,0,0,'default','2025-05-29 06:09:07','2025-05-29 06:07:37'),(2,'user,vip','Test222','222','test222@co.kr',0,50,0,'default','2025-05-29 06:10:10','2025-05-29 06:07:54'),(3,'user,vip,reseller','Test333','3333','test333@co.kr',0,0,50000,'default','2025-05-29 06:10:55','2025-05-29 06:08:07'),(4,'user','Test444','4444','test444@co.kr',0,0,0,'default','2025-06-09 07:38:48','2025-05-29 06:08:17'); +/*!40000 ALTER TABLE `clientinfo` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `codeinfo` +-- + +DROP TABLE IF EXISTS `codeinfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `codeinfo` ( + `code` varchar(20) NOT NULL COMMENT '서버코드', + `status` varchar(20) NOT NULL DEFAULT 'default', + `updated_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`code`), + UNIQUE KEY `UQ_code` (`code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='코드표'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `codeinfo` +-- + +LOCK TABLES `codeinfo` WRITE; +/*!40000 ALTER TABLE `codeinfo` DISABLE KEYS */; +INSERT INTO `codeinfo` VALUES ('JPN130','occupied','2025-06-10 08:11:11','2025-06-10 03:52:44'),('JPN140','default','2025-06-10 08:11:11','2025-06-10 03:52:49'),('JPN150','default',NULL,'2025-06-10 03:53:05'),('MP350','default','2025-06-10 10:11:53','2025-06-10 03:53:54'),('MP360','default','2025-06-10 10:20:51','2025-06-10 03:53:59'),('MP370','occupied','2025-06-10 10:20:51','2025-06-10 03:54:04'),('XP230','default',NULL,'2025-06-10 03:53:30'),('XP240','default',NULL,'2025-06-10 03:53:35'),('XP250','default',NULL,'2025-06-10 03:53:40'); +/*!40000 ALTER TABLE `codeinfo` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `couponinfo` +-- + +DROP TABLE IF EXISTS `couponinfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `couponinfo` ( + `uid` int(11) NOT NULL AUTO_INCREMENT, + `clientinfo_uid` int(11) NOT NULL, + `title` varchar(100) NOT NULL, + `amount` int(11) NOT NULL DEFAULT 0 COMMENT '갯수', + `status` varchar(20) NOT NULL DEFAULT 'default', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`uid`), + KEY `FK_clientinfo_TO_couponinfo` (`clientinfo_uid`), + CONSTRAINT `FK_clientinfo_TO_couponinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='쿠폰정보'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `couponinfo` +-- + +LOCK TABLES `couponinfo` WRITE; +/*!40000 ALTER TABLE `couponinfo` DISABLE KEYS */; +INSERT INTO `couponinfo` VALUES (1,2,'5월쿠폰추가',100,'default','2025-05-29 06:09:41'),(2,2,'5월쿠폰사용',50,'out','2025-05-29 06:10:10'); +/*!40000 ALTER TABLE `couponinfo` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `cpuinfo` +-- + +DROP TABLE IF EXISTS `cpuinfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `cpuinfo` ( + `uid` int(11) NOT NULL AUTO_INCREMENT, + `model` varchar(50) NOT NULL, + `status` varchar(20) NOT NULL DEFAULT 'default', + `updated_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`uid`), + UNIQUE KEY `UQ_model` (`model`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='CPU 정보'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `cpuinfo` +-- + +LOCK TABLES `cpuinfo` WRITE; +/*!40000 ALTER TABLE `cpuinfo` DISABLE KEYS */; +INSERT INTO `cpuinfo` VALUES (1,'Xeon(R) CPU E5-2690 v2 @3.00GHz','default',NULL,'2025-05-29 07:25:04'),(2,'Xeon(R) CPU E5-2690 v4 @ 2.60GHz','default',NULL,'2025-05-29 07:25:17'),(3,'Intel i3','default',NULL,'2025-05-29 07:25:56'),(4,'Intel i5','default',NULL,'2025-05-29 07:26:08'),(5,'Intel i7','default',NULL,'2025-05-29 07:26:22'); +/*!40000 ALTER TABLE `cpuinfo` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `defenceinfo` +-- + +DROP TABLE IF EXISTS `defenceinfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `defenceinfo` ( + `uid` int(11) NOT NULL AUTO_INCREMENT, + `type` varchar(20) NOT NULL, + `ip` varchar(50) DEFAULT NULL, + `accountid` varchar(50) DEFAULT NULL, + `domain` varchar(100) DEFAULT NULL, + `description` text DEFAULT NULL, + `status` varchar(20) NOT NULL DEFAULT 'default', + `updated_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`uid`), + UNIQUE KEY `UQ_uid` (`uid`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='방어(CS)정보'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `defenceinfo` +-- + +LOCK TABLES `defenceinfo` WRITE; +/*!40000 ALTER TABLE `defenceinfo` DISABLE KEYS */; +INSERT INTO `defenceinfo` VALUES (2,'VPC-CS','21.238.234.34','VPC-X21',NULL,NULL,'default','2025-06-09 07:44:42','2025-05-29 07:20:50'),(3,'KT-CS','13.23.4.2','KT-X23',NULL,NULL,'default',NULL,'2025-05-29 07:22:55'); +/*!40000 ALTER TABLE `defenceinfo` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `domaininfo` +-- + +DROP TABLE IF EXISTS `domaininfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `domaininfo` ( + `uid` int(11) NOT NULL AUTO_INCREMENT, + `clientinfo_uid` int(11) NOT NULL, + `domain` varchar(20) NOT NULL, + `status` varchar(20) NOT NULL DEFAULT 'default', + `updated_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`uid`), + UNIQUE KEY `UQ_domain` (`domain`), + KEY `FK_clientinfo_TO_domaininfo` (`clientinfo_uid`), + CONSTRAINT `FK_clientinfo_TO_domaininfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='도메인 정보'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `domaininfo` +-- + +LOCK TABLES `domaininfo` WRITE; +/*!40000 ALTER TABLE `domaininfo` DISABLE KEYS */; +INSERT INTO `domaininfo` VALUES (1,2,'Ckoa.kk','default',NULL,'2025-06-09 08:44:41'); +/*!40000 ALTER TABLE `domaininfo` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `invoiceinfo` +-- + +DROP TABLE IF EXISTS `invoiceinfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `invoiceinfo` ( + `uid` int(11) NOT NULL AUTO_INCREMENT, + `clientinfo_uid` int(11) NOT NULL, + `issue_at` date DEFAULT NULL COMMENT '발행일', + `due_at` date DEFAULT NULL COMMENT '지급기한일', + `total_amount` int(11) NOT NULL DEFAULT 0 COMMENT '총금액', + `status` varchar(20) NOT NULL DEFAULT 'default' COMMENT '상태', + `updated_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`uid`), + KEY `FK_clientinfo_TO_invoiceinfo` (`clientinfo_uid`), + CONSTRAINT `FK_clientinfo_TO_invoiceinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='청구서정보'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `invoiceinfo` +-- + +LOCK TABLES `invoiceinfo` WRITE; +/*!40000 ALTER TABLE `invoiceinfo` DISABLE KEYS */; +/*!40000 ALTER TABLE `invoiceinfo` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `invoiceinfo_items` +-- + +DROP TABLE IF EXISTS `invoiceinfo_items`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `invoiceinfo_items` ( + `uid` int(11) NOT NULL AUTO_INCREMENT, + `invoiceinfo_uid` int(11) NOT NULL, + `item_type` varchar(20) NOT NULL, + `item_uid` int(11) NOT NULL, + `billing_cyle` varchar(20) NOT NULL, + `amount` int(11) NOT NULL DEFAULT 0 COMMENT '청구금액', + `updated_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`uid`), + KEY `FK_invoiceinfo_TO_invoiceinfo_items` (`invoiceinfo_uid`), + CONSTRAINT `FK_invoiceinfo_TO_invoiceinfo_items` FOREIGN KEY (`invoiceinfo_uid`) REFERENCES `invoiceinfo` (`uid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='청구서Item정보'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `invoiceinfo_items` +-- + +LOCK TABLES `invoiceinfo_items` WRITE; +/*!40000 ALTER TABLE `invoiceinfo_items` DISABLE KEYS */; +/*!40000 ALTER TABLE `invoiceinfo_items` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ipinfo` +-- + +DROP TABLE IF EXISTS `ipinfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ipinfo` ( + `uid` int(11) NOT NULL AUTO_INCREMENT, + `lineinfo_uid` int(11) NOT NULL, + `ip` char(16) NOT NULL, + `status` varchar(20) NOT NULL DEFAULT 'default', + `updated_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`uid`), + UNIQUE KEY `UQ_ip` (`ip`), + KEY `FK_lineinfo_TO_ipinfo` (`lineinfo_uid`), + CONSTRAINT `FK_lineinfo_TO_ipinfo` FOREIGN KEY (`lineinfo_uid`) REFERENCES `lineinfo` (`uid`) +) ENGINE=InnoDB AUTO_INCREMENT=129 DEFAULT CHARSET=utf8 COMMENT=' IP 정보'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ipinfo` +-- + +LOCK TABLES `ipinfo` WRITE; +/*!40000 ALTER TABLE `ipinfo` DISABLE KEYS */; +INSERT INTO `ipinfo` VALUES (1,8,'27.125.207.128','default','2025-06-09 06:09:21','2025-05-29 06:45:34'),(2,8,'27.125.207.129','default',NULL,'2025-05-29 06:45:34'),(3,8,'27.125.207.130','default',NULL,'2025-05-29 06:45:34'),(4,8,'27.125.207.131','default',NULL,'2025-05-29 06:45:34'),(5,8,'27.125.207.132','default',NULL,'2025-05-29 06:45:34'),(6,8,'27.125.207.133','default',NULL,'2025-05-29 06:45:34'),(7,8,'27.125.207.134','default',NULL,'2025-05-29 06:45:34'),(8,8,'27.125.207.135','default',NULL,'2025-05-29 06:45:34'),(9,8,'27.125.207.136','default',NULL,'2025-05-29 06:45:34'),(10,8,'27.125.207.137','default',NULL,'2025-05-29 06:45:34'),(11,8,'27.125.207.138','default',NULL,'2025-05-29 06:45:34'),(12,8,'27.125.207.139','default',NULL,'2025-05-29 06:45:34'),(13,8,'27.125.207.140','default',NULL,'2025-05-29 06:45:34'),(14,8,'27.125.207.141','default',NULL,'2025-05-29 06:45:34'),(15,8,'27.125.207.142','default',NULL,'2025-05-29 06:45:34'),(16,8,'27.125.207.143','default',NULL,'2025-05-29 06:45:34'),(17,8,'27.125.207.144','default',NULL,'2025-05-29 06:45:34'),(18,8,'27.125.207.145','default',NULL,'2025-05-29 06:45:34'),(19,8,'27.125.207.146','default',NULL,'2025-05-29 06:45:34'),(20,8,'27.125.207.147','default',NULL,'2025-05-29 06:45:34'),(21,8,'27.125.207.148','default',NULL,'2025-05-29 06:45:34'),(22,8,'27.125.207.149','default',NULL,'2025-05-29 06:45:34'),(23,8,'27.125.207.150','default',NULL,'2025-05-29 06:45:34'),(24,8,'27.125.207.151','default',NULL,'2025-05-29 06:45:34'),(25,8,'27.125.207.152','default',NULL,'2025-05-29 06:45:34'),(26,8,'27.125.207.153','default',NULL,'2025-05-29 06:45:34'),(27,8,'27.125.207.154','default',NULL,'2025-05-29 06:45:34'),(28,8,'27.125.207.155','default',NULL,'2025-05-29 06:45:34'),(29,8,'27.125.207.156','default',NULL,'2025-05-29 06:45:34'),(30,8,'27.125.207.157','default',NULL,'2025-05-29 06:45:34'),(31,8,'27.125.207.158','default',NULL,'2025-05-29 06:45:34'),(32,8,'27.125.207.159','default',NULL,'2025-05-29 06:45:34'),(33,8,'27.125.207.160','default',NULL,'2025-05-29 06:45:34'),(34,8,'27.125.207.161','default',NULL,'2025-05-29 06:45:34'),(35,8,'27.125.207.162','default',NULL,'2025-05-29 06:45:34'),(36,8,'27.125.207.163','default',NULL,'2025-05-29 06:45:34'),(37,8,'27.125.207.164','default',NULL,'2025-05-29 06:45:34'),(38,8,'27.125.207.165','default',NULL,'2025-05-29 06:45:34'),(39,8,'27.125.207.166','default',NULL,'2025-05-29 06:45:34'),(40,8,'27.125.207.167','default',NULL,'2025-05-29 06:45:34'),(41,8,'27.125.207.168','default',NULL,'2025-05-29 06:45:34'),(42,8,'27.125.207.169','default',NULL,'2025-05-29 06:45:34'),(43,8,'27.125.207.170','default',NULL,'2025-05-29 06:45:34'),(44,8,'27.125.207.171','default',NULL,'2025-05-29 06:45:34'),(45,8,'27.125.207.172','default',NULL,'2025-05-29 06:45:34'),(46,8,'27.125.207.173','default',NULL,'2025-05-29 06:45:34'),(47,8,'27.125.207.174','default',NULL,'2025-05-29 06:45:34'),(48,8,'27.125.207.175','default',NULL,'2025-05-29 06:45:34'),(49,8,'27.125.207.176','default',NULL,'2025-05-29 06:45:34'),(50,8,'27.125.207.177','default',NULL,'2025-05-29 06:45:34'),(51,8,'27.125.207.178','default',NULL,'2025-05-29 06:45:34'),(52,8,'27.125.207.179','default',NULL,'2025-05-29 06:45:34'),(53,8,'27.125.207.180','default',NULL,'2025-05-29 06:45:34'),(54,8,'27.125.207.181','default',NULL,'2025-05-29 06:45:34'),(55,8,'27.125.207.182','default',NULL,'2025-05-29 06:45:34'),(56,8,'27.125.207.183','default',NULL,'2025-05-29 06:45:34'),(57,8,'27.125.207.184','default',NULL,'2025-05-29 06:45:34'),(58,8,'27.125.207.185','default',NULL,'2025-05-29 06:45:34'),(59,8,'27.125.207.186','default',NULL,'2025-05-29 06:45:34'),(60,8,'27.125.207.187','default',NULL,'2025-05-29 06:45:34'),(61,8,'27.125.207.188','default',NULL,'2025-05-29 06:45:34'),(62,8,'27.125.207.189','default',NULL,'2025-05-29 06:45:34'),(63,8,'27.125.207.190','default',NULL,'2025-05-29 06:45:34'),(64,8,'27.125.207.191','default',NULL,'2025-05-29 06:45:34'),(65,8,'27.125.207.192','default',NULL,'2025-05-29 06:45:34'),(66,8,'27.125.207.193','default',NULL,'2025-05-29 06:45:34'),(67,8,'27.125.207.194','default',NULL,'2025-05-29 06:45:35'),(68,8,'27.125.207.195','default',NULL,'2025-05-29 06:45:35'),(69,8,'27.125.207.196','default',NULL,'2025-05-29 06:45:35'),(70,8,'27.125.207.197','default',NULL,'2025-05-29 06:45:35'),(71,8,'27.125.207.198','default',NULL,'2025-05-29 06:45:35'),(72,8,'27.125.207.199','default',NULL,'2025-05-29 06:45:35'),(73,8,'27.125.207.200','default',NULL,'2025-05-29 06:45:35'),(74,8,'27.125.207.201','default',NULL,'2025-05-29 06:45:35'),(75,8,'27.125.207.202','default',NULL,'2025-05-29 06:45:35'),(76,8,'27.125.207.203','default',NULL,'2025-05-29 06:45:35'),(77,8,'27.125.207.204','default',NULL,'2025-05-29 06:45:35'),(78,8,'27.125.207.205','default',NULL,'2025-05-29 06:45:35'),(79,8,'27.125.207.206','default',NULL,'2025-05-29 06:45:35'),(80,8,'27.125.207.207','default',NULL,'2025-05-29 06:45:35'),(81,8,'27.125.207.208','default',NULL,'2025-05-29 06:45:35'),(82,8,'27.125.207.209','default',NULL,'2025-05-29 06:45:35'),(83,8,'27.125.207.210','default',NULL,'2025-05-29 06:45:35'),(84,8,'27.125.207.211','default',NULL,'2025-05-29 06:45:35'),(85,8,'27.125.207.212','default',NULL,'2025-05-29 06:45:35'),(86,8,'27.125.207.213','default',NULL,'2025-05-29 06:45:35'),(87,8,'27.125.207.214','default',NULL,'2025-05-29 06:45:35'),(88,8,'27.125.207.215','default',NULL,'2025-05-29 06:45:35'),(89,8,'27.125.207.216','default',NULL,'2025-05-29 06:45:35'),(90,8,'27.125.207.217','default',NULL,'2025-05-29 06:45:35'),(91,8,'27.125.207.218','default',NULL,'2025-05-29 06:45:35'),(92,8,'27.125.207.219','default',NULL,'2025-05-29 06:45:35'),(93,8,'27.125.207.220','default',NULL,'2025-05-29 06:45:35'),(94,8,'27.125.207.221','default',NULL,'2025-05-29 06:45:35'),(95,8,'27.125.207.222','default',NULL,'2025-05-29 06:45:35'),(96,8,'27.125.207.223','default',NULL,'2025-05-29 06:45:35'),(97,8,'27.125.207.224','default',NULL,'2025-05-29 06:45:35'),(98,8,'27.125.207.225','default',NULL,'2025-05-29 06:45:35'),(99,8,'27.125.207.226','default',NULL,'2025-05-29 06:45:35'),(100,8,'27.125.207.227','default',NULL,'2025-05-29 06:45:35'),(101,8,'27.125.207.228','default',NULL,'2025-05-29 06:45:35'),(102,8,'27.125.207.229','default',NULL,'2025-05-29 06:45:35'),(103,8,'27.125.207.230','default',NULL,'2025-05-29 06:45:35'),(104,8,'27.125.207.231','default',NULL,'2025-05-29 06:45:35'),(105,8,'27.125.207.232','default',NULL,'2025-05-29 06:45:35'),(106,8,'27.125.207.233','default',NULL,'2025-05-29 06:45:35'),(107,8,'27.125.207.234','default',NULL,'2025-05-29 06:45:35'),(108,8,'27.125.207.235','default',NULL,'2025-05-29 06:45:35'),(109,8,'27.125.207.236','default',NULL,'2025-05-29 06:45:35'),(110,8,'27.125.207.237','default',NULL,'2025-05-29 06:45:35'),(111,8,'27.125.207.238','default',NULL,'2025-05-29 06:45:35'),(112,8,'27.125.207.239','default',NULL,'2025-05-29 06:45:35'),(113,8,'27.125.207.240','default',NULL,'2025-05-29 06:45:35'),(114,8,'27.125.207.241','default',NULL,'2025-05-29 06:45:35'),(115,8,'27.125.207.242','default',NULL,'2025-05-29 06:45:35'),(116,8,'27.125.207.243','default',NULL,'2025-05-29 06:45:35'),(117,8,'27.125.207.244','default',NULL,'2025-05-29 06:45:35'),(118,8,'27.125.207.245','default',NULL,'2025-05-29 06:45:35'),(119,8,'27.125.207.246','default',NULL,'2025-05-29 06:45:35'),(120,8,'27.125.207.247','default',NULL,'2025-05-29 06:45:35'),(121,8,'27.125.207.248','default',NULL,'2025-05-29 06:45:35'),(122,8,'27.125.207.249','default',NULL,'2025-05-29 06:45:35'),(123,8,'27.125.207.250','default',NULL,'2025-05-29 06:45:35'),(124,8,'27.125.207.251','default',NULL,'2025-05-29 06:45:35'),(125,8,'27.125.207.252','default',NULL,'2025-05-29 06:45:35'),(126,8,'27.125.207.253','default',NULL,'2025-05-29 06:45:35'),(127,8,'27.125.207.254','default',NULL,'2025-05-29 06:45:35'),(128,8,'27.125.207.255','default',NULL,'2025-05-29 06:45:35'); +/*!40000 ALTER TABLE `ipinfo` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `lineinfo` +-- + +DROP TABLE IF EXISTS `lineinfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `lineinfo` ( + `uid` int(11) NOT NULL AUTO_INCREMENT, + `clientinfo_uid` int(11) DEFAULT NULL COMMENT '소유자정보', + `type` varchar(20) NOT NULL COMMENT '회선구분', + `title` varchar(100) NOT NULL, + `bandwith` varchar(20) NOT NULL COMMENT 'IP 대역', + `status` varchar(20) NOT NULL DEFAULT 'default', + `start_at` date DEFAULT NULL COMMENT '개통일', + `updated_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`uid`), + UNIQUE KEY `UQ_title` (`title`), + KEY `FK_clientinfo_TO_lineinfo` (`clientinfo_uid`), + CONSTRAINT `FK_clientinfo_TO_lineinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`) +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='회선 정보'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `lineinfo` +-- + +LOCK TABLES `lineinfo` WRITE; +/*!40000 ALTER TABLE `lineinfo` DISABLE KEYS */; +INSERT INTO `lineinfo` VALUES (8,NULL,'default','Softbank회선','27.125.207.128/25','default','2025-05-01','2025-06-03 03:26:52','2025-05-29 06:45:34'); +/*!40000 ALTER TABLE `lineinfo` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `logger` +-- + +DROP TABLE IF EXISTS `logger`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `logger` ( + `uid` int(11) NOT NULL AUTO_INCREMENT, + `user_uid` int(11) NOT NULL, + `class_name` varchar(255) DEFAULT NULL, + `method_name` varchar(255) DEFAULT NULL, + `title` varchar(255) NOT NULL, + `content` text NOT NULL, + `status` varchar(20) DEFAULT 'default', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`uid`), + KEY `FK_user_TO_logger` (`user_uid`), + CONSTRAINT `FK_user_TO_logger` FOREIGN KEY (`user_uid`) REFERENCES `user` (`uid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='작업 기록 로그'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `logger` +-- + +LOCK TABLES `logger` WRITE; +/*!40000 ALTER TABLE `logger` DISABLE KEYS */; +/*!40000 ALTER TABLE `logger` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `paymentinfo` +-- + +DROP TABLE IF EXISTS `paymentinfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `paymentinfo` ( + `uid` int(11) NOT NULL AUTO_INCREMENT, + `invoiceinfo_uid` int(11) NOT NULL, + `alias` varchar(50) NOT NULL COMMENT '결제자명', + `type` varchar(20) NOT NULL COMMENT '결제방식', + `amount` int(11) NOT NULL DEFAULT 0 COMMENT '결제금액', + `paid_at` date DEFAULT NULL COMMENT '결제일', + `updated_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`uid`), + KEY `FK_invoiceinfo_TO_paymentinfo` (`invoiceinfo_uid`), + CONSTRAINT `FK_invoiceinfo_TO_paymentinfo` FOREIGN KEY (`invoiceinfo_uid`) REFERENCES `invoiceinfo` (`uid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='결제정보'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `paymentinfo` +-- + +LOCK TABLES `paymentinfo` WRITE; +/*!40000 ALTER TABLE `paymentinfo` DISABLE KEYS */; +/*!40000 ALTER TABLE `paymentinfo` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `pointinfo` +-- + +DROP TABLE IF EXISTS `pointinfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `pointinfo` ( + `uid` int(11) NOT NULL AUTO_INCREMENT, + `clientinfo_uid` int(11) NOT NULL, + `title` varchar(255) NOT NULL, + `amount` int(11) NOT NULL DEFAULT 0 COMMENT '압출금액', + `status` varchar(20) NOT NULL DEFAULT 'default', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`uid`), + KEY `FK_clientinfo_TO_pointinfo` (`clientinfo_uid`), + CONSTRAINT `FK_clientinfo_TO_pointinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='포인트정보'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `pointinfo` +-- + +LOCK TABLES `pointinfo` WRITE; +/*!40000 ALTER TABLE `pointinfo` DISABLE KEYS */; +INSERT INTO `pointinfo` VALUES (1,3,'5월포인트입금',100000,'default','2025-05-29 06:10:41'),(2,3,'5월포인트출금',50000,'out','2025-05-29 06:10:55'); +/*!40000 ALTER TABLE `pointinfo` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `raminfo` +-- + +DROP TABLE IF EXISTS `raminfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `raminfo` ( + `uid` int(11) NOT NULL AUTO_INCREMENT, + `model` varchar(50) NOT NULL, + `status` varchar(20) NOT NULL DEFAULT 'default', + `updated_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`uid`), + UNIQUE KEY `UQ_model` (`model`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='RAM 정보'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `raminfo` +-- + +LOCK TABLES `raminfo` WRITE; +/*!40000 ALTER TABLE `raminfo` DISABLE KEYS */; +INSERT INTO `raminfo` VALUES (1,'ECC 2G','default',NULL,'2025-06-02 07:53:26'),(2,'ECC 4G','default',NULL,'2025-06-02 07:53:40'),(3,'ECC 8G','default',NULL,'2025-06-02 07:54:04'),(4,'ECC 16G','default',NULL,'2025-06-02 07:54:18'),(5,'ECC 32G','default',NULL,'2025-06-02 07:54:36'); +/*!40000 ALTER TABLE `raminfo` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `serverinfo` +-- + +DROP TABLE IF EXISTS `serverinfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `serverinfo` ( + `uid` int(11) NOT NULL AUTO_INCREMENT, + `model` varchar(50) NOT NULL, + `description` text DEFAULT NULL, + `status` varchar(20) NOT NULL DEFAULT 'default', + `updated_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`uid`), + UNIQUE KEY `UQ_uid` (`uid`) +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COMMENT='서버정보'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `serverinfo` +-- + +LOCK TABLES `serverinfo` WRITE; +/*!40000 ALTER TABLE `serverinfo` DISABLE KEYS */; +INSERT INTO `serverinfo` VALUES (3,'HP DL360 Gen 6',NULL,'default',NULL,'2025-06-02 03:27:07'),(4,'HP DL360 Gen 7',NULL,'default',NULL,'2025-06-02 03:28:06'),(5,'HP DL360 Gen 8',NULL,'default',NULL,'2025-06-02 03:28:35'),(6,'3,4,5세대 PC',NULL,'default',NULL,'2025-06-02 03:29:22'),(7,'6,7,8세대 PC',NULL,'default',NULL,'2025-06-02 03:29:55'),(8,'12,13,14세대 MiniPC',NULL,'default','2025-06-03 03:27:21','2025-06-02 03:30:31'),(9,'HP DL360 Gen 9',NULL,'default','2025-06-03 03:27:07','2025-06-02 08:36:15'); +/*!40000 ALTER TABLE `serverinfo` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `serviceinfo` +-- + +DROP TABLE IF EXISTS `serviceinfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `serviceinfo` ( + `uid` int(11) NOT NULL AUTO_INCREMENT, + `clientinfo_uid` int(11) NOT NULL, + `ownerinfo_uid` int(11) NOT NULL, + `title` varchar(255) NOT NULL, + `switch` varchar(20) NOT NULL, + `code` varchar(20) NOT NULL, + `location` varchar(20) DEFAULT NULL, + `type` varchar(20) NOT NULL, + `raid` varchar(20) NOT NULL, + `billing_at` date NOT NULL COMMENT '청구일', + `start_at` date NOT NULL COMMENT '시작일', + `end_at` date DEFAULT NULL COMMENT '종료일', + `status` varchar(20) NOT NULL DEFAULT 'default' COMMENT '상태', + `updated_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`uid`), + UNIQUE KEY `UQ_title` (`title`), + KEY `FK_clientinfo_TO_serviceinfo` (`clientinfo_uid`), + CONSTRAINT `FK_clientinfo_TO_serviceinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='서비스정보'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `serviceinfo` +-- + +LOCK TABLES `serviceinfo` WRITE; +/*!40000 ALTER TABLE `serviceinfo` DISABLE KEYS */; +INSERT INTO `serviceinfo` VALUES (1,1,1,'TEST111 서비스1','R45P20','MP370','tokyo','defence','RAID1','2025-06-25','2025-06-02','2025-06-25','default','2025-06-10 10:20:51','2025-06-02 03:37:30'),(2,2,3,'Test2222 서비스명','R45P20','JPN130','default','default','default','2025-06-25','2025-06-04','2025-06-30','default','2025-06-10 08:11:11','2025-06-09 08:23:13'); +/*!40000 ALTER TABLE `serviceinfo` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `serviceinfo_history` +-- + +DROP TABLE IF EXISTS `serviceinfo_history`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `serviceinfo_history` ( + `uid` int(11) NOT NULL AUTO_INCREMENT, + `serviceinfo_uid` int(11) NOT NULL, + `title` varchar(255) NOT NULL, + `description` text DEFAULT NULL, + `status` varchar(20) NOT NULL DEFAULT 'default' COMMENT '상태', + `updated_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`uid`), + KEY `FK_serviceinfo_TO_serviceinfo_history` (`serviceinfo_uid`), + CONSTRAINT `FK_serviceinfo_TO_serviceinfo_history` FOREIGN KEY (`serviceinfo_uid`) REFERENCES `serviceinfo` (`uid`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='서비스정보_history'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `serviceinfo_history` +-- + +LOCK TABLES `serviceinfo_history` WRITE; +/*!40000 ALTER TABLE `serviceinfo_history` DISABLE KEYS */; +INSERT INTO `serviceinfo_history` VALUES (1,2,'히스토리1111','
히스토리1111
히스토리1111
히스토리222
히스토리222
히스토리12222
히스토리12222
히스토리22222222
히스토리22222222