dbmsv4 init...3

This commit is contained in:
최준흠 2025-12-22 16:52:54 +09:00
parent b0b4acc531
commit 557a9f6432
8 changed files with 23 additions and 784 deletions

View File

@ -10,7 +10,6 @@ use App\Libraries\DBMigration\Process\ClientProcess;
use App\Libraries\DBMigration\Process\LineProcess; use App\Libraries\DBMigration\Process\LineProcess;
use App\Libraries\DBMigration\Process\ServerCodeProcess; use App\Libraries\DBMigration\Process\ServerCodeProcess;
use App\Libraries\DBMigration\Process\SWITCHCodeProcess; use App\Libraries\DBMigration\Process\SWITCHCodeProcess;
use App\Libraries\DBMigration\Process\PartCodeProcess;
abstract class BaseSource extends DBMigration abstract class BaseSource extends DBMigration
{ {
@ -97,7 +96,8 @@ abstract class BaseSource extends DBMigration
$this->execute( $this->execute(
new ClientProcess($this->getTargetDB()), new ClientProcess($this->getTargetDB()),
$this->getClient(), $this->getClient(),
__FUNCTION__ __FUNCTION__,
$this->getDBName()
); );
} }
@ -106,7 +106,8 @@ abstract class BaseSource extends DBMigration
$this->execute( $this->execute(
new LineProcess($this->getTargetDB()), new LineProcess($this->getTargetDB()),
$this->getLine(), $this->getLine(),
__FUNCTION__ __FUNCTION__,
$this->getDBName()
); );
} }
@ -115,7 +116,8 @@ abstract class BaseSource extends DBMigration
$this->execute( $this->execute(
new ServerCodeProcess($this->getTargetDB()), new ServerCodeProcess($this->getTargetDB()),
$this->getServerCode(), $this->getServerCode(),
__FUNCTION__ __FUNCTION__,
$this->getDBName()
); );
} }
@ -124,7 +126,8 @@ abstract class BaseSource extends DBMigration
$this->execute( $this->execute(
new SWITCHCodeProcess($this->getTargetDB()), new SWITCHCodeProcess($this->getTargetDB()),
$this->getSWITCHCode(), $this->getSWITCHCode(),
__FUNCTION__ __FUNCTION__,
$this->getDBName()
); );
} }
} }

View File

@ -34,20 +34,21 @@ abstract class DBMigration extends BaseController
/** /**
* 공통 마이그레이션 처리 로직 * 공통 마이그레이션 처리 로직
*/ */
final protected function execute(MigrationProcessInterface $processor, array $rows, string $functionName): void final protected function execute(MigrationProcessInterface $processor, array $rows, string $functionName, string $site): void
{ {
$this->getTargetDB()->transStart(); $this->getTargetDB()->transStart();
$total = count($rows);
$cnt = 1;
try { try {
$cnt = 1;
foreach ($rows as $row) { foreach ($rows as $row) {
$processor->process($row, $cnt); $processor->process($site, $row, $cnt);
echo "{$site} => {$cnt} 번째/{$total} => {$functionName} 작업을 완료하였습니다.";
$cnt++; $cnt++;
} }
echo "{$functionName} 작업을 완료하였습니다.";
$this->getTargetDB()->transCommit(); $this->getTargetDB()->transCommit();
} catch (\Exception $e) { } catch (\Exception $e) {
$this->getTargetDB()->transRollback(); $this->getTargetDB()->transRollback();
echo "{$functionName} 작업을 실패하였습니다.\n--------------\n" . $e->getMessage() . "\n--------------\n"; echo "{$site} => {$cnt} 번째/{$total} {$functionName} 작업을 실패하였습니다.\n--------------\n" . $e->getMessage() . "\n--------------\n";
} }
} }
} }

View File

@ -12,10 +12,10 @@ class ClientProcess implements MigrationProcessInterface
$this->db = $db; $this->db = $db;
} }
public function process(array $row, int $cnt): void public function process(string $site, array $row, int $cnt): void
{ {
$temps = []; $temps = [];
$temps['site'] = 'prime'; $temps['site'] = $site;
$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

@ -11,7 +11,7 @@ class LineProcess implements MigrationProcessInterface
{ {
$this->db = $db; $this->db = $db;
} }
public function process(array $row, int $cnt): void public function process(string $site, array $row, int $cnt): void
{ {
$temps = []; $temps = [];
$temps['code'] = $row['Line_Code']; $temps['code'] = $row['Line_Code'];

View File

@ -4,5 +4,5 @@ namespace App\Libraries\DBMigration\Process;
interface MigrationProcessInterface interface MigrationProcessInterface
{ {
public function process(array $row, int $cnt): void; public function process(string $site, array $row, int $cnt): void;
} }

View File

@ -11,11 +11,12 @@ class ServerCodeProcess implements MigrationProcessInterface
{ {
$this->db = $db; $this->db = $db;
} }
public function process(array $row, int $cnt): void public function process(string $site, array $row, int $cnt): void
{ {
$temps = []; $temps = [];
$temps['code'] = trim($row['server_code']); $temps['code'] = trim($row['server_code']);
$temps['status'] = 'default'; $temps['amount'] = trim($row['server_disuse_date']) === 'y' ? 0 : intval($row['server_cost']);
$temps['status'] = trim($row['server_disuse_date']) === 'y' ? STATUS['AVAILABLE'] : STATUS['OCCUPIED'];
if (!$this->db->table('codeinfo')->insert($temps)) { if (!$this->db->table('codeinfo')->insert($temps)) {
throw new \Exception($this->db->error()['message']); throw new \Exception($this->db->error()['message']);
} }

View File

@ -2,7 +2,6 @@
namespace App\Libraries\DBMigration\Process; namespace App\Libraries\DBMigration\Process;
use App\Entities\Part\SWITCHEntity;
use CodeIgniter\Database\BaseConnection; use CodeIgniter\Database\BaseConnection;
class SwitchCodeProcess implements MigrationProcessInterface class SwitchCodeProcess implements MigrationProcessInterface
@ -12,11 +11,11 @@ class SwitchCodeProcess implements MigrationProcessInterface
{ {
$this->db = $db; $this->db = $db;
} }
public function process(array $row, int $cnt): void public function process(string $site, array $row, int $cnt): void
{ {
$temps = []; $temps = [];
$temps['code'] = trim($row['service_sw']); $temps['code'] = trim($row['service_sw']);
$temps['status'] = SWITCHEntity::DEFAULT_STATUS; // Assuming SWITCHEntity has a STATUS_DEFAULT constant $temps['status'] = STATUS['AVAILABLE']; // Assuming SWITCHEntity has a STATUS_DEFAULT constant
if (!$this->db->table('switchinfo')->insert($temps)) { if (!$this->db->table('switchinfo')->insert($temps)) {
throw new \Exception($this->db->error()['message']); throw new \Exception($this->db->error()['message']);
} }

View File

@ -1,765 +0,0 @@
/*!999999\- enable the sandbox mode */
-- MariaDB dump 10.19 Distrib 10.5.25-MariaDB, for Win64 (AMD64)
--
-- Host: localhost Database: dbmsv4
-- ------------------------------------------------------
-- 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,
`user_uid` int(11) DEFAULT NULL,
`clientinfo_uid` int(11) NOT NULL COMMENT '고객정보',
`bank` varchar(20) DEFAULT NULL,
`title` varchar(255) NOT NULL COMMENT '사유',
`content` text DEFAULT NULL,
`alias` varchar(50) DEFAULT NULL,
`issue_at` date NOT NULL COMMENT '입출금일자',
`amount` int(11) NOT NULL DEFAULT 0 COMMENT '압출금액',
`balance` int(11) NOT NULL DEFAULT 0,
`status` varchar(20) NOT NULL DEFAULT 'deposit',
`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_user_TO_accountinfo` (`user_uid`),
KEY `FK_clientinfo_TO_accountinfo` (`clientinfo_uid`),
CONSTRAINT `FK_clientinfo_TO_accountinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`),
CONSTRAINT `FK_user_TO_accountinfo` 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 `accountinfo`
--
LOCK TABLES `accountinfo` WRITE;
/*!40000 ALTER TABLE `accountinfo` DISABLE KEYS */;
/*!40000 ALTER TABLE `accountinfo` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `boardinfo`
--
DROP TABLE IF EXISTS `boardinfo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `boardinfo` (
`uid` int(11) NOT NULL AUTO_INCREMENT,
`user_uid` int(11) NOT NULL,
`worker_uid` int(11) DEFAULT NULL,
`category` varchar(20) NOT NULL DEFAULT 'notice',
`title` varchar(255) NOT NULL,
`content` text DEFAULT NULL,
`status` varchar(20) NOT NULL DEFAULT 'available',
`updated_at` datetime DEFAULT NULL,
`created_at` datetime DEFAULT current_timestamp(),
`deleted_at` datetime DEFAULT NULL,
PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `boardinfo`
--
LOCK TABLES `boardinfo` WRITE;
/*!40000 ALTER TABLE `boardinfo` DISABLE KEYS */;
/*!40000 ALTER TABLE `boardinfo` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `chassisinfo`
--
DROP TABLE IF EXISTS `chassisinfo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `chassisinfo` (
`uid` int(11) NOT NULL AUTO_INCREMENT COMMENT '새시정보',
`title` varchar(50) NOT NULL,
`price` int(11) NOT NULL DEFAULT 0 COMMENT '기본금액',
`used` int(11) NOT NULL DEFAULT 0 COMMENT '사용',
`stock` int(11) NOT NULL DEFAULT 0 COMMENT '재고',
`status` varchar(20) NOT NULL DEFAULT 'available',
`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 AUTO_INCREMENT=303 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='서버새시';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `chassisinfo`
--
LOCK TABLES `chassisinfo` WRITE;
/*!40000 ALTER TABLE `chassisinfo` DISABLE KEYS */;
INSERT INTO `chassisinfo` VALUES (1,'HP DL360 Gen6 B',350000,0,100,'available',NULL,'2025-10-31 02:28:46',NULL),(2,'HP DL360 Gen7 C',400000,0,100,'available',NULL,'2025-10-31 02:28:46',NULL),(3,'HP DL360 Gen7 D',450000,0,100,'available',NULL,'2025-10-31 02:28:46',NULL),(4,'HP DL360 Gen8 D',450000,0,100,'available',NULL,'2025-10-31 02:28:46',NULL),(5,'HP DL360 Gen8 E',500000,0,100,'available',NULL,'2025-10-31 02:28:46',NULL),(6,'HP DL360 Gen9 E',500000,0,100,'available',NULL,'2025-10-31 02:28:46',NULL),(7,'HP DL360 Gen10 ',550000,0,100,'available',NULL,'2025-10-31 02:28:46',NULL),(8,'Hitach HA3000',550000,0,100,'available',NULL,'2025-10-31 02:28:46',NULL),(101,'데탑 I5 9세대',350000,0,100,'available',NULL,'2025-10-31 02:28:46',NULL),(102,'데탑 I5 10세대',370000,0,100,'available',NULL,'2025-10-31 02:28:46',NULL),(103,'데탑 I5 12세대',380000,0,100,'available',NULL,'2025-10-31 02:28:46',NULL),(111,'데탑 I7 9세대',350000,0,100,'available',NULL,'2025-10-31 02:28:46',NULL),(112,'데탑 I7 10세대',370000,0,100,'available',NULL,'2025-10-31 02:28:46',NULL),(113,'데탑 I7 12세대',380000,0,100,'available',NULL,'2025-10-31 02:28:46',NULL),(201,'Mini I5 12세대',350000,0,100,'available',NULL,'2025-10-31 02:28:46',NULL),(301,'아마존-VPN',150000,0,100,'available',NULL,'2025-10-31 02:28:46',NULL),(302,'KT-VPN',150000,0,100,'available',NULL,'2025-10-31 02:28:46',NULL);
/*!40000 ALTER TABLE `chassisinfo` 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 COMMENT '고객정보',
`user_uid` int(11) NOT NULL COMMENT '관리자정보',
`site` varchar(20) NOT NULL DEFAULT 'prime' COMMENT 'Site구분',
`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 'available',
`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`),
KEY `FK_user_TO_clientinfo` (`user_uid`),
CONSTRAINT `FK_user_TO_clientinfo` 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 `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,
`user_uid` int(11) NOT NULL COMMENT '관리자정보',
`clientinfo_uid` int(11) NOT NULL COMMENT '고객정보',
`title` varchar(255) NOT NULL,
`content` text DEFAULT NULL,
`amount` int(11) NOT NULL DEFAULT 0,
`balance` int(11) NOT NULL DEFAULT 0,
`status` varchar(20) NOT NULL DEFAULT 'deposit',
`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_user_TO_couponinfo` (`user_uid`),
KEY `FK_clientinfo_TO_couponinfo` (`clientinfo_uid`),
CONSTRAINT `FK_clientinfo_TO_couponinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`),
CONSTRAINT `FK_user_TO_couponinfo` 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 `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 COMMENT 'CPU정보',
`title` varchar(50) NOT NULL,
`price` int(11) NOT NULL DEFAULT 0 COMMENT '기본금액',
`used` int(11) NOT NULL DEFAULT 0,
`stock` int(11) NOT NULL DEFAULT 0 COMMENT '재고',
`status` varchar(20) NOT NULL DEFAULT 'available',
`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 AUTO_INCREMENT=13 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 */;
INSERT INTO `cpuinfo` VALUES (1,'Xeon E5530 2.4Ghz 4Core',50000,0,100,'available','2025-10-13 08:00:10','2025-09-25 01:15:29',NULL),(2,'Xeon E5540 2.4Ghz 4Core',50000,0,100,'available','2025-10-02 15:16:14','2025-09-25 01:15:29',NULL),(3,'Xeon X5560 2.8Ghz 8Core',80000,0,100,'available','2025-10-22 09:50:40','2025-09-25 01:15:29',NULL),(4,'Xeon X5650 2.6Ghz 12Core',100000,0,100,'available','2025-10-30 06:33:11','2025-09-25 01:15:29',NULL),(5,'Xeon E5-2690v2 2.6Ghz 12Core',100000,0,100,'available','2025-10-16 06:58:58','2025-09-25 01:15:29',NULL),(6,'Xeon E5-2690v4 3.0Ghz 20Core',150000,0,100,'available','2025-10-22 09:47:49','2025-09-25 01:15:29',NULL),(7,'Intel I5 9세대',100000,0,100,'available','2025-10-28 07:56:29','2025-10-28 04:17:23',NULL),(8,'Intel I5 10세대',100000,0,100,'available','2025-10-28 07:52:09','2025-10-28 04:18:17',NULL),(9,'Intel I5 12세대',100000,0,100,'available','2025-10-28 07:53:17','2025-10-28 04:18:32',NULL),(10,'Intel I7 9세대',100000,0,100,'available',NULL,'2025-10-28 04:18:59',NULL),(11,'Intel I7 10세대',100000,0,100,'available',NULL,'2025-10-28 04:19:19',NULL),(12,'InteL I7 12세대',100000,0,100,'available','2025-10-28 04:20:29','2025-10-28 04:19:44',NULL);
/*!40000 ALTER TABLE `cpuinfo` 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,
`clientinfo_uid` int(11) DEFAULT NULL COMMENT '고객정보',
`serviceinfo_uid` int(11) DEFAULT NULL COMMENT '서비스정보',
`serverinfo_uid` int(11) DEFAULT NULL COMMENT '서버정보',
`type` varchar(20) NOT NULL COMMENT '구분(KCS,VCS)',
`ip` varchar(50) NOT 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 'available',
`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_ip` (`ip`),
KEY `FK_serverinfo_TO_csinfo` (`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 COLLATE=utf8_general_ci COMMENT='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 `diskinfo`
--
DROP TABLE IF EXISTS `diskinfo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `diskinfo` (
`uid` int(11) NOT NULL AUTO_INCREMENT COMMENT 'DISK정보',
`title` varchar(50) NOT NULL,
`price` int(11) NOT NULL DEFAULT 0 COMMENT '기본금액',
`used` int(11) NOT NULL DEFAULT 0,
`stock` int(11) NOT NULL DEFAULT 0 COMMENT '재고',
`format` int(11) NOT NULL DEFAULT 0 COMMENT '포맷수',
`status` varchar(20) NOT NULL DEFAULT 'available',
`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 AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='DISK정보';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `diskinfo`
--
LOCK TABLES `diskinfo` WRITE;
/*!40000 ALTER TABLE `diskinfo` DISABLE KEYS */;
INSERT INTO `diskinfo` VALUES (1,'SATA 128G',50000,0,100,0,'available',NULL,'2025-09-25 01:15:29',NULL),(2,'SATA 256G',70000,0,100,0,'available',NULL,'2025-09-25 01:15:29',NULL),(3,'SATA 512G',90000,0,100,0,'available',NULL,'2025-09-25 01:15:29',NULL),(4,'SAS 128G',60000,0,100,0,'available','2025-10-28 07:53:37','2025-09-25 01:15:29',NULL),(5,'SAS 256G',80000,0,100,0,'available',NULL,'2025-09-25 01:15:29',NULL),(6,'SAS 512G',100000,0,100,0,'available','2025-10-28 07:56:51','2025-09-25 01:15:29',NULL),(7,'SSD 128G',60000,0,100,0,'available','2025-10-30 06:48:21','2025-09-25 01:15:29',NULL),(8,'SSD 256G',80000,0,100,0,'available','2025-10-30 06:42:21','2025-09-25 01:15:29',NULL),(9,'SSD 512G',100000,0,100,0,'available','2025-10-30 06:42:06','2025-09-25 01:15:29',NULL),(10,'SSD 1T',120000,0,100,0,'available','2025-10-06 08:31:15','2025-09-25 01:15:29',NULL),(11,'SSD 2T',150000,0,100,0,'available','2025-10-06 08:25:57','2025-09-25 01:15:29',NULL),(12,'NVME 512G',120000,0,100,0,'available','2025-10-02 14:17:18','2025-09-25 01:15:29',NULL),(13,'NVME 1T',150000,0,100,0,'available','2025-10-30 08:09:16','2025-09-25 01:15:29',NULL),(14,'NVME 2T',180000,0,100,0,'available','2025-10-02 14:17:07','2025-09-25 01:15:29',NULL);
/*!40000 ALTER TABLE `diskinfo` 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 COMMENT 'IP정보',
`lineinfo_uid` int(11) NOT NULL COMMENT '회선정보',
`old_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 '서버정보',
`ip` char(16) NOT NULL,
`price` int(11) NOT NULL DEFAULT 0 COMMENT '기본금액',
`status` varchar(20) NOT NULL DEFAULT 'available',
`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_ip` (`ip`),
KEY `FK_lineinfo_TO_ipinfo` (`lineinfo_uid`),
KEY `FK_clientinfo_TO_ipinfo` (`clientinfo_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_ipinfo1` FOREIGN KEY (`old_clientinfo_uid`) REFERENCES `clientinfo` (`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_serviceinfo_TO_ipinfo` FOREIGN KEY (`serviceinfo_uid`) REFERENCES `serviceinfo` (`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 COMMENT '회선정보',
`type` varchar(20) NOT NULL COMMENT '회선구분',
`title` varchar(100) NOT NULL,
`bandwith` varchar(20) NOT NULL COMMENT 'IP 대역',
`start_at` date DEFAULT NULL COMMENT '개통일',
`end_at` date DEFAULT NULL COMMENT '해지일',
`status` varchar(20) NOT NULL DEFAULT 'available',
`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 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 `mylog`
--
DROP TABLE IF EXISTS `mylog`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mylog` (
`uid` int(11) NOT NULL AUTO_INCREMENT,
`user_uid` int(11) DEFAULT NULL,
`title` varchar(255) NOT NULL,
`content` text DEFAULT NULL,
`status` varchar(20) NOT NULL DEFAULT 'available',
`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_user_TO_user_history` (`user_uid`),
CONSTRAINT `FK_user_TO_user_history` 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 `mylog`
--
LOCK TABLES `mylog` WRITE;
/*!40000 ALTER TABLE `mylog` DISABLE KEYS */;
/*!40000 ALTER TABLE `mylog` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `payment`
--
DROP TABLE IF EXISTS `payment`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `payment` (
`uid` int(11) NOT NULL AUTO_INCREMENT,
`user_uid` int(11) NOT NULL,
`clientinfo_uid` int(11) NOT NULL COMMENT '고객정보',
`serviceinfo_uid` int(11) DEFAULT NULL,
`serverpartinfo_uid` int(11) DEFAULT NULL,
`title` varchar(255) NOT NULL,
`content` text DEFAULT NULL,
`amount` int(11) NOT NULL DEFAULT 0 COMMENT '청구금액',
`billing` varchar(20) NOT NULL COMMENT '청구방법(month,onetime)',
`billing_month` int(11) NOT NULL DEFAULT 0,
`billing_at` date NOT NULL COMMENT '지급기한일(Onetime 발행당일)',
`pay` varchar(20) DEFAULT NULL COMMENT '자뷸방법(ACCOUNT,COUPON)',
`status` varchar(20) NOT NULL DEFAULT 'unpaid' COMMENT '상태(PAID,UNPAID)',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '지불처리일',
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '청구발행일',
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`uid`),
KEY `FK_user_TO_payment` (`user_uid`),
KEY `FK_clientinfo_TO_payment` (`clientinfo_uid`),
KEY `FK_serviceinfo_TO_payment` (`serviceinfo_uid`),
CONSTRAINT `FK_clientinfo_TO_payment` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`),
CONSTRAINT `FK_serviceinfo_TO_payment` FOREIGN KEY (`serviceinfo_uid`) REFERENCES `serviceinfo` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='결제정보';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `payment`
--
LOCK TABLES `payment` WRITE;
/*!40000 ALTER TABLE `payment` DISABLE KEYS */;
/*!40000 ALTER TABLE `payment` 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,
`user_uid` int(11) NOT NULL COMMENT '관리자정보',
`clientinfo_uid` int(11) NOT NULL COMMENT '고객정보',
`title` varchar(255) NOT NULL,
`content` text DEFAULT NULL,
`amount` int(11) NOT NULL DEFAULT 0 COMMENT '포인트액',
`balance` int(11) NOT NULL DEFAULT 0,
`status` varchar(20) NOT NULL DEFAULT 'deposit',
`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_user_TO_pointinfo` (`user_uid`),
KEY `FK_clientinfo_TO_pointinfo` (`clientinfo_uid`),
CONSTRAINT `FK_clientinfo_TO_pointinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`),
CONSTRAINT `FK_user_TO_pointinfo` 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 `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 COMMENT 'RAM정보',
`title` varchar(50) NOT NULL,
`price` int(11) NOT NULL DEFAULT 0 COMMENT '기본금액',
`used` int(11) NOT NULL DEFAULT 0,
`stock` int(11) NOT NULL DEFAULT 0 COMMENT '재고',
`status` varchar(20) NOT NULL DEFAULT 'available',
`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 AUTO_INCREMENT=13 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 */;
INSERT INTO `raminfo` VALUES (1,'ECC DDR3 2G',20000,0,100,'available','2025-10-28 04:24:06','2025-09-25 01:15:29',NULL),(2,'ECC DDR3 4G',30000,0,100,'available','2025-10-28 07:53:27','2025-09-25 01:15:29',NULL),(3,'ECC DDR3 8G',40000,0,100,'available','2025-10-30 06:33:11','2025-09-25 01:15:29',NULL),(4,'ECC DDR4 8G',60000,0,100,'available','2025-10-28 04:25:05','2025-09-25 01:15:29',NULL),(5,'ECC DDR3 16G',100000,0,100,'available','2025-10-28 04:25:16','2025-09-25 01:15:29',NULL),(6,'ECC DDR4 16G',100000,0,100,'available','2025-10-28 04:26:01','2025-09-25 01:15:29',NULL),(7,'ECC DDR3 32G',100000,0,100,'available',NULL,'2025-10-28 04:25:54',NULL),(8,'ECC DDR4 32G',100000,0,100,'available',NULL,'2025-10-28 04:26:21',NULL),(9,'DDR3 8G',50000,0,100,'available','2025-10-28 07:30:05','2025-10-28 04:26:53',NULL),(10,'DDR4 8G',60000,0,100,'available',NULL,'2025-10-28 04:27:17',NULL),(11,'DDR3 16G',90000,0,100,'available',NULL,'2025-10-28 04:27:39',NULL),(12,'DDR4 16G',90000,0,100,'available',NULL,'2025-10-28 04:28:06',NULL);
/*!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 COMMENT '서버정보',
`user_uid` int(11) NOT NULL,
`clientinfo_uid` int(11) DEFAULT NULL COMMENT '고객정보',
`serviceinfo_uid` int(11) DEFAULT NULL COMMENT '서비스정보',
`code` varchar(20) NOT NULL COMMENT '서버코드',
`type` varchar(20) NOT NULL COMMENT '구분(밴더등)',
`chassisinfo_uid` int(11) NOT NULL,
`switchinfo_uid` int(11) DEFAULT NULL,
`ip` char(16) DEFAULT NULL,
`os` varchar(30) DEFAULT NULL,
`title` varchar(50) NOT NULL,
`price` int(11) NOT NULL,
`manufactur_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '제조일',
`format_at` timestamp NULL DEFAULT NULL COMMENT '포맷보류일',
`status` varchar(20) NOT NULL DEFAULT 'available',
`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`),
UNIQUE KEY `UQ_ip` (`ip`),
UNIQUE KEY `UQ_switch` (`switchinfo_uid`),
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 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 `serverpartinfo`
--
DROP TABLE IF EXISTS `serverpartinfo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `serverpartinfo` (
`uid` int(11) NOT NULL AUTO_INCREMENT,
`clientinfo_uid` int(11) DEFAULT NULL COMMENT '고객정보',
`part_uid` int(11) DEFAULT NULL,
`serverinfo_uid` int(11) NOT NULL COMMENT '서버정보',
`serviceinfo_uid` int(11) DEFAULT NULL COMMENT '서비스정보',
`title` varchar(255) NOT NULL,
`type` varchar(20) NOT NULL COMMENT '구분',
`billing` varchar(20) NOT NULL COMMENT '청구방법(month,onetime)',
`billing_at` date DEFAULT NULL,
`amount` int(11) NOT NULL DEFAULT 0 COMMENT '서비스금액',
`cnt` tinyint(4) NOT NULL DEFAULT 1 COMMENT '갯수',
`extra` varchar(50) DEFAULT NULL COMMENT '추가정보(RAID등)',
`updated_at` timestamp NULL DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`uid`),
KEY `FK_serverinfo_TO_serverpartinfo` (`serverinfo_uid`),
KEY `FK_serviceinfo_TO_serverpartinfo` (`serviceinfo_uid`),
CONSTRAINT `FK_serverinfo_TO_serverpartinfo` FOREIGN KEY (`serverinfo_uid`) REFERENCES `serverinfo` (`uid`),
CONSTRAINT `FK_serviceinfo_TO_serverpartinfo` FOREIGN KEY (`serviceinfo_uid`) REFERENCES `serviceinfo` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='서버파트정보';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `serverpartinfo`
--
LOCK TABLES `serverpartinfo` WRITE;
/*!40000 ALTER TABLE `serverpartinfo` DISABLE KEYS */;
/*!40000 ALTER TABLE `serverpartinfo` 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 COMMENT '서비스정보',
`user_uid` int(11) NOT NULL,
`clientinfo_uid` int(11) NOT NULL COMMENT '고객정보',
`serverinfo_uid` int(11) DEFAULT NULL,
`code` varchar(20) NOT NULL COMMENT '서비스코드',
`title` varchar(255) DEFAULT NULL,
`site` varchar(20) NOT NULL DEFAULT 'prime' COMMENT 'Site구분',
`location` varchar(20) NOT NULL DEFAULT 'chiba' COMMENT '지역코드(chiba,tokyo,3center등)',
`rack` int(11) NOT NULL DEFAULT 0 COMMENT '상면비용',
`line` int(11) NOT NULL DEFAULT 0 COMMENT '회선비용',
`billing_at` date NOT NULL COMMENT '청구일(지급기한)',
`sale` int(11) NOT NULL DEFAULT 0 COMMENT '할인액',
`amount` int(11) NOT NULL DEFAULT 0 COMMENT ' 월서비스금액(서버+PART+IP+CS)',
`start_at` date NOT NULL COMMENT '시작일',
`end_at` date DEFAULT NULL COMMENT '종료일',
`history` text DEFAULT NULL COMMENT 'history',
`status` varchar(20) NOT NULL DEFAULT 'normal' 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_user_TO_serviceinfo` (`user_uid`),
KEY `FK_clientinfo_TO_serviceinfo` (`clientinfo_uid`),
KEY `FK_serverinfo_TO_serviceinfo` (`serverinfo_uid`),
CONSTRAINT `FK_clientinfo_TO_serviceinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`),
CONSTRAINT `FK_serverinfo_TO_serviceinfo` FOREIGN KEY (`serverinfo_uid`) REFERENCES `serverinfo` (`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 `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 COMMENT 'PART정보',
`title` varchar(50) NOT NULL,
`price` int(11) NOT NULL DEFAULT 0 COMMENT '기본금액',
`used` int(11) NOT NULL DEFAULT 0,
`stock` int(11) NOT NULL DEFAULT 0 COMMENT '재고',
`status` varchar(20) NOT NULL DEFAULT 'available',
`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 AUTO_INCREMENT=3 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 */;
INSERT INTO `softwareinfo` VALUES (1,'닷디펜더',50000,0,100,'available','2025-10-30 08:11:33','2025-09-25 01:15:29',NULL),(2,'딥파인더',50000,0,100,'available','2025-10-15 07:31:44','2025-09-25 01:15:29',NULL);
/*!40000 ALTER TABLE `softwareinfo` 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 COMMENT '스위치정보',
`clientinfo_uid` int(11) DEFAULT NULL COMMENT '고객정보',
`serviceinfo_uid` int(11) DEFAULT NULL COMMENT '서비스정보',
`serverinfo_uid` int(11) DEFAULT NULL COMMENT '서버정보',
`code` varchar(20) NOT NULL COMMENT 'switch코드',
`price` int(11) NOT NULL DEFAULT 0 COMMENT '기본금액',
`status` varchar(20) NOT NULL DEFAULT 'available',
`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`),
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 COLLATE=utf8_general_ci 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,
`name` varchar(20) NOT NULL,
`email` varchar(50) NOT NULL,
`mobile` varchar(20) DEFAULT NULL,
`role` varchar(255) DEFAULT NULL,
`status` varchar(20) NOT NULL DEFAULT 'available',
`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 AUTO_INCREMENT=48 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 */;
INSERT INTO `user` VALUES (1,'choi.jh','$2y$10$.vl2FtwJsjMNFCJJm3ISDu7m3vBB85mZ5fRQxcfI0uK/2D1e8Xora','최준흠','choi.jh@prime-idc.jp','0434434327','manager,cloudflare,security,director,master','available','2025-10-02 08:12:39','2023-03-23 06:50:04',NULL),(2,'cho.jh','$2y$10$ot/aUXR/W1n4Q3dZA2dZCOxQrpVb2Bq31Y7xFQS3G6D1gtImmyBjm','조준희','cho.jh@prime-idc.jp','','manager,cloudflare,security','available','2025-10-02 08:12:46','2023-03-24 02:20:48',NULL),(4,'kimdy','$2y$10$18uyn94xdprzAnt.oYZ5weAvb8rRLhkz/SdQrjEK7yuGhCr9PlUCC','김동윤','kimdy@prime-idc.jp','','manager,cloudflare,security','available','2025-10-02 08:12:51','2023-03-24 02:21:50',NULL),(5,'kimhy','$2y$10$.yEKVqY.F7HoSOZijl4uyeulUtfAQ4EDRiyR2JpgFYBuKw.mZoZvG','김효영','khy@prime-idc.jp',NULL,'manager,security,director','available','2025-06-24 01:11:41','2023-03-24 02:23:18',NULL),(6,'kim.eh','$2y$10$YmwicI.Br4XNyGamfRADMOu.qlkwKd2fmnNkL7YIkNHGndvqYPnCq','김은혁','kim.eh@prime-idc.jp',NULL,'manager,cloudflare,security','available','2025-06-24 01:09:38','2023-03-24 02:23:52',NULL),(7,'leeph','$2y$10$lR739WzJsW6rDLgchYs7buek4BYeTlKHTQY60RDqRms9Io7RSY3AC','이풍호','leeph@prime-idc.jp','','manager,cloudflare,security','available','2025-10-02 08:13:18','2023-03-24 02:24:21',NULL),(8,'jinmingyu','$2y$10$PI8WA6d/z4hDE6hxJoUhbuMH3vTTWH0Ry2Z6fTLUUpwQGaE/9bEZa','김명옥','jinmingyu@idcjp.jp',NULL,'manager,cloudflare,security','available','2025-06-24 01:09:47','2023-03-24 02:25:00',NULL),(9,'kangdh','$2y$10$gu9OS2DDQQ5H.Hh61t3BSOUp87l35q.xsduVSxvCcn8IgA4jrATgG','강동헌','kang.dh@idcjp.jp','','manager,cloudflare,security','available','2025-10-02 08:13:26','2023-03-24 02:25:48',NULL),(10,'yoohs','$2y$10$TGASk98FuZ6Ux6FDquu1aO3rztA01MCle/Vs1.3iaEMQzakAbCzJy','유혜성','yoo.hs@idcjp.jp','','manager,cloudflare,security','available','2025-10-02 08:13:33','2023-03-24 02:26:31',NULL),(11,'kim.yh','$2y$10$8GciQXpKYiR3TDWQfh9JjOQAQ.YWGoOSCL0a0/w4XACO0mUgjjbWy','김영환','kim.yh@idcjp.jp','','manager,cloudflare,security','available','2025-10-02 08:13:39','2023-03-24 02:27:05',NULL),(12,'yunmuj','$2y$10$zkgwGVj2JSOVIsxLe8fePe1gvWWaCemfZMktzBlrN8oLb3CKydkZC','윤무정','yunmuj@idcjp.jp','','manager,cloudflare,security','available','2025-10-02 08:13:50','2023-03-24 02:27:59',NULL),(13,'kim.mt','$2y$10$3dfkA0oq4LqiJOmjbBGKe.p0Dhj/MDqjoTdw11BOPF/H2qJqnEuHO','김문태','kim.mt@idcjp.jp','','manager,cloudflare,security','available','2025-10-02 08:13:56','2023-03-24 02:28:31',NULL),(14,'shin.ms','$2y$10$.jaDkGtm/gZK3ZDF.fJUGOwMI7Zif5588X5AxSMvvk238RDI7spQ6','신민수','shin.ms@idcjp.jp','','manager,cloudflare','terminated','2025-10-02 08:11:11','2023-03-24 02:29:00',NULL),(15,'park.sm','$2y$10$RgDY4f9kuryRNDJVJU5pn.JV.38ZWA9UTgmONBlP74WwIqamMbnY2','박선미','park.sm@idcjp.jp','','manager,cloudflare,security','available','2025-10-13 05:24:59','2023-03-24 02:29:34',NULL),(24,'kobn','$2y$10$pWM/XFfSNeSng32sypbDX.WaR4UlM4EDkYKCQfFkYIOC7Ppg0nc5G','고병남','ko@prime-idc.jp',NULL,'manager,cloudflare,security','available','2025-06-24 01:10:02','2024-10-29 06:30:19',NULL),(25,'jeong.sg','$2y$10$OzH6140JztiUEs4s/VHbPOxfxubFooqwqVhGpdFG8OJCGAFXNu546','정상구','jeong.sg@prime-idc.jp','','manager,cloudflare,security','available','2025-10-02 08:14:21','2025-01-23 00:29:46',NULL),(43,'test1234','$2y$10$y47tGsZ7YTta16nD.wPtkuS./9EjeNQYAjVhsZR448.sL..dHFBsK','test1234','test@gmail.com','0434434327','manager,cloudflare','available','2025-10-21 01:00:16','2025-07-01 06:05:11',NULL),(44,'test333','$2y$10$h7dD8XYN9osH2pzxP7lqdeOrQJQ12d.WK6Yp1WUx7139VUx8IQrba','test333','test2333@co.kr22','2343422','manager','available','2025-10-21 01:00:51','2025-07-11 07:23:13',NULL),(45,'kim.jh','$2y$10$voCle9yFWWhGhQ0JrH46puLYySJYq6O41/BSrKxx0MHWyO8KDf97u','김준한','kim.jh@prime-idc.jp','','manager,cloudflare,security','available','2025-10-02 08:14:32','2025-08-08 02:27:49',NULL),(47,'test11112','$2y$10$rYkO5DkAsA/QYqqDoUTJQ.7Cv9mQCNAmRuFWwF8xmHyqTTa7iYX1G','test11112','test11112@gmail.com',NULL,'manager,cloudflare,security','pause',NULL,'2025-12-02 01:31:48',NULL);
/*!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-12-22 14:31:49