/*!999999\- enable the sandbox mode */ -- MariaDB dump 10.19 Distrib 10.5.25-MariaDB, for Win64 (AMD64) -- -- Host: localhost Database: dbms -- ------------------------------------------------------ -- Server version 10.5.25-MariaDB /*!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 utf8mb4 */; /*!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 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='예치금계좌'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `accountinfo` -- LOCK TABLES `accountinfo` WRITE; /*!40000 ALTER TABLE `accountinfo` DISABLE KEYS */; /*!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 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='고객정보'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `clientinfo` -- LOCK TABLES `clientinfo` WRITE; /*!40000 ALTER TABLE `clientinfo` DISABLE KEYS */; /*!40000 ALTER TABLE `clientinfo` 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 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='쿠폰정보'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `couponinfo` -- LOCK TABLES `couponinfo` WRITE; /*!40000 ALTER TABLE `couponinfo` DISABLE KEYS */; /*!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, `price` int(11) NOT NULL DEFAULT 0, `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 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci 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 */; /*!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, `price` int(11) NOT NULL DEFAULT 0, `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 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci 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 */; /*!40000 ALTER TABLE `defenceinfo` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `storageinfo` -- DROP TABLE IF EXISTS `storageinfo`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `storageinfo` ( `uid` int(11) NOT NULL AUTO_INCREMENT, `model` varchar(50) NOT NULL, `price` int(11) NOT NULL DEFAULT 0, `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 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='DISK 정보'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `storageinfo` -- LOCK TABLES `storageinfo` WRITE; /*!40000 ALTER TABLE `storageinfo` DISABLE KEYS */; /*!40000 ALTER TABLE `storageinfo` 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, `expired_at` date NOT NULL COMMENT '종료일', `price` int(11) NOT NULL DEFAULT 0, `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 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='도메인 정보'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `domaininfo` -- LOCK TABLES `domaininfo` WRITE; /*!40000 ALTER TABLE `domaininfo` DISABLE KEYS */; /*!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 COLLATE=utf8_general_ci 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 COLLATE=utf8_general_ci 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, `price` int(11) NOT NULL DEFAULT 50000, `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 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci 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 */; /*!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 대역', `price` int(11) NOT NULL DEFAULT 0, `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 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='회선 정보'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `lineinfo` -- LOCK TABLES `lineinfo` WRITE; /*!40000 ALTER TABLE `lineinfo` DISABLE KEYS */; /*!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 COLLATE=utf8_general_ci 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 COLLATE=utf8_general_ci 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 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='포인트정보'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `pointinfo` -- LOCK TABLES `pointinfo` WRITE; /*!40000 ALTER TABLE `pointinfo` DISABLE KEYS */; /*!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, `price` int(11) NOT NULL DEFAULT 0, `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 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci 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 */; /*!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, `clientinfo_uid` int(11) DEFAULT NULL COMMENT '소유자정보', `code` varchar(20) NOT NULL, `model` varchar(50) NOT NULL, `price` int(11) NOT NULL DEFAULT 0, `description` text DEFAULT NULL, `status` varchar(20) NOT NULL DEFAULT 'default', `manufactur_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '제조일', `updated_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT current_timestamp(), PRIMARY KEY (`uid`), UNIQUE KEY `UQ_uid` (`uid`), UNIQUE KEY `UQ_code` (`code`), UNIQUE KEY `UQ_model` (`model`), KEY `FK_clientinfo_TO_serverinfo` (`clientinfo_uid`), CONSTRAINT `FK_clientinfo_TO_serverinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='서버정보'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `serverinfo` -- LOCK TABLES `serverinfo` WRITE; /*!40000 ALTER TABLE `serverinfo` DISABLE KEYS */; /*!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, `switch` 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`), KEY `FK_clientinfo_TO_serviceinfo` (`clientinfo_uid`), CONSTRAINT `FK_clientinfo_TO_serviceinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='서비스정보'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `serviceinfo` -- LOCK TABLES `serviceinfo` WRITE; /*!40000 ALTER TABLE `serviceinfo` DISABLE KEYS */; /*!40000 ALTER TABLE `serviceinfo` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `serviceinfo_items` -- DROP TABLE IF EXISTS `serviceinfo_items`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `serviceinfo_items` ( `uid` int(11) NOT NULL AUTO_INCREMENT, `serviceinfo_uid` int(11) NOT NULL, `item_type` varchar(20) NOT NULL, `item_uid` int(11) NOT NULL, `billing_cyle` varchar(20) NOT NULL, `price` int(11) NOT NULL DEFAULT 0 COMMENT '소비자금액', `amount` int(11) NOT NULL DEFAULT 0 COMMENT '청구금액', `start_at` date DEFAULT 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`), KEY `FK_serviceinfo_TO_serviceinfo_items` (`serviceinfo_uid`), CONSTRAINT `FK_serviceinfo_TO_serviceinfo_items` FOREIGN KEY (`serviceinfo_uid`) REFERENCES `serviceinfo` (`uid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='서비스Item정보'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `serviceinfo_items` -- LOCK TABLES `serviceinfo_items` WRITE; /*!40000 ALTER TABLE `serviceinfo_items` DISABLE KEYS */; /*!40000 ALTER TABLE `serviceinfo_items` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `softwareinfo` -- DROP TABLE IF EXISTS `softwareinfo`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `softwareinfo` ( `uid` int(11) NOT NULL AUTO_INCREMENT, `type` varchar(20) NOT NULL, `model` varchar(50) NOT NULL, `price` int(11) NOT NULL DEFAULT 0, `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_model` (`model`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='소프트웨어 정보'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `softwareinfo` -- LOCK TABLES `softwareinfo` WRITE; /*!40000 ALTER TABLE `softwareinfo` DISABLE KEYS */; /*!40000 ALTER TABLE `softwareinfo` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `user` -- DROP TABLE IF EXISTS `user`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `user` ( `uid` int(11) NOT NULL AUTO_INCREMENT, `id` varchar(20) NOT NULL, `passwd` varchar(255) NOT NULL, `name` varchar(20) NOT NULL, `email` varchar(50) NOT NULL, `mobile` varchar(20) DEFAULT NULL, `role` varchar(50) DEFAULT NULL, `status` varchar(20) DEFAULT 'default', `updated_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT current_timestamp(), PRIMARY KEY (`uid`), UNIQUE KEY `UQ_id` (`id`), UNIQUE KEY `UQ_email` (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='관리자정보'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `user` -- LOCK TABLES `user` WRITE; /*!40000 ALTER TABLE `user` DISABLE KEYS */; /*!40000 ALTER TABLE `user` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2025-06-02 11:51:35