dbms_init...1
This commit is contained in:
parent
eee680feb0
commit
5389a60e1a
@ -106,6 +106,20 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
|
||||
$routes->post('batchjob_delete', 'ServiceController::batchjob_delete');
|
||||
$routes->get('download/(:alpha)', 'ServiceController::download/$1');
|
||||
});
|
||||
|
||||
$routes->group('servicepart', ['namespace' => 'App\Controllers\Admin\Customer'], function ($routes) {
|
||||
$routes->get('/', 'ServicePartController::index', []);
|
||||
$routes->get('create', 'ServicePartController::create_form');
|
||||
$routes->post('create', 'ServicePartController::create');
|
||||
$routes->get('modify/(:num)', 'ServicePartController::modify_form/$1');
|
||||
$routes->post('modify/(:num)', 'ServicePartController::modify/$1');
|
||||
$routes->get('view/(:num)', 'ServicePartController::view/$1');
|
||||
$routes->get('delete/(:num)', 'ServicePartController::delete/$1');
|
||||
$routes->get('toggle/(:num)/(:any)', 'ServicePartController::toggle/$1/$2');
|
||||
$routes->post('batchjob', 'ServicePartController::batchjob');
|
||||
$routes->post('batchjob_delete', 'ServicePartController::batchjob_delete');
|
||||
$routes->get('download/(:alpha)', 'ServicePartController::download/$1');
|
||||
});
|
||||
});
|
||||
$routes->group('equipment', ['namespace' => 'App\Controllers\Admin\Equipment'], function ($routes) {
|
||||
$routes->group('line', ['namespace' => 'App\Controllers\Admin\Equipment'], function ($routes) {
|
||||
@ -134,7 +148,6 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
|
||||
$routes->post('batchjob_delete', 'IpController::batchjob_delete');
|
||||
$routes->get('download/(:alpha)', 'IpController::download/$1');
|
||||
});
|
||||
|
||||
$routes->group('server', ['namespace' => 'App\Controllers\Admin\Equipment'], function ($routes) {
|
||||
$routes->get('/', 'ServerController::index', []);
|
||||
$routes->get('create', 'ServerController::create_form');
|
||||
@ -148,19 +161,6 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
|
||||
$routes->post('batchjob_delete', 'ServerController::batchjob_delete');
|
||||
$routes->get('download/(:alpha)', 'ServerController::download/$1');
|
||||
});
|
||||
$routes->group('part', ['namespace' => 'App\Controllers\Admin\Equipment'], function ($routes) {
|
||||
$routes->get('/', 'PartController::index', []);
|
||||
$routes->get('create', 'PartController::create_form');
|
||||
$routes->post('create', 'PartController::create');
|
||||
$routes->get('modify/(:num)', 'PartController::modify_form/$1');
|
||||
$routes->post('modify/(:num)', 'PartController::modify/$1');
|
||||
$routes->get('view/(:num)', 'PartController::view/$1');
|
||||
$routes->get('delete/(:num)', 'PartController::delete/$1');
|
||||
$routes->get('toggle/(:num)/(:any)', 'PartController::toggle/$1/$2');
|
||||
$routes->post('batchjob', 'PartController::batchjob');
|
||||
$routes->post('batchjob_delete', 'PartController::batchjob_delete');
|
||||
$routes->get('download/(:alpha)', 'PartController::download/$1');
|
||||
});
|
||||
$routes->group('defence', ['namespace' => 'App\Controllers\Admin\Equipment'], function ($routes) {
|
||||
$routes->get('/', 'DefenceController::index', []);
|
||||
$routes->get('create', 'DefenceController::create_form');
|
||||
@ -200,5 +200,37 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
|
||||
$routes->post('batchjob_delete', 'ServerPartController::batchjob_delete');
|
||||
$routes->get('download/(:alpha)', 'ServerPartController::download/$1');
|
||||
});
|
||||
$routes->group('part', ['namespace' => 'App\Controllers\Admin\Equipment\Part'], function ($routes) {
|
||||
$routes->group('cpu', ['namespace' => 'App\Controllers\Admin\Equipment\Part'], function ($routes) {
|
||||
$routes->get('/', 'CpuController::index', []);
|
||||
$routes->get('create', 'CpuController::create_form');
|
||||
$routes->post('create', 'CpuController::create');
|
||||
$routes->get('modify/(:num)', 'CpuController::modify_form/$1');
|
||||
$routes->post('modify/(:num)', 'CpuController::modify/$1');
|
||||
$routes->get('view/(:num)', 'CpuController::view/$1');
|
||||
$routes->get('delete/(:num)', 'CpuController::delete/$1');
|
||||
$routes->get('toggle/(:num)/(:any)', 'CpuController::toggle/$1/$2');
|
||||
});
|
||||
$routes->group('ram', ['namespace' => 'App\Controllers\Admin\Equipment\Part'], function ($routes) {
|
||||
$routes->get('/', 'RamController::index', []);
|
||||
$routes->get('create', 'RamController::create_form');
|
||||
$routes->post('create', 'RamController::create');
|
||||
$routes->get('modify/(:num)', 'RamController::modify_form/$1');
|
||||
$routes->post('modify/(:num)', 'RamController::modify/$1');
|
||||
$routes->get('view/(:num)', 'RamController::view/$1');
|
||||
$routes->get('delete/(:num)', 'RamController::delete/$1');
|
||||
$routes->get('toggle/(:num)/(:any)', 'RamController::toggle/$1/$2');
|
||||
});
|
||||
$routes->group('disk', ['namespace' => 'App\Controllers\Admin\Equipment\Part'], function ($routes) {
|
||||
$routes->get('/', 'DiskController::index', []);
|
||||
$routes->get('create', 'DiskController::create_form');
|
||||
$routes->post('create', 'DiskController::create');
|
||||
$routes->get('modify/(:num)', 'DiskController::modify_form/$1');
|
||||
$routes->post('modify/(:num)', 'DiskController::modify/$1');
|
||||
$routes->get('view/(:num)', 'DiskController::view/$1');
|
||||
$routes->get('delete/(:num)', 'DiskController::delete/$1');
|
||||
$routes->get('toggle/(:num)/(:any)', 'DiskController::toggle/$1/$2');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -3,17 +3,18 @@
|
||||
namespace App\Controllers\Admin\Customer;
|
||||
|
||||
use App\Controllers\Admin\AdminController;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
use App\Services\Customer\ClientService;
|
||||
use App\Services\Customer\ServiceService;
|
||||
use App\Services\Customer\AccountService;
|
||||
use App\Services\Customer\CouponService;
|
||||
use App\Services\Customer\PointService;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
abstract class CustomerController extends AdminController
|
||||
{
|
||||
private ?ClientService $_clientService = null;
|
||||
private ?ServiceService $_serviceService = null;
|
||||
private ?AccountService $_accountService = null;
|
||||
private ?CouponService $_couponService = null;
|
||||
@ -25,6 +26,13 @@ abstract class CustomerController extends AdminController
|
||||
// $this->view_path .= "customer" . DIRECTORY_SEPARATOR;
|
||||
}
|
||||
|
||||
final public function getClientService(): ClientService
|
||||
{
|
||||
if (!$this->_clientService) {
|
||||
$this->_clientService = new ClientService($this->request);
|
||||
}
|
||||
return $this->_clientService;
|
||||
}
|
||||
final public function getServiceService(): ServiceService
|
||||
{
|
||||
if (!$this->_serviceService) {
|
||||
@ -53,5 +61,20 @@ abstract class CustomerController extends AdminController
|
||||
}
|
||||
return $this->_pointService;
|
||||
}
|
||||
|
||||
protected function getFormFieldOption(string $field, array $options): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'clientinfo_uid':
|
||||
$options = $this->getClientService()->getFormFieldOption($field);
|
||||
// echo $this->getUserModel()->getLastQuery();
|
||||
// dd($options);
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
break;
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@ use App\Entities\Customer\ServiceEntity;
|
||||
use App\Helpers\Customer\ServiceHelper;
|
||||
use App\Services\Customer\ServiceService;
|
||||
|
||||
use App\Services\Equipment\LineService;
|
||||
use App\Services\Equipment\ServerService;
|
||||
use App\Entities\Customer\ServiceServerEntity;
|
||||
use App\Services\Customer\ServiceServerService;
|
||||
@ -20,6 +21,7 @@ use App\Services\Equipment\IpService;
|
||||
|
||||
class ServiceController extends CustomerController
|
||||
{
|
||||
private ?LineService $_lineService = null;
|
||||
private ?ServerService $_serverService = null;
|
||||
private ?ServiceServerService $_serviceServerService = null;
|
||||
private ?PartService $_partService = null;
|
||||
@ -50,6 +52,13 @@ class ServiceController extends CustomerController
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
final public function getLineService(): LineService
|
||||
{
|
||||
if (!$this->_lineService) {
|
||||
$this->_lineService = new LineService();
|
||||
}
|
||||
return $this->_lineService;
|
||||
}
|
||||
final public function getServerService(): ServerService
|
||||
{
|
||||
if (!$this->_serverService) {
|
||||
@ -85,6 +94,22 @@ class ServiceController extends CustomerController
|
||||
}
|
||||
return $this->_ipService;
|
||||
}
|
||||
protected function getFormFieldOption(string $field, array $options): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'lineinfo_uid':
|
||||
$options = $this->getLineService()->getFormFieldOption($field);
|
||||
break;
|
||||
case 'serverinfo_uid':
|
||||
$options = $this->getServerService()->getFormFieldOption($field);
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
break;
|
||||
}
|
||||
// dd($options);
|
||||
return $options;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
|
||||
private function setPartEntity(ServiceEntity $entity): ServiceEntity
|
||||
@ -97,10 +122,18 @@ class ServiceController extends CustomerController
|
||||
}
|
||||
return $entity;
|
||||
}
|
||||
|
||||
protected function create_process(): mixed
|
||||
{
|
||||
$entity = parent::create_process();
|
||||
//사용중인 서버로 변경
|
||||
$this->getServerService()->setOccupied($this->getServerService()->getEntity($entity->getServerInfoUID()));
|
||||
return $entity;
|
||||
}
|
||||
protected function index_process(): array
|
||||
{
|
||||
$fields = [
|
||||
'fields' => ['type', 'billing_at', 'rack', 'SERVER', 'IP', 'CPU', 'RAM', 'DISK', 'SOFTWARE', 'DEFENCE', 'start_at', 'status'],
|
||||
'fields' => ['type', 'clientinfo_uid', 'rack', 'lineinfo_uid', 'serverinfo_uid', 'IP', 'CPU', 'RAM', 'DISK', 'SOFTWARE', 'DEFENCE', 'billing_at', 'start_at', 'status'],
|
||||
];
|
||||
$this->init('index', $fields);
|
||||
$this->modal_type = 'modal_iframe';
|
||||
|
||||
@ -43,14 +43,14 @@ class ServicePartController extends CustomerController
|
||||
}
|
||||
return $this->_partService;
|
||||
}
|
||||
protected function getFormFieldOption(string $field, array $options = []): array
|
||||
protected function getFormFieldOption(string $field, array $options): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'serviceinfo_uid':
|
||||
$options[$field] = $this->getServiceService()->getFormFieldOption($field);
|
||||
$options[$field] = $this->getServiceService()->getFormFieldOption($field,);
|
||||
break;
|
||||
case 'partinfo_uid':
|
||||
$options[$field] = $this->getPartService()->getFormFieldOption($field);
|
||||
$options[$field] = $this->getPartService()->getFormFieldOption($field,);
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
@ -84,7 +84,7 @@ class ServicePartController extends CustomerController
|
||||
protected function index_process(): array
|
||||
{
|
||||
$fields = [
|
||||
'fields' => ['serviceinfo_uid', 'type', 'partinfo_uid'],
|
||||
'fields' => ['serviceinfo_uid', 'billing_type', 'partinfo_uid'],
|
||||
];
|
||||
$this->init('index', $fields);
|
||||
$this->modal_type = 'modal_iframe';
|
||||
|
||||
@ -3,15 +3,18 @@
|
||||
namespace App\Controllers\Admin\Equipment;
|
||||
|
||||
use App\Controllers\Admin\AdminController;
|
||||
use App\Services\Customer\ClientService;
|
||||
use App\Services\Equipment\LineService;
|
||||
use App\Services\Equipment\ServerService;
|
||||
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
use App\Services\Equipment\LineService;
|
||||
use App\Services\Equipment\ServerService;
|
||||
|
||||
abstract class EquipmentController extends AdminController
|
||||
{
|
||||
private ?ClientService $_clientService = null;
|
||||
private ?LineService $_lineService = null;
|
||||
private ?ServerService $_serverService = null;
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
@ -19,6 +22,20 @@ abstract class EquipmentController extends AdminController
|
||||
$this->uri_path .= 'equipment/';
|
||||
// $this->view_path .= "equipment" . DIRECTORY_SEPARATOR;
|
||||
}
|
||||
final public function getClientService(): ClientService
|
||||
{
|
||||
if (!$this->_clientService) {
|
||||
$this->_clientService = new ClientService($this->request);
|
||||
}
|
||||
return $this->_clientService;
|
||||
}
|
||||
final public function getLineService(): LineService
|
||||
{
|
||||
if (!$this->_lineService) {
|
||||
$this->_lineService = new LineService($this->request);
|
||||
}
|
||||
return $this->_lineService;
|
||||
}
|
||||
final public function getServerService(): ServerService
|
||||
{
|
||||
if (!$this->_serverService) {
|
||||
@ -26,5 +43,20 @@ abstract class EquipmentController extends AdminController
|
||||
}
|
||||
return $this->_serverService;
|
||||
}
|
||||
|
||||
protected function getFormFieldOption(string $field, array $options): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'clientinfo_uid':
|
||||
$options = $this->getClientService()->getFormFieldOption($field);
|
||||
// echo $this->getUserModel()->getLastQuery();
|
||||
// dd($options);
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
break;
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
}
|
||||
|
||||
@ -34,6 +34,20 @@ class IpController extends EquipmentController
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
protected function getFormFieldOption(string $field, array $options = []): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'lineinfo_uid':
|
||||
$options = $this->getLineService()->getFormFieldOption($field);
|
||||
// echo $this->getUserModel()->getLastQuery();
|
||||
// dd($options);
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
break;
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
protected function setOrderByForList()
|
||||
{
|
||||
|
||||
37
app/Controllers/Admin/Equipment/Part/CpuController.php
Normal file
37
app/Controllers/Admin/Equipment/Part/CpuController.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin\Equipment\Part;
|
||||
|
||||
use App\Helpers\Equipment\Part\CpuHelper;
|
||||
use App\Services\Equipment\Part\CpuService;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class CpuController extends PartController
|
||||
{
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
|
||||
$this->class_path = $this->getService()->getClassPath();
|
||||
$this->title = lang("{$this->getService()->getClassPath()}.title");
|
||||
$this->helper = $this->getHelper();
|
||||
}
|
||||
public function getService(): CpuService
|
||||
{
|
||||
if (!$this->_service) {
|
||||
$this->_service = new CpuService($this->request);
|
||||
}
|
||||
return $this->_service;
|
||||
}
|
||||
public function getHelper(): mixed
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new CpuHelper($this->request);
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
}
|
||||
37
app/Controllers/Admin/Equipment/Part/DiskController.php
Normal file
37
app/Controllers/Admin/Equipment/Part/DiskController.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin\Equipment\Part;
|
||||
|
||||
use App\Helpers\Equipment\Part\DiskHelper;
|
||||
use App\Services\Equipment\Part\DiskService;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class DiskController extends PartController
|
||||
{
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
|
||||
$this->class_path = $this->getService()->getClassPath();
|
||||
$this->title = lang("{$this->getService()->getClassPath()}.title");
|
||||
$this->helper = $this->getHelper();
|
||||
}
|
||||
public function getService(): DiskService
|
||||
{
|
||||
if (!$this->_service) {
|
||||
$this->_service = new DiskService($this->request);
|
||||
}
|
||||
return $this->_service;
|
||||
}
|
||||
public function getHelper(): mixed
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new DiskHelper($this->request);
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
}
|
||||
34
app/Controllers/Admin/Equipment/Part/PartController.php
Normal file
34
app/Controllers/Admin/Equipment/Part/PartController.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin\Equipment\Part;
|
||||
|
||||
use App\Controllers\Admin\Equipment\EquipmentController;
|
||||
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
abstract class PartController extends EquipmentController
|
||||
{
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->uri_path .= 'part/';
|
||||
// $this->view_path .= "part" . DIRECTORY_SEPARATOR;
|
||||
}
|
||||
|
||||
protected function setOrderByForList()
|
||||
{
|
||||
//OrderBy 처리
|
||||
$this->getService()->getModel()->orderBy('model', 'ASC', false);
|
||||
parent::setOrderByForList();
|
||||
}
|
||||
protected function index_process(): array
|
||||
{
|
||||
$fields = [
|
||||
'fields' => ['model', 'status'],
|
||||
];
|
||||
$this->init('index', $fields);
|
||||
return parent::index_process();
|
||||
}
|
||||
}
|
||||
37
app/Controllers/Admin/Equipment/Part/RamController.php
Normal file
37
app/Controllers/Admin/Equipment/Part/RamController.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin\Equipment\Part;
|
||||
|
||||
use App\Helpers\Equipment\Part\RamHelper;
|
||||
use App\Services\Equipment\Part\RamService;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class RamController extends PartController
|
||||
{
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
|
||||
$this->class_path = $this->getService()->getClassPath();
|
||||
$this->title = lang("{$this->getService()->getClassPath()}.title");
|
||||
$this->helper = $this->getHelper();
|
||||
}
|
||||
public function getService(): RamService
|
||||
{
|
||||
if (!$this->_service) {
|
||||
$this->_service = new RamService($this->request);
|
||||
}
|
||||
return $this->_service;
|
||||
}
|
||||
public function getHelper(): mixed
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new RamHelper($this->request);
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
}
|
||||
@ -59,7 +59,7 @@ class ServerController extends EquipmentController
|
||||
private function setPartEntity(ServerEntity $entity): ServerEntity
|
||||
{
|
||||
foreach ($this->getServerPartService()->getEntities(['serverinfo_uid' => $entity->getPK()]) as $serverPartEntity) {
|
||||
$partEntity = $this->getPartService()->getEntity($serverPartEntity->getPartInfo());
|
||||
$partEntity = $this->getPartService()->getEntity($serverPartEntity->getPartInfoUID());
|
||||
if ($partEntity) {
|
||||
$entity->addPartEntity($partEntity->getType(), $partEntity);
|
||||
}
|
||||
|
||||
@ -43,14 +43,14 @@ class ServerPartController extends EquipmentController
|
||||
}
|
||||
return $this->_partService;
|
||||
}
|
||||
protected function getFormFieldOption(string $field, array $options = []): array
|
||||
protected function getFormFieldOption(string $field, array $options): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'serverinfo_uid':
|
||||
$options[$field] = $this->getServerService()->getFormFieldOption($field);
|
||||
$options = $this->getServerService()->getFormFieldOption($field);
|
||||
break;
|
||||
case 'partinfo_uid':
|
||||
$options[$field] = $this->getPartService()->getFormFieldOption($field);
|
||||
$options = $this->getPartService()->getFormFieldOption($field);
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
|
||||
@ -45,11 +45,11 @@ class MyLogController extends AdminController
|
||||
return $this->_userService;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
protected function getFormFieldOption(string $field, array $options = []): array
|
||||
protected function getFormFieldOption(string $field, array $options): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'user_uid':
|
||||
$options[$field] = $this->getUserService()->getFormFieldOption($field);
|
||||
$options = $this->getUserService()->getFormFieldOption($field);
|
||||
// echo $this->getUserModel()->getLastQuery();
|
||||
// dd($options);
|
||||
break;
|
||||
|
||||
@ -17,13 +17,11 @@ use Psr\Log\LoggerInterface;
|
||||
|
||||
use App\Libraries\LogCollector;
|
||||
use App\Services\MyLogService;
|
||||
use App\Services\Customer\ClientService;
|
||||
|
||||
abstract class CommonController extends BaseController
|
||||
{
|
||||
private $_myAuth = null;
|
||||
private ?MyLogService $_myLogService = null;
|
||||
private ?ClientService $_clientService = null;
|
||||
private $_viewDatas = [];
|
||||
abstract public function getService(): mixed;
|
||||
abstract function getHelper(): mixed;
|
||||
@ -61,13 +59,6 @@ abstract class CommonController extends BaseController
|
||||
{
|
||||
return $this->_viewDatas;
|
||||
}
|
||||
final public function getClientService(): ClientService
|
||||
{
|
||||
if (!$this->_clientService) {
|
||||
$this->_clientService = new ClientService($this->request);
|
||||
}
|
||||
return $this->_clientService;
|
||||
}
|
||||
final public function getMyLogService(): mixed
|
||||
{
|
||||
if (!$this->_myLogService) {
|
||||
@ -119,15 +110,13 @@ abstract class CommonController extends BaseController
|
||||
protected function getFormFieldOption(string $field, array $options): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'clientinfo_uid':
|
||||
$options[$field] = $this->getClientService()->getFormFieldOption($field);
|
||||
// echo $this->getUserModel()->getLastQuery();
|
||||
// dd($options);
|
||||
break;
|
||||
default:
|
||||
$options[$field] = lang($this->getService()->getClassPath() . '.' . strtoupper($field));
|
||||
$options = lang($this->getService()->getClassPath() . '.' . strtoupper($field));
|
||||
break;
|
||||
}
|
||||
if (!is_array($options)) {
|
||||
throw new \Exception(__FUNCTION__ . "에서 field의 options 값이 array가 아닙니다.\n" . var_export($options, true));
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
final protected function getFormFieldOptions(array $fields, array $options = []): array
|
||||
@ -136,8 +125,9 @@ abstract class CommonController extends BaseController
|
||||
if (is_array($field)) {
|
||||
throw new \Exception(__FUNCTION__ . "에서 field array 입니다.\n" . var_export($field, true));
|
||||
}
|
||||
$options = $this->getFormFieldOption($field, $options);
|
||||
$options[$field] = $this->getFormFieldOption($field, $options);
|
||||
}
|
||||
// dd($options);
|
||||
return $options;
|
||||
}
|
||||
protected function setValidation(Validation $validation, string $action, string $field, ?string $rule = null): Validation
|
||||
@ -180,6 +170,7 @@ abstract class CommonController extends BaseController
|
||||
case 'modify_form':
|
||||
case 'index':
|
||||
case 'view':
|
||||
// dd($this->getViewDatas());
|
||||
$this->getHelper()->setViewDatas($this->getViewDatas());
|
||||
$result = view($this->view_path . $action, ['viewDatas' => $this->getViewDatas()]);
|
||||
break;
|
||||
|
||||
836
app/Database/dbms_init.sql
Normal file
836
app/Database/dbms_init.sql
Normal file
@ -0,0 +1,836 @@
|
||||
/*!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 'in',
|
||||
`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 `billinginfo`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `billinginfo`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `billinginfo` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`serviceinfo_uid` int(11) NOT NULL,
|
||||
`issue_at` date NOT NULL,
|
||||
`total_amount` int(11) NOT NULL DEFAULT 0,
|
||||
`status` varchar(20) DEFAULT 'unpaid',
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_serviceinfo_TO_billinginfo` (`serviceinfo_uid`),
|
||||
CONSTRAINT `FK_serviceinfo_TO_billinginfo` 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 `billinginfo`
|
||||
--
|
||||
|
||||
LOCK TABLES `billinginfo` WRITE;
|
||||
/*!40000 ALTER TABLE `billinginfo` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `billinginfo` 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,
|
||||
`coupon_balance` int(11) NOT NULL DEFAULT 0 COMMENT '쿠폰수',
|
||||
`point_balance` int(11) NOT NULL DEFAULT 0 COMMENT '포인트',
|
||||
`status` varchar(20) NOT NULL DEFAULT 'use',
|
||||
`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 'in',
|
||||
`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,
|
||||
`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 DEFAULT 'VPC-CS',
|
||||
`ip` varchar(50) DEFAULT NULL,
|
||||
`domain` varchar(100) DEFAULT NULL,
|
||||
`description` text DEFAULT NULL,
|
||||
`status` varchar(20) NOT NULL DEFAULT 'use',
|
||||
`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='방어정보';
|
||||
/*!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 `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,
|
||||
`model` varchar(50) NOT NULL,
|
||||
`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 `diskinfo`
|
||||
--
|
||||
|
||||
LOCK TABLES `diskinfo` WRITE;
|
||||
/*!40000 ALTER TABLE `diskinfo` DISABLE KEYS */;
|
||||
/*!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,
|
||||
`lineinfo_uid` int(11) NOT NULL,
|
||||
`ip` char(16) NOT NULL,
|
||||
`status` varchar(20) NOT NULL DEFAULT 'use',
|
||||
`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 DEFAULT 'general' COMMENT '회선구분',
|
||||
`title` varchar(100) NOT NULL,
|
||||
`bandwith` varchar(20) NOT NULL COMMENT 'IP 대역',
|
||||
`status` varchar(20) NOT NULL DEFAULT 'use',
|
||||
`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,
|
||||
`userinfo_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 'use',
|
||||
`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 `logger`
|
||||
--
|
||||
|
||||
LOCK TABLES `logger` WRITE;
|
||||
/*!40000 ALTER TABLE `logger` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `logger` 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 'in',
|
||||
`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,
|
||||
`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,
|
||||
`code` varchar(20) NOT NULL,
|
||||
`type` varchar(20) NOT NULL DEFAULT 'Rack',
|
||||
`model` varchar(50) NOT NULL,
|
||||
`description` text DEFAULT NULL,
|
||||
`status` varchar(20) NOT NULL DEFAULT 'use',
|
||||
`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`)
|
||||
) 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 `serverinfos_cpuinfos`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `serverinfos_cpuinfos`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `serverinfos_cpuinfos` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`serverinfo_uid` int(11) NOT NULL,
|
||||
`cpuinfo_uid` int(11) NOT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_serverinfo_TO_serverinfos_cpuinfos` (`serverinfo_uid`),
|
||||
KEY `FK_cpuinfo_TO_serverinfos_cpuinfos` (`cpuinfo_uid`),
|
||||
CONSTRAINT `FK_cpuinfo_TO_serverinfos_cpuinfos` FOREIGN KEY (`cpuinfo_uid`) REFERENCES `cpuinfo` (`uid`),
|
||||
CONSTRAINT `FK_serverinfo_TO_serverinfos_cpuinfos` FOREIGN KEY (`serverinfo_uid`) REFERENCES `serverinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='서버-CPU 연결';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `serverinfos_cpuinfos`
|
||||
--
|
||||
|
||||
LOCK TABLES `serverinfos_cpuinfos` WRITE;
|
||||
/*!40000 ALTER TABLE `serverinfos_cpuinfos` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `serverinfos_cpuinfos` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `serverinfos_diskinfos`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `serverinfos_diskinfos`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `serverinfos_diskinfos` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`serverinfo_uid` int(11) NOT NULL,
|
||||
`diskinfo_uid` int(11) NOT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_serverinfo_TO_serverinfos_diskinfos` (`serverinfo_uid`),
|
||||
KEY `FK_diskinfo_TO_serverinfos_diskinfos` (`diskinfo_uid`),
|
||||
CONSTRAINT `FK_diskinfo_TO_serverinfos_diskinfos` FOREIGN KEY (`diskinfo_uid`) REFERENCES `diskinfo` (`uid`),
|
||||
CONSTRAINT `FK_serverinfo_TO_serverinfos_diskinfos` FOREIGN KEY (`serverinfo_uid`) REFERENCES `serverinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='서버-DISK연결';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `serverinfos_diskinfos`
|
||||
--
|
||||
|
||||
LOCK TABLES `serverinfos_diskinfos` WRITE;
|
||||
/*!40000 ALTER TABLE `serverinfos_diskinfos` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `serverinfos_diskinfos` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `serverinfos_raminfos`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `serverinfos_raminfos`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `serverinfos_raminfos` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`serverinfo_uid` int(11) NOT NULL,
|
||||
`raminfo_uid` int(11) NOT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_serverinfo_TO_serverinfos_raminfos` (`serverinfo_uid`),
|
||||
KEY `FK_raminfo_TO_serverinfos_raminfos` (`raminfo_uid`),
|
||||
CONSTRAINT `FK_raminfo_TO_serverinfos_raminfos` FOREIGN KEY (`raminfo_uid`) REFERENCES `raminfo` (`uid`),
|
||||
CONSTRAINT `FK_serverinfo_TO_serverinfos_raminfos` FOREIGN KEY (`serverinfo_uid`) REFERENCES `serverinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='서버-RAM 연결';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `serverinfos_raminfos`
|
||||
--
|
||||
|
||||
LOCK TABLES `serverinfos_raminfos` WRITE;
|
||||
/*!40000 ALTER TABLE `serverinfos_raminfos` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `serverinfos_raminfos` 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,
|
||||
`rack` varchar(10) NOT NULL COMMENT 'Rack번호',
|
||||
`type` varchar(20) NOT NULL DEFAULT 'hosting',
|
||||
`billing_at` date NOT NULL COMMENT '청구일',
|
||||
`start_at` date DEFAULT NULL COMMENT '개통일',
|
||||
`end_at` date DEFAULT NULL COMMENT '종료일',
|
||||
`status` varchar(20) NOT NULL DEFAULT 'use',
|
||||
`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 `serviceinfos_cpuinfos`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `serviceinfos_cpuinfos`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `serviceinfos_cpuinfos` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`serviceinfo_uid` int(11) NOT NULL,
|
||||
`cpuinfo_uid` int(11) NOT NULL,
|
||||
`billing_type` varchar(20) NOT NULL DEFAULT 'month',
|
||||
`amount` int(11) DEFAULT 0,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_serviceinfo_TO_serviceinfos_cpuinfos` (`serviceinfo_uid`),
|
||||
KEY `FK_cpuinfo_TO_serviceinfos_cpuinfos` (`cpuinfo_uid`),
|
||||
CONSTRAINT `FK_cpuinfo_TO_serviceinfos_cpuinfos` FOREIGN KEY (`cpuinfo_uid`) REFERENCES `cpuinfo` (`uid`),
|
||||
CONSTRAINT `FK_serviceinfo_TO_serviceinfos_cpuinfos` FOREIGN KEY (`serviceinfo_uid`) REFERENCES `serviceinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='서비스_CPU 연결';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `serviceinfos_cpuinfos`
|
||||
--
|
||||
|
||||
LOCK TABLES `serviceinfos_cpuinfos` WRITE;
|
||||
/*!40000 ALTER TABLE `serviceinfos_cpuinfos` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `serviceinfos_cpuinfos` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `serviceinfos_defenceinfos`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `serviceinfos_defenceinfos`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `serviceinfos_defenceinfos` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`serviceinfo_uid` int(11) NOT NULL,
|
||||
`defenceinfo_uid` int(11) NOT NULL,
|
||||
`billing_type` varchar(20) NOT NULL DEFAULT 'month',
|
||||
`amount` int(11) NOT NULL DEFAULT 0,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_serviceinfo_TO_serviceinfos_defenceinfos` (`serviceinfo_uid`),
|
||||
KEY `FK_defenceinfo_TO_serviceinfos_defenceinfos` (`defenceinfo_uid`),
|
||||
CONSTRAINT `FK_defenceinfo_TO_serviceinfos_defenceinfos` FOREIGN KEY (`defenceinfo_uid`) REFERENCES `defenceinfo` (`uid`),
|
||||
CONSTRAINT `FK_serviceinfo_TO_serviceinfos_defenceinfos` 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 `serviceinfos_defenceinfos`
|
||||
--
|
||||
|
||||
LOCK TABLES `serviceinfos_defenceinfos` WRITE;
|
||||
/*!40000 ALTER TABLE `serviceinfos_defenceinfos` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `serviceinfos_defenceinfos` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `serviceinfos_diskinfos`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `serviceinfos_diskinfos`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `serviceinfos_diskinfos` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`serviceinfo_uid` int(11) NOT NULL,
|
||||
`diskinfo_uid` int(11) NOT NULL,
|
||||
`billing_type` varchar(20) NOT NULL DEFAULT 'month',
|
||||
`amount` int(11) DEFAULT 0,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_serviceinfo_TO_serviceinfos_diskinfos` (`serviceinfo_uid`),
|
||||
KEY `FK_diskinfo_TO_serviceinfos_diskinfos` (`diskinfo_uid`),
|
||||
CONSTRAINT `FK_diskinfo_TO_serviceinfos_diskinfos` FOREIGN KEY (`diskinfo_uid`) REFERENCES `diskinfo` (`uid`),
|
||||
CONSTRAINT `FK_serviceinfo_TO_serviceinfos_diskinfos` FOREIGN KEY (`serviceinfo_uid`) REFERENCES `serviceinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='서비스_DISK 연결';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `serviceinfos_diskinfos`
|
||||
--
|
||||
|
||||
LOCK TABLES `serviceinfos_diskinfos` WRITE;
|
||||
/*!40000 ALTER TABLE `serviceinfos_diskinfos` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `serviceinfos_diskinfos` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `serviceinfos_ipinfos`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `serviceinfos_ipinfos`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `serviceinfos_ipinfos` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`serviceinfo_uid` int(11) NOT NULL,
|
||||
`ipinfo_uid` int(11) NOT NULL,
|
||||
`billing_type` varchar(20) NOT NULL DEFAULT 'month',
|
||||
`amount` int(11) NOT NULL DEFAULT 0,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_serviceinfo_TO_serviceinfos_ipinfos` (`serviceinfo_uid`),
|
||||
CONSTRAINT `FK_serviceinfo_TO_serviceinfos_ipinfos` 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 `serviceinfos_ipinfos`
|
||||
--
|
||||
|
||||
LOCK TABLES `serviceinfos_ipinfos` WRITE;
|
||||
/*!40000 ALTER TABLE `serviceinfos_ipinfos` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `serviceinfos_ipinfos` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `serviceinfos_lineinfos`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `serviceinfos_lineinfos`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `serviceinfos_lineinfos` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`serviceinfo_uid` int(11) NOT NULL,
|
||||
`lineinfo_uid` int(11) NOT NULL,
|
||||
`billing_type` varchar(20) NOT NULL DEFAULT 'month',
|
||||
`amount` int(11) NOT NULL DEFAULT 0,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_serviceinfo_TO_serviceinfos_lineinfos` (`serviceinfo_uid`),
|
||||
KEY `FK_lineinfo_TO_serviceinfos_lineinfos` (`lineinfo_uid`),
|
||||
CONSTRAINT `FK_lineinfo_TO_serviceinfos_lineinfos` FOREIGN KEY (`lineinfo_uid`) REFERENCES `lineinfo` (`uid`),
|
||||
CONSTRAINT `FK_serviceinfo_TO_serviceinfos_lineinfos` FOREIGN KEY (`serviceinfo_uid`) REFERENCES `serviceinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='서비스-Line연결';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `serviceinfos_lineinfos`
|
||||
--
|
||||
|
||||
LOCK TABLES `serviceinfos_lineinfos` WRITE;
|
||||
/*!40000 ALTER TABLE `serviceinfos_lineinfos` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `serviceinfos_lineinfos` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `serviceinfos_raminfos`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `serviceinfos_raminfos`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `serviceinfos_raminfos` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`serviceinfo_uid` int(11) NOT NULL,
|
||||
`cpuinfo_uid` int(11) NOT NULL,
|
||||
`billing_type` varchar(20) NOT NULL DEFAULT 'month',
|
||||
`amount` int(11) DEFAULT 0,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_serviceinfo_TO_serviceinfos_raminfos` (`serviceinfo_uid`),
|
||||
KEY `FK_raminfo_TO_serviceinfos_raminfos` (`cpuinfo_uid`),
|
||||
CONSTRAINT `FK_raminfo_TO_serviceinfos_raminfos` FOREIGN KEY (`cpuinfo_uid`) REFERENCES `raminfo` (`uid`),
|
||||
CONSTRAINT `FK_serviceinfo_TO_serviceinfos_raminfos` FOREIGN KEY (`serviceinfo_uid`) REFERENCES `serviceinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='섭비스_RAM 연결';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `serviceinfos_raminfos`
|
||||
--
|
||||
|
||||
LOCK TABLES `serviceinfos_raminfos` WRITE;
|
||||
/*!40000 ALTER TABLE `serviceinfos_raminfos` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `serviceinfos_raminfos` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `serviceinfos_serverinfos`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `serviceinfos_serverinfos`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `serviceinfos_serverinfos` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`serviceinfo_uid` int(11) NOT NULL,
|
||||
`serverinfo_uid` int(11) NOT NULL,
|
||||
`billing_type` varchar(20) NOT NULL DEFAULT 'month',
|
||||
`amount` int(11) NOT NULL DEFAULT 0,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_serviceinfo_TO_serviceinfos_serverinfos` (`serviceinfo_uid`),
|
||||
KEY `FK_serverinfo_TO_serviceinfos_serverinfos` (`serverinfo_uid`),
|
||||
CONSTRAINT `FK_serverinfo_TO_serviceinfos_serverinfos` FOREIGN KEY (`serverinfo_uid`) REFERENCES `serverinfo` (`uid`),
|
||||
CONSTRAINT `FK_serviceinfo_TO_serviceinfos_serverinfos` FOREIGN KEY (`serviceinfo_uid`) REFERENCES `serviceinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='서비스-Server 연결';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `serviceinfos_serverinfos`
|
||||
--
|
||||
|
||||
LOCK TABLES `serviceinfos_serverinfos` WRITE;
|
||||
/*!40000 ALTER TABLE `serviceinfos_serverinfos` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `serviceinfos_serverinfos` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `serviceinfos_softwareinfos`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `serviceinfos_softwareinfos`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `serviceinfos_softwareinfos` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`serviceinfo_uid` int(11) NOT NULL,
|
||||
`softwareinfo_uid` int(11) NOT NULL,
|
||||
`billing_type` varchar(20) NOT NULL DEFAULT 'month',
|
||||
`amount` int(11) NOT NULL DEFAULT 0,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_serviceinfo_TO_serviceinfos_softwareinfos` (`serviceinfo_uid`),
|
||||
KEY `FK_softwareinfo_TO_serviceinfos_softwareinfos` (`softwareinfo_uid`),
|
||||
CONSTRAINT `FK_serviceinfo_TO_serviceinfos_softwareinfos` FOREIGN KEY (`serviceinfo_uid`) REFERENCES `serviceinfo` (`uid`),
|
||||
CONSTRAINT `FK_softwareinfo_TO_serviceinfos_softwareinfos` FOREIGN KEY (`softwareinfo_uid`) REFERENCES `softwareinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='서비스-소프트웨어 연결';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `serviceinfos_softwareinfos`
|
||||
--
|
||||
|
||||
LOCK TABLES `serviceinfos_softwareinfos` WRITE;
|
||||
/*!40000 ALTER TABLE `serviceinfos_softwareinfos` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `serviceinfos_softwareinfos` 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 DEFAULT 'Windows',
|
||||
`model` varchar(50) NOT NULL,
|
||||
`description` text DEFAULT NULL,
|
||||
`status` varchar(20) NOT NULL DEFAULT 'use',
|
||||
`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(5) unsigned 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) NOT NULL DEFAULT 'use',
|
||||
`status` varchar(10) NOT NULL DEFAULT 'use',
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
UNIQUE KEY `id` (`id`),
|
||||
UNIQUE KEY `email` (`email`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
/*!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$9kUte0xrvEkxtI9CzVaeKeCAxzOR4pKPpsCaQHR1YW7dXsCrTLWeC','최준흠','choi.jh@prime-idc.jp','','manager,cloudflare,firewall,director,master','use','2023-05-31 14:55:51','2023-03-23 06:50:04'),(2,'cho.jh','$2y$10$ot/aUXR/W1n4Q3dZA2dZCOxQrpVb2Bq31Y7xFQS3G6D1gtImmyBjm','조준희','cho.jh@prime-idc.jp',NULL,'manager,cloudflare','use','2023-05-30 14:35:55','2023-03-24 02:20:48'),(4,'kimdy','$2y$10$18uyn94xdprzAnt.oYZ5weAvb8rRLhkz/SdQrjEK7yuGhCr9PlUCC','김동윤','kimdy@prime-idc.jp',NULL,'manager,cloudflare','use','2023-03-24 02:21:50','2023-03-24 02:21:50'),(5,'kimhy','$2y$10$.yEKVqY.F7HoSOZijl4uyeulUtfAQ4EDRiyR2JpgFYBuKw.mZoZvG','김효영','khy@prime-idc.jp',NULL,'manager,cloudflare,director','use','2023-03-24 02:23:18','2023-03-24 02:23:18'),(6,'kim.eh','$2y$10$YmwicI.Br4XNyGamfRADMOu.qlkwKd2fmnNkL7YIkNHGndvqYPnCq','김은혁','kim.eh@prime-idc.jp',NULL,'manager,cloudflare','use','2023-03-24 02:23:52','2023-03-24 02:23:52'),(7,'leeph','$2y$10$lR739WzJsW6rDLgchYs7buek4BYeTlKHTQY60RDqRms9Io7RSY3AC','이풍호','leeph@prime-idc.jp',NULL,'manager,cloudflare','use','2023-05-29 16:32:52','2023-03-24 02:24:21'),(8,'jinmingyu','$2y$10$PI8WA6d/z4hDE6hxJoUhbuMH3vTTWH0Ry2Z6fTLUUpwQGaE/9bEZa','김명옥','jinmingyu@idcjp.jp',NULL,'manager,cloudflare','use','2023-07-21 06:48:39','2023-03-24 02:25:00'),(9,'kangdh','$2y$10$gu9OS2DDQQ5H.Hh61t3BSOUp87l35q.xsduVSxvCcn8IgA4jrATgG','강동헌','kang.dh@idcjp.jp',NULL,'manager,cloudflare','use','2023-06-22 23:59:07','2023-03-24 02:25:48'),(10,'yoohs','$2y$10$TGASk98FuZ6Ux6FDquu1aO3rztA01MCle/Vs1.3iaEMQzakAbCzJy','유혜성','yoo.hs@idcjp.jp',NULL,'manager,cloudflare','use','2023-06-02 02:07:19','2023-03-24 02:26:31'),(11,'kim.yh','$2y$10$8GciQXpKYiR3TDWQfh9JjOQAQ.YWGoOSCL0a0/w4XACO0mUgjjbWy','김영환','kim.yh@idcjp.jp',NULL,'manager,cloudflare,firewall','use','2023-10-16 23:08:51','2023-03-24 02:27:05'),(12,'yunmuj','$2y$10$zkgwGVj2JSOVIsxLe8fePe1gvWWaCemfZMktzBlrN8oLb3CKydkZC','윤무정','yunmuj@idcjp.jp',NULL,'manager,cloudflare','use','2024-06-12 00:21:07','2023-03-24 02:27:59'),(13,'kim.mt','$2y$10$3dfkA0oq4LqiJOmjbBGKe.p0Dhj/MDqjoTdw11BOPF/H2qJqnEuHO','김문태','kim.mt@idcjp.jp',NULL,'manager,cloudflare','use','2023-05-31 14:22:43','2023-03-24 02:28:31'),(14,'shin.ms','$2y$10$.jaDkGtm/gZK3ZDF.fJUGOwMI7Zif5588X5AxSMvvk238RDI7spQ6','신민수','shin.ms@idcjp.jp',NULL,'manager,cloudflare','use','2023-03-24 02:29:00','2023-03-24 02:29:00'),(15,'park.sm','$2y$10$BwMxw0uvw2tAdQ0EZQ2/hu.Q7zYu7mbuBPPRTaa14bwG3VLf0cXfu','박선미','park.sm@idcjp.jp',NULL,'manager,cloudflare','use','2024-03-12 02:14:09','2023-03-24 02:29:34'),(19,'park.hg','$2y$10$x7QQOkOEJHVKOnghbHBqYuI12Vsa9KLV8W4wgebCWy1pZiM93/W.e','박혁규','park.hg@prime-idc.jp',NULL,'manager','unuse','2023-09-04 10:27:32','2023-09-04 09:48:02'),(21,'masakuni','$2y$10$di6Y7CqJGbbf72kDyCrOCOafJgk3vqJCYg6N3EtBUc3J6r24/7SFe','김창국','masakuni@prime-idc.jp',NULL,'cloudflare','unuse','2023-12-18 08:56:29','2023-12-18 08:56:29'),(22,'bjh','$2y$10$LnEQ6kz4igRPZeDYwe7UluRiSaMVGN9Jj1fW3QqUUp6zPeLJW9goS','배장훈','bjh@prime-idc.jp',NULL,'cloudflare','unuse','2024-06-06 23:51:19','2024-02-26 01:26:20'),(23,'cho.sh','$2y$10$jmmNrEsFmb2.Zj3OkBXDHuktrIj.NCP/tO2k9kquFBTBssa/lNG6y','조성호','cho.sh@prime-idc.jp','','manager','unuse','2024-10-02 00:45:19','2024-10-02 00:32:30'),(24,'kobn','$2y$10$pWM/XFfSNeSng32sypbDX.WaR4UlM4EDkYKCQfFkYIOC7Ppg0nc5G','고병남','ko@prime-idc.jp',NULL,'manager,cloudflare','use',NULL,'2024-10-29 06:30:19'),(25,'jeong.sg','$2y$10$OzH6140JztiUEs4s/VHbPOxfxubFooqwqVhGpdFG8OJCGAFXNu546','정상구','jeong.sg@prime-idc.jp',NULL,'manager,cloudflare','use','2025-01-23 00:30:13','2025-01-23 00:29:46'),(38,'choi.jh234222222','$2y$10$zCgVXnCClLbftgeGxH0rk.v3o1zHkoO8Ywq2UDmGkdjIhK5mLJhvu','adfasdfas2222','postfixadmin@idcjp.jp2222222','043443432722222','cloudflare','pause',NULL,'2025-05-02 04:49:19'),(40,'choi.jh2342222224','$2y$10$hP/z5Nojh4eNKnTxZe3Cm.0NtvqHW2U2U0vvVDSzelKRaXSxlVj2y','adfasdfas22222221234','postfixadmin@idcjp.jp3234343','04344343271234','manager,cloudflare','pause',NULL,'2025-05-02 06:34:43');
|
||||
/*!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-05-21 16:10:32
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,62 +0,0 @@
|
||||
/*!999999\- enable the sandbox mode */
|
||||
-- MariaDB dump 10.19 Distrib 10.5.25-MariaDB, for Win64 (AMD64)
|
||||
--
|
||||
-- Host: localhost Database: cfmgr
|
||||
-- ------------------------------------------------------
|
||||
-- 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 `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(5) unsigned 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) NOT NULL DEFAULT 'use',
|
||||
`status` varchar(10) NOT NULL DEFAULT 'use',
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
UNIQUE KEY `id` (`id`),
|
||||
UNIQUE KEY `email` (`email`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
/*!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$9kUte0xrvEkxtI9CzVaeKeCAxzOR4pKPpsCaQHR1YW7dXsCrTLWeC','최준흠','choi.jh@prime-idc.jp',NULL,'user,vip,manager,cloudflare,firewall,director,master','use','2023-05-31 14:55:51','2023-03-23 06:50:04'),(2,'cho.jh','$2y$10$ot/aUXR/W1n4Q3dZA2dZCOxQrpVb2Bq31Y7xFQS3G6D1gtImmyBjm','조준희','cho.jh@prime-idc.jp',NULL,'manager,cloudflare','use','2023-05-30 14:35:55','2023-03-24 02:20:48'),(4,'kimdy','$2y$10$18uyn94xdprzAnt.oYZ5weAvb8rRLhkz/SdQrjEK7yuGhCr9PlUCC','김동윤','kimdy@prime-idc.jp',NULL,'manager,cloudflare','use','2023-03-24 02:21:50','2023-03-24 02:21:50'),(5,'kimhy','$2y$10$.yEKVqY.F7HoSOZijl4uyeulUtfAQ4EDRiyR2JpgFYBuKw.mZoZvG','김효영','khy@prime-idc.jp',NULL,'manager,cloudflare,director','use','2023-03-24 02:23:18','2023-03-24 02:23:18'),(6,'kim.eh','$2y$10$YmwicI.Br4XNyGamfRADMOu.qlkwKd2fmnNkL7YIkNHGndvqYPnCq','김은혁','kim.eh@prime-idc.jp',NULL,'manager,cloudflare','use','2023-03-24 02:23:52','2023-03-24 02:23:52'),(7,'leeph','$2y$10$lR739WzJsW6rDLgchYs7buek4BYeTlKHTQY60RDqRms9Io7RSY3AC','이풍호','leeph@prime-idc.jp',NULL,'manager,cloudflare','use','2023-05-29 16:32:52','2023-03-24 02:24:21'),(8,'jinmingyu','$2y$10$PI8WA6d/z4hDE6hxJoUhbuMH3vTTWH0Ry2Z6fTLUUpwQGaE/9bEZa','김명옥','jinmingyu@idcjp.jp',NULL,'manager,cloudflare','use','2023-07-21 06:48:39','2023-03-24 02:25:00'),(9,'kangdh','$2y$10$gu9OS2DDQQ5H.Hh61t3BSOUp87l35q.xsduVSxvCcn8IgA4jrATgG','강동헌','kang.dh@idcjp.jp',NULL,'manager,cloudflare','use','2023-06-22 23:59:07','2023-03-24 02:25:48'),(10,'yoohs','$2y$10$TGASk98FuZ6Ux6FDquu1aO3rztA01MCle/Vs1.3iaEMQzakAbCzJy','유혜성','yoo.hs@idcjp.jp',NULL,'manager,cloudflare','use','2023-06-02 02:07:19','2023-03-24 02:26:31'),(11,'kim.yh','$2y$10$8GciQXpKYiR3TDWQfh9JjOQAQ.YWGoOSCL0a0/w4XACO0mUgjjbWy','김영환','kim.yh@idcjp.jp',NULL,'manager,cloudflare,firewall','use','2023-10-16 23:08:51','2023-03-24 02:27:05'),(12,'yunmuj','$2y$10$zkgwGVj2JSOVIsxLe8fePe1gvWWaCemfZMktzBlrN8oLb3CKydkZC','윤무정','yunmuj@idcjp.jp',NULL,'manager,cloudflare','use','2024-06-12 00:21:07','2023-03-24 02:27:59'),(13,'kim.mt','$2y$10$3dfkA0oq4LqiJOmjbBGKe.p0Dhj/MDqjoTdw11BOPF/H2qJqnEuHO','김문태','kim.mt@idcjp.jp',NULL,'manager,cloudflare','use','2023-05-31 14:22:43','2023-03-24 02:28:31'),(14,'shin.ms','$2y$10$.jaDkGtm/gZK3ZDF.fJUGOwMI7Zif5588X5AxSMvvk238RDI7spQ6','신민수','shin.ms@idcjp.jp',NULL,'manager,cloudflare','use','2023-03-24 02:29:00','2023-03-24 02:29:00'),(15,'park.sm','$2y$10$BwMxw0uvw2tAdQ0EZQ2/hu.Q7zYu7mbuBPPRTaa14bwG3VLf0cXfu','박선미','park.sm@idcjp.jp',NULL,'manager,cloudflare','use','2024-03-12 02:14:09','2023-03-24 02:29:34'),(19,'park.hg','$2y$10$x7QQOkOEJHVKOnghbHBqYuI12Vsa9KLV8W4wgebCWy1pZiM93/W.e','박혁규','park.hg@prime-idc.jp',NULL,'manager','unuse','2023-09-04 10:27:32','2023-09-04 09:48:02'),(21,'masakuni','$2y$10$di6Y7CqJGbbf72kDyCrOCOafJgk3vqJCYg6N3EtBUc3J6r24/7SFe','김창국','masakuni@prime-idc.jp',NULL,'cloudflare','unuse','2023-12-18 08:56:29','2023-12-18 08:56:29'),(22,'bjh','$2y$10$LnEQ6kz4igRPZeDYwe7UluRiSaMVGN9Jj1fW3QqUUp6zPeLJW9goS','배장훈','bjh@prime-idc.jp',NULL,'cloudflare','unuse','2024-06-06 23:51:19','2024-02-26 01:26:20'),(23,'cho.sh','$2y$10$jmmNrEsFmb2.Zj3OkBXDHuktrIj.NCP/tO2k9kquFBTBssa/lNG6y','조성호','cho.sh@prime-idc.jp',NULL,'user','unuse','2024-10-02 00:45:19','2024-10-02 00:32:30'),(24,'kobn','$2y$10$pWM/XFfSNeSng32sypbDX.WaR4UlM4EDkYKCQfFkYIOC7Ppg0nc5G','고병남','ko@prime-idc.jp',NULL,'manager,cloudflare','use',NULL,'2024-10-29 06:30:19'),(25,'jeong.sg','$2y$10$OzH6140JztiUEs4s/VHbPOxfxubFooqwqVhGpdFG8OJCGAFXNu546','정상구','jeong.sg@prime-idc.jp',NULL,'manager,cloudflare','use','2025-01-23 00:30:13','2025-01-23 00:29:46');
|
||||
/*!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-04-29 9:31:24
|
||||
@ -9,11 +9,15 @@ class ServiceEntity extends CustomerEntity
|
||||
{
|
||||
const PK = ServiceModel::PK;
|
||||
const TITLE = ServiceModel::TITLE;
|
||||
|
||||
public function getServerInfoUID()
|
||||
{
|
||||
return $this->attributes['serverinfo_uid'];
|
||||
}
|
||||
public function getPartEntities(string $type): array
|
||||
{
|
||||
return $this->attributes[$type] ?? [];
|
||||
}
|
||||
|
||||
public function addPartEntity(string $type, PartEntity $partEntity): void
|
||||
{
|
||||
if (!isset($this->attributes[$type])) {
|
||||
|
||||
@ -9,12 +9,12 @@ class ServiceServerEntity extends CustomerEntity
|
||||
const PK = ServiceServerModel::PK;
|
||||
const TITLE = ServiceServerModel::TITLE;
|
||||
|
||||
public function getServiceInfo()
|
||||
public function getServiceInfoUID()
|
||||
{
|
||||
return $this->attributes['serviceinfo_uid'];
|
||||
}
|
||||
|
||||
public function getServerInfo()
|
||||
public function getServerInfoUID()
|
||||
{
|
||||
return $this->attributes['serverinfo_uid'];
|
||||
}
|
||||
|
||||
11
app/Entities/Equipment/Part/CpuEntity.php
Normal file
11
app/Entities/Equipment/Part/CpuEntity.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Equipment\Part;
|
||||
|
||||
use App\Models\Equipment\Part\CpuModel;
|
||||
|
||||
class CpuEntity extends PartEntity
|
||||
{
|
||||
const PK = CpuModel::PK;
|
||||
const TITLE = CpuModel::TITLE;
|
||||
}
|
||||
11
app/Entities/Equipment/Part/DiskEntity.php
Normal file
11
app/Entities/Equipment/Part/DiskEntity.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Equipment\Part;
|
||||
|
||||
use App\Models\Equipment\Part\DiskModel;
|
||||
|
||||
class DiskEntity extends PartEntity
|
||||
{
|
||||
const PK = DiskModel::PK;
|
||||
const TITLE = DiskModel::TITLE;
|
||||
}
|
||||
14
app/Entities/Equipment/Part/PartEntity.php
Normal file
14
app/Entities/Equipment/Part/PartEntity.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Equipment\Part;
|
||||
|
||||
|
||||
use App\Entities\Equipment\EquipmentEntity;
|
||||
|
||||
abstract class PartEntity extends EquipmentEntity
|
||||
{
|
||||
public function __construct(array|null $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
}
|
||||
}
|
||||
11
app/Entities/Equipment/Part/RamEntity.php
Normal file
11
app/Entities/Equipment/Part/RamEntity.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Equipment\Part;
|
||||
|
||||
use App\Models\Equipment\Part\RamModel;
|
||||
|
||||
class RamEntity extends PartEntity
|
||||
{
|
||||
const PK = RamModel::PK;
|
||||
const TITLE = RamModel::TITLE;
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Equipment;
|
||||
|
||||
use App\Models\Equipment\PartModel;
|
||||
|
||||
class PartEntity extends EquipmentEntity
|
||||
{
|
||||
const PK = PartModel::PK;
|
||||
const TITLE = PartModel::TITLE;
|
||||
|
||||
public function getType(): string
|
||||
{
|
||||
return $this->attributes['type'];
|
||||
}
|
||||
}
|
||||
@ -9,12 +9,12 @@ class ServerPartEntity extends EquipmentEntity
|
||||
const PK = ServerPartModel::PK;
|
||||
const TITLE = ServerPartModel::TITLE;
|
||||
|
||||
public function getServerInfo()
|
||||
public function getServerInfoUID()
|
||||
{
|
||||
return $this->attributes['serverinfo_uid'];
|
||||
}
|
||||
|
||||
public function getPartInfo()
|
||||
public function getPartInfoUID()
|
||||
{
|
||||
return $this->attributes['partinfo_uid'];
|
||||
}
|
||||
|
||||
@ -123,9 +123,6 @@ class CommonHelper
|
||||
case 'close':
|
||||
$msg .= "window.close();";
|
||||
break;
|
||||
case 'back':
|
||||
$msg .= "history.back();";
|
||||
break;
|
||||
default:
|
||||
$msg .= $url ? "location.href=\"{$url}\";" : "";
|
||||
break;
|
||||
|
||||
@ -5,7 +5,7 @@ namespace App\Helpers\Customer;
|
||||
use App\Helpers\CommonHelper;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class CustomerHelper extends CommonHelper
|
||||
abstract class CustomerHelper extends CommonHelper
|
||||
{
|
||||
protected function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
|
||||
@ -17,13 +17,12 @@ class ServiceHelper extends CustomerHelper
|
||||
{
|
||||
$value = $viewDatas['entity']->$field ?? "";
|
||||
switch ($field) {
|
||||
case "SERVER":
|
||||
case "IP":
|
||||
case "DEFENCE":
|
||||
case "SOFTWARE":
|
||||
case "CPU":
|
||||
case "RAM":
|
||||
case "DISK":
|
||||
case "DEFENCE":
|
||||
case "SOFTWARE":
|
||||
$temps = [];
|
||||
foreach ($viewDatas['entity']->getPartEntities($field) as $partEntity) {
|
||||
$temps[] = "<div>" . $partEntity->getTitle() . "</div>";
|
||||
@ -33,7 +32,7 @@ class ServiceHelper extends CustomerHelper
|
||||
'변경',
|
||||
$field,
|
||||
[
|
||||
"data-src" => "/admin/equipment/serverpart?type={$field}&serverinfo_uid={$viewDatas['entity']->getPK()}",
|
||||
"data-src" => "/admin/customer/servicepart?type={$field}&serviceinfo_uid={$viewDatas['entity']->getPK()}",
|
||||
"data-bs-toggle" => "modal",
|
||||
"data-bs-target" => "#index_action_form",
|
||||
...$extras
|
||||
|
||||
@ -5,7 +5,7 @@ namespace App\Helpers\Equipment;
|
||||
use App\Helpers\CommonHelper;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class EquipmentHelper extends CommonHelper
|
||||
abstract class EquipmentHelper extends CommonHelper
|
||||
{
|
||||
protected function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers\Equipment;
|
||||
namespace App\Helpers\Equipment\Part;
|
||||
|
||||
use App\Models\Equipment\PartModel;
|
||||
use App\Models\Equipment\Part\CpuModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class PartHelper extends EquipmentHelper
|
||||
class CpuHelper extends PartHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->setTitleField(field: PartModel::TITLE);
|
||||
$this->setTitleField(field: CpuModel::TITLE);
|
||||
}
|
||||
}
|
||||
16
app/Helpers/Equipment/Part/DiskHelper.php
Normal file
16
app/Helpers/Equipment/Part/DiskHelper.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers\Equipment\Part;
|
||||
|
||||
use App\Models\Equipment\Part\DiskModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class DiskHelper extends PartHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->setTitleField(field: DiskModel::TITLE);
|
||||
}
|
||||
}
|
||||
14
app/Helpers/Equipment/Part/PartHelper.php
Normal file
14
app/Helpers/Equipment/Part/PartHelper.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers\Equipment\Part;
|
||||
|
||||
use App\Helpers\Equipment\EquipmentHelper;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
abstract class PartHelper extends EquipmentHelper
|
||||
{
|
||||
protected function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
}
|
||||
}
|
||||
16
app/Helpers/Equipment/Part/RamHelper.php
Normal file
16
app/Helpers/Equipment/Part/RamHelper.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers\Equipment\Part;
|
||||
|
||||
use App\Models\Equipment\Part\RamModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class RamHelper extends PartHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->setTitleField(field: RamModel::TITLE);
|
||||
}
|
||||
}
|
||||
@ -3,6 +3,8 @@ return [
|
||||
'title' => "고객서비스정보",
|
||||
'label' => [
|
||||
'clientinfo_uid' => "고객명",
|
||||
'lineinfo_uid' => "회선정보",
|
||||
'serverinfo_uid' => "서버정보",
|
||||
'rack' => "Rack번호",
|
||||
'type' => "종류",
|
||||
'billing_at' => "청구일",
|
||||
@ -11,13 +13,12 @@ return [
|
||||
'status' => "상태",
|
||||
'updated_at' => "수정일",
|
||||
'created_at' => "신청일",
|
||||
'DEFENCE' => "방어",
|
||||
'SERVER' => "서버",
|
||||
'IP' => "IP",
|
||||
'CPU' => "CPU",
|
||||
'RAM' => "RAM",
|
||||
'DISK' => "DISK",
|
||||
'SOFTWARE' => "SOFTWARE",
|
||||
'DEFENCE' => "방어",
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'type' => "hosting",
|
||||
|
||||
@ -1,28 +1,18 @@
|
||||
<?php
|
||||
return [
|
||||
'title' => "부품장비정보",
|
||||
'title' => "CPU정보",
|
||||
'label' => [
|
||||
'type' => "종류",
|
||||
'model' => "모델",
|
||||
'price' => "금액",
|
||||
'description' => "설명",
|
||||
'status' => "상태",
|
||||
'updated_at' => "수정일",
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'type' => 'CPU',
|
||||
'status' => "use"
|
||||
],
|
||||
"TYPE" => [
|
||||
"CPU" => "CPU",
|
||||
"RAM" => "RAM",
|
||||
"DISK" => "DISK",
|
||||
"colocation" => "코로케이션",
|
||||
],
|
||||
"STATUS" => [
|
||||
"use" => "사용가능",
|
||||
"pause" => "일시정지",
|
||||
"occupied" => "사용중",
|
||||
],
|
||||
];
|
||||
18
app/Language/en/Equipment/Part/Disk.php
Normal file
18
app/Language/en/Equipment/Part/Disk.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
return [
|
||||
'title' => "DISK정보",
|
||||
'label' => [
|
||||
'model' => "모델",
|
||||
'description' => "설명",
|
||||
'status' => "상태",
|
||||
'updated_at' => "수정일",
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'status' => "use"
|
||||
],
|
||||
"STATUS" => [
|
||||
"use" => "사용가능",
|
||||
"pause" => "일시정지",
|
||||
],
|
||||
];
|
||||
18
app/Language/en/Equipment/Part/Ram.php
Normal file
18
app/Language/en/Equipment/Part/Ram.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
return [
|
||||
'title' => "RAM정보",
|
||||
'label' => [
|
||||
'model' => "모델",
|
||||
'description' => "설명",
|
||||
'status' => "상태",
|
||||
'updated_at' => "수정일",
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'status' => "use"
|
||||
],
|
||||
"STATUS" => [
|
||||
"use" => "사용가능",
|
||||
"pause" => "일시정지",
|
||||
],
|
||||
];
|
||||
@ -14,6 +14,8 @@ class ServiceModel extends CustomerModel
|
||||
protected $returnType = ServiceEntity::class;
|
||||
protected $allowedFields = [
|
||||
"clientinfo_uid",
|
||||
"lineinfo_uid",
|
||||
"serverinfo_uid",
|
||||
"rack",
|
||||
"type",
|
||||
"billing_at",
|
||||
@ -33,6 +35,8 @@ class ServiceModel extends CustomerModel
|
||||
}
|
||||
switch ($field) {
|
||||
case "clientinfo_uid":
|
||||
case "lineinfo_uid":
|
||||
case "serverinfo_uid":
|
||||
$rule = "required|numeric";
|
||||
break;
|
||||
case "rack":
|
||||
|
||||
@ -1,21 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Equipment;
|
||||
namespace App\Models\Equipment\Part;
|
||||
|
||||
use App\Entities\Equipment\PartEntity;
|
||||
use App\Entities\Equipment\Part\CpuEntity;
|
||||
|
||||
class PartModel extends EquipmentModel
|
||||
class CpuModel extends PartModel
|
||||
{
|
||||
const TABLE = "partinfo";
|
||||
const TABLE = "cpuinfo";
|
||||
const PK = "uid";
|
||||
const TITLE = "model";
|
||||
protected $table = self::TABLE;
|
||||
protected $primaryKey = self::PK;
|
||||
protected $returnType = PartEntity::class;
|
||||
protected $returnType = CpuEntity::class;
|
||||
protected $allowedFields = [
|
||||
"type",
|
||||
"model",
|
||||
"description",
|
||||
"status",
|
||||
"updated_at"
|
||||
];
|
||||
@ -30,7 +28,6 @@ class PartModel extends EquipmentModel
|
||||
}
|
||||
switch ($field) {
|
||||
case "model":
|
||||
case "type":
|
||||
$rule = "required|trim|string";
|
||||
break;
|
||||
default:
|
||||
39
app/Models/Equipment/Part/DiskModel.php
Normal file
39
app/Models/Equipment/Part/DiskModel.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Equipment\Part;
|
||||
|
||||
use App\Entities\Equipment\Part\DiskEntity;
|
||||
|
||||
class DiskModel extends PartModel
|
||||
{
|
||||
const TABLE = "cpuinfo";
|
||||
const PK = "uid";
|
||||
const TITLE = "model";
|
||||
protected $table = self::TABLE;
|
||||
protected $primaryKey = self::PK;
|
||||
protected $returnType = DiskEntity::class;
|
||||
protected $allowedFields = [
|
||||
"model",
|
||||
"status",
|
||||
"updated_at"
|
||||
];
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
public function getFieldRule(string $action, string $field): string
|
||||
{
|
||||
if (is_array($field)) {
|
||||
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
|
||||
}
|
||||
switch ($field) {
|
||||
case "model":
|
||||
$rule = "required|trim|string";
|
||||
break;
|
||||
default:
|
||||
$rule = parent::getFieldRule($action, $field);
|
||||
break;
|
||||
}
|
||||
return $rule;
|
||||
}
|
||||
}
|
||||
13
app/Models/Equipment/Part/PartModel.php
Normal file
13
app/Models/Equipment/Part/PartModel.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Equipment\Part;
|
||||
|
||||
use App\Models\Equipment\EquipmentModel;
|
||||
|
||||
abstract class PartModel extends EquipmentModel
|
||||
{
|
||||
protected function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
39
app/Models/Equipment/Part/RamModel.php
Normal file
39
app/Models/Equipment/Part/RamModel.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Equipment\Part;
|
||||
|
||||
use App\Entities\Equipment\Part\RamEntity;
|
||||
|
||||
class RamModel extends PartModel
|
||||
{
|
||||
const TABLE = "cpuinfo";
|
||||
const PK = "uid";
|
||||
const TITLE = "model";
|
||||
protected $table = self::TABLE;
|
||||
protected $primaryKey = self::PK;
|
||||
protected $returnType = RamEntity::class;
|
||||
protected $allowedFields = [
|
||||
"model",
|
||||
"status",
|
||||
"updated_at"
|
||||
];
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
public function getFieldRule(string $action, string $field): string
|
||||
{
|
||||
if (is_array($field)) {
|
||||
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
|
||||
}
|
||||
switch ($field) {
|
||||
case "model":
|
||||
$rule = "required|trim|string";
|
||||
break;
|
||||
default:
|
||||
$rule = parent::getFieldRule($action, $field);
|
||||
break;
|
||||
}
|
||||
return $rule;
|
||||
}
|
||||
}
|
||||
@ -92,11 +92,12 @@ abstract class CommonService
|
||||
}
|
||||
return $rule;
|
||||
}
|
||||
public function getFormFieldOption(string $field, array $options = []): array
|
||||
final public function getFormFieldOption(string $field, mixed $where = null): array
|
||||
{
|
||||
$options = [];
|
||||
switch ($field) {
|
||||
default:
|
||||
foreach ($this->getEntities() as $entity) {
|
||||
foreach ($this->getEntities($where) as $entity) {
|
||||
$options[$entity->getPK()] = $entity->getTitle();
|
||||
}
|
||||
break;
|
||||
|
||||
@ -39,22 +39,6 @@ class ClientService extends CustomerService
|
||||
{
|
||||
return ['status'];
|
||||
}
|
||||
public function getFormFieldOption(string $field, array $options = []): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'clientinfo_uid':
|
||||
foreach ($this->getEntities() as $entity) {
|
||||
$options[$entity->getPK()] = $entity->getTitle();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
break;
|
||||
}
|
||||
// dd($options);
|
||||
return $options;
|
||||
}
|
||||
|
||||
public function create(array $formDatas, mixed $entity = new ClientEntity()): ClientEntity
|
||||
{
|
||||
$formDatas['role'] = implode(DEFAULTS["DELIMITER_ROLE"], $formDatas['role']);
|
||||
|
||||
@ -37,10 +37,10 @@ class ServicePartService extends CustomerService
|
||||
}
|
||||
public function getFilterFields(): array
|
||||
{
|
||||
return ["serviceinfo_uid", "type", "partinfo_uid"];
|
||||
return ["serviceinfo_uid", "billing_type", "partinfo_uid"];
|
||||
}
|
||||
public function getBatchJobFields(): array
|
||||
{
|
||||
return ["type", "partinfo_uid"];
|
||||
return ["billing_type", "partinfo_uid"];
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,6 +31,8 @@ class ServiceService extends CustomerService
|
||||
"clientinfo_uid",
|
||||
"type",
|
||||
"rack",
|
||||
"lineinfo_uid",
|
||||
"serverinfo_uid",
|
||||
"billing_at",
|
||||
"start_at",
|
||||
"end_at",
|
||||
@ -39,7 +41,7 @@ class ServiceService extends CustomerService
|
||||
}
|
||||
public function getFilterFields(): array
|
||||
{
|
||||
return ["clientinfo_uid", 'type', 'status'];
|
||||
return ["clientinfo_uid", "lineinfo_uid", "serverinfo_uid", 'type', 'status'];
|
||||
}
|
||||
public function getBatchJobFields(): array
|
||||
{
|
||||
|
||||
@ -41,19 +41,4 @@ class IpService extends EquipmentService
|
||||
{
|
||||
return ['status'];
|
||||
}
|
||||
public function getFormFieldOption(string $field, array $options = []): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'IP':
|
||||
foreach ($this->getEntities(['status' => 'use']) as $entity) {
|
||||
$options[$entity->getPK()] = $entity->getTitle();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
break;
|
||||
}
|
||||
// dd($options);
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
|
||||
28
app/Services/Equipment/Part/CpuService.php
Normal file
28
app/Services/Equipment/Part/CpuService.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Equipment\Part;
|
||||
|
||||
use App\Entities\Equipment\Part\CpuEntity;
|
||||
use App\Models\Equipment\Part\CpuModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class CpuService extends PartService
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
}
|
||||
public function getClassName(): string
|
||||
{
|
||||
return parent::getClassName() . DIRECTORY_SEPARATOR . "Cpu";
|
||||
}
|
||||
public function getModelClass(): CpuModel
|
||||
{
|
||||
return new CpuModel();
|
||||
}
|
||||
public function getEntityClass(): CpuEntity
|
||||
{
|
||||
return new CpuEntity();
|
||||
}
|
||||
}
|
||||
28
app/Services/Equipment/Part/DiskService.php
Normal file
28
app/Services/Equipment/Part/DiskService.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Equipment\Part;
|
||||
|
||||
use App\Entities\Equipment\Part\DiskEntity;
|
||||
use App\Models\Equipment\Part\DiskModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class DiskService extends PartService
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
}
|
||||
public function getClassName(): string
|
||||
{
|
||||
return parent::getClassName() . DIRECTORY_SEPARATOR . "Disk";
|
||||
}
|
||||
public function getModelClass(): DiskModel
|
||||
{
|
||||
return new DiskModel();
|
||||
}
|
||||
public function getEntityClass(): DiskEntity
|
||||
{
|
||||
return new DiskEntity();
|
||||
}
|
||||
}
|
||||
35
app/Services/Equipment/Part/PartService.php
Normal file
35
app/Services/Equipment/Part/PartService.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Equipment\Part;
|
||||
|
||||
|
||||
use App\Services\Equipment\EquipmentService;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
abstract class PartService extends EquipmentService
|
||||
{
|
||||
protected function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
}
|
||||
public function getClassName(): string
|
||||
{
|
||||
return parent::getClassName() . DIRECTORY_SEPARATOR . "Part";
|
||||
}
|
||||
|
||||
public function getFields(): array
|
||||
{
|
||||
return [
|
||||
"model",
|
||||
"status",
|
||||
];
|
||||
}
|
||||
public function getFilterFields(): array
|
||||
{
|
||||
return ['status'];
|
||||
}
|
||||
public function getBatchJobFields(): array
|
||||
{
|
||||
return ['status'];
|
||||
}
|
||||
}
|
||||
28
app/Services/Equipment/Part/RamService.php
Normal file
28
app/Services/Equipment/Part/RamService.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Equipment\Part;
|
||||
|
||||
use App\Entities\Equipment\Part\RamEntity;
|
||||
use App\Models\Equipment\Part\RamModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class RamService extends PartService
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
}
|
||||
public function getClassName(): string
|
||||
{
|
||||
return parent::getClassName() . DIRECTORY_SEPARATOR . "Ram";
|
||||
}
|
||||
public function getModelClass(): RamModel
|
||||
{
|
||||
return new RamModel();
|
||||
}
|
||||
public function getEntityClass(): RamEntity
|
||||
{
|
||||
return new RamEntity();
|
||||
}
|
||||
}
|
||||
@ -1,63 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Equipment;
|
||||
|
||||
use App\Entities\Equipment\PartEntity;
|
||||
use App\Models\Equipment\PartModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
use App\Services\Equipment\EquipmentService; // Ensure this path is correct and the class exists or create the class if missing
|
||||
|
||||
class PartService extends EquipmentService
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
}
|
||||
public function getClassName(): string
|
||||
{
|
||||
return parent::getClassName() . DIRECTORY_SEPARATOR . "Part";
|
||||
}
|
||||
public function getModelClass(): PartModel
|
||||
{
|
||||
return new PartModel();
|
||||
}
|
||||
public function getEntityClass(): PartEntity
|
||||
{
|
||||
return new PartEntity();
|
||||
}
|
||||
public function getFields(): array
|
||||
{
|
||||
return [
|
||||
"type",
|
||||
"model",
|
||||
"status",
|
||||
"description",
|
||||
];
|
||||
}
|
||||
public function getFilterFields(): array
|
||||
{
|
||||
return ["type", 'status'];
|
||||
}
|
||||
public function getBatchJobFields(): array
|
||||
{
|
||||
return ['type', 'status'];
|
||||
}
|
||||
public function getFormFieldOption(string $field, array $options = []): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'CPU':
|
||||
case 'RAM':
|
||||
case 'DISK':
|
||||
foreach ($this->getEntities(['type' => $field]) as $entity) {
|
||||
$options[$entity->getPK()] = $entity->getTitle();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
break;
|
||||
}
|
||||
// dd($options);
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
@ -44,20 +44,9 @@ class ServerService extends EquipmentService
|
||||
{
|
||||
return ["type", 'model', 'status'];
|
||||
}
|
||||
|
||||
public function getFormFieldOption(string $field, array $options = []): array
|
||||
//서비스에서 사용중인 서버를 occupied로 변경
|
||||
public function setOccupied(ServerEntity $entity): ServerEntity
|
||||
{
|
||||
switch ($field) {
|
||||
case 'serverinfo_uid':
|
||||
foreach ($this->getEntities() as $entity) {
|
||||
$options[$entity->getPK()] = $entity->getTitle();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
break;
|
||||
}
|
||||
// dd($options);
|
||||
return $options;
|
||||
return $this->getModel()->modify($entity, ['status' => 'occupied']);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?>
|
||||
<?= $this->section('content') ?>
|
||||
<?php if ($error = session('error')): ?><?= $viewDatas['helper']->alert($error) ?><?php endif ?>
|
||||
<div id="container" class="content">
|
||||
<link href="/css/<?= $viewDatas['layout'] ?>/form.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<script src="/js/<?= $viewDatas['layout'] ?>/form.js" referrerpolicy="origin"></script>
|
||||
@ -26,6 +27,5 @@
|
||||
<div class="text-center"><?= form_submit('', '입력', array("class" => "btn btn-outline btn-primary")); ?></div>
|
||||
<?= form_close(); ?>
|
||||
</div>
|
||||
<?php if ($error = session('error')): ?><?= $viewDatas['helper']->alert($error) ?><?php endif ?>
|
||||
</div>
|
||||
<?= $this->endSection() ?>
|
||||
@ -1,5 +1,6 @@
|
||||
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?>
|
||||
<?= $this->section('content') ?>
|
||||
<?php if ($error = session('error')): ?><?= $viewDatas['helper']->alert($error) ?><?php endif ?>
|
||||
<div class="layout_top"><?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?></div>
|
||||
<!-- Layout Middle Start -->
|
||||
<table class="layout_middle">
|
||||
@ -16,6 +17,7 @@
|
||||
<link href="/css/<?= $viewDatas['layout'] ?>/index.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<div class="index_body">
|
||||
<?= $this->include("templates/{$viewDatas['layout']}/index_content_top"); ?>
|
||||
|
||||
<?= form_open(current_url(), ['id' => 'batchjob_form', 'method' => "post"]) ?>
|
||||
<table class="index_table data table table-bordered table-hover table-striped" data-rtc-resizable-table="reisze_table">
|
||||
<thead>
|
||||
@ -55,9 +57,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php if ($error = session('error')): ?><?= $viewDatas['helper']->alert($error) ?><?php endif ?>
|
||||
<!-- Layout Middle End -->
|
||||
<div class="layout_bottom">
|
||||
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/bottom'); ?>
|
||||
</div>
|
||||
<div class="layout_bottom"><?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/bottom'); ?></div>
|
||||
<?= $this->endSection() ?>
|
||||
@ -1,5 +1,6 @@
|
||||
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?>
|
||||
<?= $this->section('content') ?>
|
||||
<?php if ($error = session('error')): ?><?= $viewDatas['helper']->alert($error) ?><?php endif ?>
|
||||
<div id="container" class="content">
|
||||
<link href="/css/<?= $viewDatas['layout'] ?>/form.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<script src="/js/<?= $viewDatas['layout'] ?>/form.js" referrerpolicy="origin"></script>
|
||||
@ -26,6 +27,5 @@
|
||||
<div class="text-center"><?= form_submit("", '수정', ["class" => "btn btn-outline btn-primary"]) ?></div>
|
||||
<?= form_close(); ?>
|
||||
</div>
|
||||
<?php if ($error = session('error')): ?><?= $viewDatas['helper']->alert($error) ?><?php endif ?>
|
||||
</div>
|
||||
<?= $this->endSection() ?>
|
||||
@ -1,5 +1,6 @@
|
||||
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?>
|
||||
<?= $this->section('content') ?>
|
||||
<?php if ($error = session('error')): ?><?= $viewDatas['helper']->alert($error) ?><?php endif ?>
|
||||
<!-- Layout Right Start -->
|
||||
<div id="container" class="layout_content">
|
||||
<link href="/css/<?= $viewDatas['layout'] ?>/index.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
@ -32,12 +33,12 @@
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?= $this->include("templates/{$viewDatas['layout']}/index_content_batchjob"); ?>
|
||||
<?= form_close() ?>
|
||||
<div class=" index_pagination"><?= $viewDatas['pagination'] ?></div>
|
||||
</div>
|
||||
<div class="index_bottom"><?= $this->include("templates/common/" . (isset($viewDatas['modal_type']) ? $viewDatas['modal_type'] : 'modal_fetch')); ?></div>
|
||||
<script type="text/javascript" src="/js/<?= $viewDatas['layout'] ?>/index.js"></script>
|
||||
</div>
|
||||
<?php if ($error = session('error')): ?><?= $viewDatas['helper']->alert($error) ?><?php endif ?>
|
||||
<!-- Layout Middle End -->
|
||||
<?= $this->endSection() ?>
|
||||
@ -1,5 +1,6 @@
|
||||
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?>
|
||||
<?= $this->section('content') ?>
|
||||
<?php if ($error = session('error')): ?><?= $viewDatas['helper']->alert($error) ?><?php endif ?>
|
||||
<div id="container" class="content">
|
||||
<link href="/css/<?= $viewDatas['layout'] ?>/form.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<div class="action_form">
|
||||
|
||||
@ -11,16 +11,22 @@
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/equipment/ip"><?= ICONS['DESKTOP'] ?>IP정보</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/equipment/server"><?= ICONS['DESKTOP'] ?>Server정보</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/equipment/part"><?= ICONS['SETUP'] ?>부품정보</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/equipment/defence"><?= ICONS['SETUP'] ?>방어정보</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/equipment/software"><?= ICONS['FLAG'] ?>Software정보</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/equipment/server"><?= ICONS['DESKTOP'] ?>Server정보</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/equipment/part/cpu"><?= ICONS['SETUP'] ?>CPU정보</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/equipment/part/ram"><?= ICONS['SETUP'] ?>RAM정보</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/equipment/part/disk"><?= ICONS['SETUP'] ?>DISK정보</a>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user