-- MySQL dump 10.19  Distrib 10.3.28-MariaDB, for Linux (x86_64)
--
-- Host: localhost    Database: dbmsv2
-- ------------------------------------------------------
-- 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 COMMENT '고객정보',
  `userinfo_uid` int(11) NOT NULL COMMENT '관리자정보',
  `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',
  `updated_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `FK_clientinfo_TO_accountinfo` (`clientinfo_uid`),
  KEY `FK_user_TO_accountinfo` (`userinfo_uid`),
  CONSTRAINT `FK_clientinfo_TO_accountinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`),
  CONSTRAINT `FK_user_TO_accountinfo` FOREIGN KEY (`userinfo_uid`) REFERENCES `user` (`uid`)
) ENGINE=InnoDB 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 */;
/*!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,
  `user_uid` int(11) NOT NULL COMMENT '관리자정보',
  `code` varchar(20) DEFAULT NULL COMMENT 'client코드',
  `role` varchar(50) NOT NULL DEFAULT 'user',
  `name` varchar(100) NOT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `email` varchar(50) NOT NULL,
  `history` text DEFAULT NULL COMMENT 'history',
  `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(),
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `UQ_name` (`name`),
  UNIQUE KEY `UQ_code` (`code`),
  KEY `FK_user_TO_clientinfo` (`user_uid`),
  CONSTRAINT `FK_user_TO_clientinfo` 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 `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 COMMENT '고객정보',
  `userinfo_uid` int(11) NOT NULL COMMENT '관리자정보',
  `title` varchar(100) NOT NULL,
  `amount` 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(),
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `FK_clientinfo_TO_couponinfo` (`clientinfo_uid`),
  KEY `FK_user_TO_couponinfo` (`userinfo_uid`),
  CONSTRAINT `FK_clientinfo_TO_couponinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`),
  CONSTRAINT `FK_user_TO_couponinfo` FOREIGN KEY (`userinfo_uid`) REFERENCES `user` (`uid`)
) ENGINE=InnoDB 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 */;
/*!40000 ALTER TABLE `couponinfo` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `csinfo`
--

DROP TABLE IF EXISTS `csinfo`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `csinfo` (
  `uid` int(11) NOT NULL AUTO_INCREMENT,
  `serverinfo_uid` int(11) NOT NULL COMMENT '서버코드',
  `type` varchar(20) NOT NULL,
  `ip` varchar(50) DEFAULT NULL,
  `accountid` varchar(50) DEFAULT NULL,
  `domain` varchar(100) DEFAULT NULL,
  `price` 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(),
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `UQ_uid` (`uid`),
  KEY `FK_serverinfo_TO_csinfo` (`serverinfo_uid`),
  CONSTRAINT `FK_serverinfo_TO_csinfo` FOREIGN KEY (`serverinfo_uid`) REFERENCES `serverinfo` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='VPN/CS정보';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `csinfo`
--

LOCK TABLES `csinfo` WRITE;
/*!40000 ALTER TABLE `csinfo` DISABLE KEYS */;
/*!40000 ALTER TABLE `csinfo` 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,
  `serverinfo_uid` int(11) NOT NULL COMMENT '서버코드',
  `domain` varchar(20) NOT NULL,
  `price` 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(),
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `UQ_domain` (`domain`),
  KEY `FK_serverinfo_TO_domaininfo` (`serverinfo_uid`),
  CONSTRAINT `FK_serverinfo_TO_domaininfo` FOREIGN KEY (`serverinfo_uid`) REFERENCES `serverinfo` (`uid`)
) ENGINE=InnoDB 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 */;
/*!40000 ALTER TABLE `domaininfo` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `iteminfo`
--

DROP TABLE IF EXISTS `iteminfo`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `iteminfo` (
  `uid` int(11) NOT NULL AUTO_INCREMENT,
  `item_type` varchar(20) NOT NULL COMMENT '항목형식(CPU,RAM,DISK)',
  `model` varchar(50) DEFAULT NULL,
  `price` 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(),
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `UQ_model` (`model`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='항목 정보';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `iteminfo`
--

LOCK TABLES `iteminfo` WRITE;
/*!40000 ALTER TABLE `iteminfo` DISABLE KEYS */;
/*!40000 ALTER TABLE `iteminfo` 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,
  `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(),
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `UQ_title` (`title`)
) ENGINE=InnoDB 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 */;
/*!40000 ALTER TABLE `lineinfo` 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 COMMENT '고객정보',
  `userinfo_uid` int(11) NOT NULL COMMENT '관리자정보',
  `title` varchar(255) NOT NULL,
  `amount` 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(),
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `FK_clientinfo_TO_pointinfo` (`clientinfo_uid`),
  KEY `FK_user_TO_pointinfo` (`userinfo_uid`),
  CONSTRAINT `FK_clientinfo_TO_pointinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`),
  CONSTRAINT `FK_user_TO_pointinfo` FOREIGN KEY (`userinfo_uid`) REFERENCES `user` (`uid`)
) ENGINE=InnoDB 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 */;
/*!40000 ALTER TABLE `pointinfo` 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,
  `serviceinfo_uid` int(11) DEFAULT NULL COMMENT '서비스코드',
  `clientinfo_uid` int(11) DEFAULT NULL COMMENT '고객정보',
  `clientinfo_name` varchar(255) NOT NULL COMMENT '사용자명(검색용)',
  `code` varchar(20) NOT NULL COMMENT '서버코드',
  `model` varchar(50) NOT NULL,
  `raid` varchar(20) NOT NULL,
  `description` text DEFAULT NULL,
  `price` int(11) NOT NULL DEFAULT 0 COMMENT '소비자금액',
  `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(),
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `UQ_uid` (`uid`),
  UNIQUE KEY `UQ_code` (`code`),
  KEY `FK_serviceinfo_TO_serverinfo` (`serviceinfo_uid`),
  KEY `FK_clientinfo_TO_serverinfo` (`clientinfo_uid`),
  CONSTRAINT `FK_clientinfo_TO_serverinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`),
  CONSTRAINT `FK_serviceinfo_TO_serverinfo` FOREIGN KEY (`serviceinfo_uid`) REFERENCES `serviceinfo` (`uid`)
) ENGINE=InnoDB 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 */;
/*!40000 ALTER TABLE `serverinfo` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `serverinfo_iteminfo`
--

DROP TABLE IF EXISTS `serverinfo_iteminfo`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `serverinfo_iteminfo` (
  `uid` int(11) NOT NULL AUTO_INCREMENT,
  `serverinfo_uid` int(11) NOT NULL,
  `softwareinfo_uid` int(11) NOT NULL,
  PRIMARY KEY (`uid`),
  KEY `FK_iteminfo_TO_serverinfo_iteminfo` (`softwareinfo_uid`),
  KEY `FK_serverinfo_TO_serverinfo_iteminfo` (`serverinfo_uid`),
  CONSTRAINT `FK_iteminfo_TO_serverinfo_iteminfo` FOREIGN KEY (`softwareinfo_uid`) REFERENCES `iteminfo` (`uid`),
  CONSTRAINT `FK_serverinfo_TO_serverinfo_iteminfo` FOREIGN KEY (`serverinfo_uid`) REFERENCES `serverinfo` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='서버정보-항목정보';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `serverinfo_iteminfo`
--

LOCK TABLES `serverinfo_iteminfo` WRITE;
/*!40000 ALTER TABLE `serverinfo_iteminfo` DISABLE KEYS */;
/*!40000 ALTER TABLE `serverinfo_iteminfo` 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,
  `user_uid` int(11) NOT NULL COMMENT '관리자정보',
  `clientinfo_uid` int(11) NOT NULL COMMENT '고객정보',
  `clientinfo_name` varchar(255) NOT NULL COMMENT '사용자명(검색용)',
  `code` varchar(20) NOT NULL COMMENT '서비스코드',
  `type` varchar(20) NOT NULL COMMENT '서비스형식',
  `location` varchar(20) DEFAULT NULL COMMENT '지역코드',
  `billing_at` date NOT NULL COMMENT '청구일',
  `start_at` date NOT NULL COMMENT '시작일',
  `end_at` date DEFAULT NULL COMMENT '종료일',
  `history` text DEFAULT NULL COMMENT 'history',
  `status` varchar(20) NOT NULL DEFAULT 'default' COMMENT '상태',
  `updated_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `UQ_code` (`code`),
  KEY `FK_clientinfo_TO_serviceinfo` (`clientinfo_uid`),
  KEY `FK_user_TO_serviceinfo` (`user_uid`),
  CONSTRAINT `FK_clientinfo_TO_serviceinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`),
  CONSTRAINT `FK_user_TO_serviceinfo` FOREIGN KEY (`user_uid`) REFERENCES `user` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='서비스정보';
/*!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_payment`
--

DROP TABLE IF EXISTS `serviceinfo_payment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `serviceinfo_payment` (
  `uid` int(11) NOT NULL AUTO_INCREMENT,
  `serviceinfo_uid` int(11) NOT NULL COMMENT '서비스정보',
  `user_uid` int(11) NOT NULL COMMENT '관리자정보',
  `item_type` varchar(20) NOT NULL COMMENT '항목형식(CPU,RAM,DISK,SW,IP,DNS,CS)',
  `item_uid` int(11) NOT NULL COMMENT '항목정보',
  `item_title` varchar(255) NOT NULL COMMENT '항목명(각항목의 Title 검색용)',
  `billing_cycle` varchar(20) NOT NULL COMMENT '지불방식(MONTH,DAYLY,COUPON)',
  `amount` int(11) NOT NULL DEFAULT 0 COMMENT '지불금액',
  `billing_at` date DEFAULT NULL COMMENT '지급기한일',
  `issue_at` date DEFAULT NULL COMMENT '발행일',
  `status` varchar(20) NOT NULL DEFAULT 'default' COMMENT '상태(PAID,UNPAID)',
  `updated_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  KEY `FK_serviceinfo_TO_serviceinfo_payment` (`serviceinfo_uid`),
  KEY `FK_user_TO_serviceinfo_payment` (`user_uid`),
  CONSTRAINT `FK_serviceinfo_TO_serviceinfo_payment` FOREIGN KEY (`serviceinfo_uid`) REFERENCES `serviceinfo` (`uid`),
  CONSTRAINT `FK_user_TO_serviceinfo_payment` 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 `serviceinfo_payment`
--

LOCK TABLES `serviceinfo_payment` WRITE;
/*!40000 ALTER TABLE `serviceinfo_payment` DISABLE KEYS */;
/*!40000 ALTER TABLE `serviceinfo_payment` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `switchinfo`
--

DROP TABLE IF EXISTS `switchinfo`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `switchinfo` (
  `uid` int(11) NOT NULL AUTO_INCREMENT,
  `serverinfo_uid` int(11) NOT NULL COMMENT '서버코드',
  `code` varchar(20) NOT NULL COMMENT 'switch코드',
  `status` varchar(20) NOT NULL DEFAULT 'default',
  `updated_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `UQ_code` (`code`),
  KEY `FK_serverinfo_TO_switchinfo` (`serverinfo_uid`),
  CONSTRAINT `FK_serverinfo_TO_switchinfo` FOREIGN KEY (`serverinfo_uid`) REFERENCES `serverinfo` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='스위치코드표';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `switchinfo`
--

LOCK TABLES `switchinfo` WRITE;
/*!40000 ALTER TABLE `switchinfo` DISABLE KEYS */;
/*!40000 ALTER TABLE `switchinfo` 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,
  `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(),
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `UQ_id` (`id`),
  UNIQUE KEY `UQ_email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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-08-14 18:00:11
