dbms_init...1
This commit is contained in:
parent
7c3e13312d
commit
730f478b38
@ -218,86 +218,5 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
|
||||
$routes->get('toggle/(:num)/(:any)', 'DiskController::toggle/$1/$2');
|
||||
});
|
||||
});
|
||||
$routes->group('link', ['namespace' => 'App\Controllers\Admin\Equipment\Link'], function ($routes) {
|
||||
$routes->group('line', ['namespace' => 'App\Controllers\Admin\Equipment\Link'], function ($routes) {
|
||||
$routes->get('/', 'LineController::index', []);
|
||||
$routes->get('create', 'LineController::create_form');
|
||||
$routes->post('create', 'LineController::create');
|
||||
$routes->get('modify/(:num)', 'LineController::modify_form/$1');
|
||||
$routes->post('modify/(:num)', 'LineController::modify/$1');
|
||||
$routes->get('view/(:num)', 'LineController::view/$1');
|
||||
$routes->get('delete/(:num)', 'LineController::delete/$1');
|
||||
$routes->get('toggle/(:num)/(:any)', 'LineController::toggle/$1/$2');
|
||||
});
|
||||
$routes->group('ip', ['namespace' => 'App\Controllers\Admin\Equipment\Link'], function ($routes) {
|
||||
$routes->get('/', 'IpController::index', []);
|
||||
$routes->get('create', 'IpController::create_form');
|
||||
$routes->post('create', 'IpController::create');
|
||||
$routes->get('modify/(:num)', 'IpController::modify_form/$1');
|
||||
$routes->post('modify/(:num)', 'IpController::modify/$1');
|
||||
$routes->get('view/(:num)', 'IpController::view/$1');
|
||||
$routes->get('delete/(:num)', 'IpController::delete/$1');
|
||||
$routes->get('toggle/(:num)/(:any)', 'IpController::toggle/$1/$2');
|
||||
$routes->post('batchjob', 'IpController::batchjob');
|
||||
$routes->post('batchjob_delete', 'IpController::batchjob_delete');
|
||||
$routes->get('download/(:alpha)', 'IpController::download/$1');
|
||||
});
|
||||
$routes->group('defence', ['namespace' => 'App\Controllers\Admin\Equipment\Link'], function ($routes) {
|
||||
$routes->get('/', 'DefenceController::index', []);
|
||||
$routes->get('create', 'DefenceController::create_form');
|
||||
$routes->post('create', 'DefenceController::create');
|
||||
$routes->get('modify/(:num)', 'DefenceController::modify_form/$1');
|
||||
$routes->post('modify/(:num)', 'DefenceController::modify/$1');
|
||||
$routes->get('view/(:num)', 'DefenceController::view/$1');
|
||||
$routes->get('delete/(:num)', 'DefenceController::delete/$1');
|
||||
$routes->get('toggle/(:num)/(:any)', 'DefenceController::toggle/$1/$2');
|
||||
$routes->post('batchjob', 'DefenceController::batchjob');
|
||||
$routes->post('batchjob_delete', 'DefenceController::batchjob_delete');
|
||||
$routes->get('download/(:alpha)', 'DefenceController::download/$1');
|
||||
});
|
||||
$routes->group('software', ['namespace' => 'App\Controllers\Admin\Equipment\Link'], function ($routes) {
|
||||
$routes->get('/', 'SoftwareController::index', []);
|
||||
$routes->get('create', 'SoftwareController::create_form');
|
||||
$routes->post('create', 'SoftwareController::create');
|
||||
$routes->get('modify/(:num)', 'SoftwareController::modify_form/$1');
|
||||
$routes->post('modify/(:num)', 'SoftwareController::modify/$1');
|
||||
$routes->get('view/(:num)', 'SoftwareController::view/$1');
|
||||
$routes->get('delete/(:num)', 'SoftwareController::delete/$1');
|
||||
$routes->get('toggle/(:num)/(:any)', 'SoftwareController::toggle/$1/$2');
|
||||
$routes->post('batchjob', 'SoftwareController::batchjob');
|
||||
$routes->post('batchjob_delete', 'SoftwareController::batchjob_delete');
|
||||
$routes->get('download/(:alpha)', 'SoftwareController::download/$1');
|
||||
});
|
||||
$routes->group('cpu', ['namespace' => 'App\Controllers\Admin\Equipment\Link'], 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\Link'], 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\Link'], 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');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -2,15 +2,26 @@
|
||||
|
||||
namespace App\Controllers\Admin\Customer;
|
||||
|
||||
use App\Helpers\Customer\ServiceHelper;
|
||||
use App\Services\Customer\ServiceService;
|
||||
use App\Services\Equipment\Part\CpuService;
|
||||
|
||||
use App\Services\Equipment\Part\DefenceService;
|
||||
use App\Services\Equipment\Part\DiskService;
|
||||
|
||||
use App\Services\Equipment\Part\IpService;
|
||||
use App\Services\Equipment\Part\LINEService;
|
||||
use App\Services\Equipment\Part\RamService;
|
||||
use App\Services\Equipment\Part\SoftwareService;
|
||||
use App\Services\Equipment\ServereService;
|
||||
use CodeIgniter\HTTP\RedirectResponse;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
use App\Helpers\Customer\ServiceHelper;
|
||||
use App\Services\Customer\ServiceService;
|
||||
|
||||
class ServiceController extends CustomerController
|
||||
{
|
||||
private $_adapterService = [];
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
@ -35,6 +46,53 @@ class ServiceController extends CustomerController
|
||||
// dd($this->_helper);
|
||||
return $this->_helper;
|
||||
}
|
||||
final public function getAdapterService(string $key): mixed
|
||||
{
|
||||
if (!array_key_exists($key, $this->_adapterService)) {
|
||||
switch ($key) {
|
||||
case 'SERVER':
|
||||
$this->_adapterService[$key] = new ServereService();
|
||||
break;
|
||||
case 'CPU':
|
||||
$this->_adapterService[$key] = new CpuService();
|
||||
break;
|
||||
case 'RAM':
|
||||
$this->_adapterService[$key] = new RamService();
|
||||
break;
|
||||
case 'DISK':
|
||||
$this->_adapterService[$key] = new DiskService();
|
||||
break;
|
||||
case 'LINE':
|
||||
$this->_adapterService[$key] = new LineService();
|
||||
break;
|
||||
case 'IP':
|
||||
$this->_adapterService[$key] = new IpService();
|
||||
break;
|
||||
case 'DEFENCE':
|
||||
$this->_adapterService[$key] = new DefenceService();
|
||||
break;
|
||||
case 'SOFTWARE':
|
||||
$this->_adapterService[$key] = new SoftwareService();
|
||||
break;
|
||||
default:
|
||||
throw new \Exception("Unknown adapter service key: {$key}");
|
||||
}
|
||||
}
|
||||
return $this->_adapterService[$key];
|
||||
}
|
||||
protected function getResultPageByActon(string $action, string $message = MESSAGES["SUCCESS"]): RedirectResponse|string
|
||||
{
|
||||
switch ($action) {
|
||||
case 'index':
|
||||
$this->getHelper()->setViewDatas($this->getViewDatas());
|
||||
$result = view($this->view_path . 'service' . DIRECTORY_SEPARATOR . $action, ['viewDatas' => $this->getViewDatas()]);
|
||||
break;
|
||||
default:
|
||||
$result = parent::getResultPageByActon($action, $message);
|
||||
break;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
|
||||
// protected function create_process(): mixed
|
||||
@ -50,6 +108,14 @@ class ServiceController extends CustomerController
|
||||
'fields' => ['clientinfo_uid', 'item_type', 'billing_at', 'rack', 'LINE', 'SERVER', 'IP', 'CPU', 'RAM', 'DISK', 'SOFTWARE', 'DEFENCE', 'start_at', 'status'],
|
||||
];
|
||||
$this->init('index', $fields);
|
||||
return parent::index_process();
|
||||
$this->adapterFields = ['LINE', 'IP', 'SERVER', 'CPU', 'RAM', 'DISK', 'DEFENCE', 'SOFTWARE'];
|
||||
$entities = [];
|
||||
foreach (parent::index_process() as $entity) {
|
||||
foreach ($this->adapterFields as $field) {
|
||||
$entity->setAdaptertEntities($field, $this->getAdapterService($field)->getEntities());
|
||||
}
|
||||
$entities[] = $entity;
|
||||
}
|
||||
return $entities;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,57 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin\Equipment\Link;
|
||||
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
use App\Helpers\Equipment\Link\CpuHelper;
|
||||
use App\Services\Equipment\Link\CpuService;
|
||||
use App\Services\Equipment\Part\CpuService as PartService;
|
||||
|
||||
class CpuController extends LinkController
|
||||
{
|
||||
protected ?PartService $_partService = null;
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->title = lang("{$this->getService()->getClassName()}.title");
|
||||
$this->class_path .= $this->getService()->getClassName();
|
||||
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
|
||||
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
|
||||
|
||||
}
|
||||
public function getService(): CpuService
|
||||
{
|
||||
if (!$this->_service) {
|
||||
$this->_service = new CpuService($this->request);
|
||||
}
|
||||
return $this->_service;
|
||||
}
|
||||
public function getHelper(): CpuHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new CpuHelper($this->request);
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
public function getPartService(): PartService
|
||||
{
|
||||
if (!$this->_partService) {
|
||||
$this->_partService = new PartService($this->request);
|
||||
}
|
||||
return $this->_partService;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
|
||||
protected function index_process(): array
|
||||
{
|
||||
$fields = [
|
||||
'fields' => ['serverinfo_uid', 'cpuinfo_uid'],
|
||||
];
|
||||
// dd($fields);
|
||||
$this->init('index', $fields);
|
||||
return parent::index_process();
|
||||
}
|
||||
}
|
||||
@ -1,57 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin\Equipment\Link;
|
||||
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
use App\Helpers\Equipment\Link\DefenceHelper;
|
||||
use App\Services\Equipment\Link\DefenceService;
|
||||
use App\Services\Equipment\Part\DefenceService as PartService;
|
||||
|
||||
class DefenceController extends LinkController
|
||||
{
|
||||
protected ?PartService $_partService = null;
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->title = lang("{$this->getService()->getClassName()}.title");
|
||||
$this->class_path .= $this->getService()->getClassName();
|
||||
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
|
||||
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
|
||||
|
||||
}
|
||||
public function getService(): DefenceService
|
||||
{
|
||||
if (!$this->_service) {
|
||||
$this->_service = new DefenceService($this->request);
|
||||
}
|
||||
return $this->_service;
|
||||
}
|
||||
public function getHelper(): DefenceHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new DefenceHelper($this->request);
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
public function getPartService(): PartService
|
||||
{
|
||||
if (!$this->_partService) {
|
||||
$this->_partService = new PartService($this->request);
|
||||
}
|
||||
return $this->_partService;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
|
||||
protected function index_process(): array
|
||||
{
|
||||
$fields = [
|
||||
'fields' => ['serverinfo_uid', 'defenceinfo_uid'],
|
||||
];
|
||||
// dd($fields);
|
||||
$this->init('index', $fields);
|
||||
return parent::index_process();
|
||||
}
|
||||
}
|
||||
@ -1,55 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin\Equipment\Link;
|
||||
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
use App\Helpers\Equipment\Link\DiskHelper;
|
||||
use App\Services\Equipment\Link\DiskService;
|
||||
use App\Services\Equipment\Part\DiskService as PartService;
|
||||
|
||||
class DiskController extends LinkController
|
||||
{
|
||||
protected ?PartService $_partService = null;
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->title = lang("{$this->getService()->getClassName()}.title");
|
||||
$this->class_path .= $this->getService()->getClassName();
|
||||
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
|
||||
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
|
||||
|
||||
}
|
||||
public function getService(): DiskService
|
||||
{
|
||||
if (!$this->_service) {
|
||||
$this->_service = new DiskService($this->request);
|
||||
}
|
||||
return $this->_service;
|
||||
}
|
||||
public function getHelper(): DiskHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new DiskHelper($this->request);
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
public function getPartService(): PartService
|
||||
{
|
||||
if (!$this->_partService) {
|
||||
$this->_partService = new PartService($this->request);
|
||||
}
|
||||
return $this->_partService;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
protected function index_process(): array
|
||||
{
|
||||
$fields = [
|
||||
'fields' => ['serverinfo_uid', 'diskinfo_uid'],
|
||||
];
|
||||
$this->init('index', $fields);
|
||||
return parent::index_process();
|
||||
}
|
||||
}
|
||||
@ -1,57 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin\Equipment\Link;
|
||||
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
use App\Helpers\Equipment\Link\IpHelper;
|
||||
use App\Services\Equipment\Link\IpService;
|
||||
use App\Services\Equipment\Part\IpService as PartService;
|
||||
|
||||
class IpController extends LinkController
|
||||
{
|
||||
protected ?PartService $_partService = null;
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->title = lang("{$this->getService()->getClassName()}.title");
|
||||
$this->class_path .= $this->getService()->getClassName();
|
||||
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
|
||||
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
|
||||
|
||||
}
|
||||
public function getService(): IpService
|
||||
{
|
||||
if (!$this->_service) {
|
||||
$this->_service = new IpService($this->request);
|
||||
}
|
||||
return $this->_service;
|
||||
}
|
||||
public function getHelper(): IpHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new IpHelper($this->request);
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
public function getPartService(): PartService
|
||||
{
|
||||
if (!$this->_partService) {
|
||||
$this->_partService = new PartService($this->request);
|
||||
}
|
||||
return $this->_partService;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
|
||||
protected function index_process(): array
|
||||
{
|
||||
$fields = [
|
||||
'fields' => ['serverinfo_uid', 'ipinfo_uid'],
|
||||
];
|
||||
// dd($fields);
|
||||
$this->init('index', $fields);
|
||||
return parent::index_process();
|
||||
}
|
||||
}
|
||||
@ -1,57 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin\Equipment\Link;
|
||||
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
use App\Helpers\Equipment\Link\LineHelper;
|
||||
use App\Services\Equipment\Link\LineService;
|
||||
use App\Services\Equipment\Part\LineService as PartService;
|
||||
|
||||
class LineController extends LinkController
|
||||
{
|
||||
protected ?PartService $_partService = null;
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->title = lang("{$this->getService()->getClassName()}.title");
|
||||
$this->class_path .= $this->getService()->getClassName();
|
||||
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
|
||||
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
|
||||
|
||||
}
|
||||
public function getService(): LineService
|
||||
{
|
||||
if (!$this->_service) {
|
||||
$this->_service = new LineService($this->request);
|
||||
}
|
||||
return $this->_service;
|
||||
}
|
||||
public function getHelper(): LineHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new LineHelper($this->request);
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
public function getPartService(): PartService
|
||||
{
|
||||
if (!$this->_partService) {
|
||||
$this->_partService = new PartService($this->request);
|
||||
}
|
||||
return $this->_partService;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
|
||||
protected function index_process(): array
|
||||
{
|
||||
$fields = [
|
||||
'fields' => ['serverinfo_uid', 'lineinfo_uid'],
|
||||
];
|
||||
// dd($fields);
|
||||
$this->init('index', $fields);
|
||||
return parent::index_process();
|
||||
}
|
||||
}
|
||||
@ -1,83 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin\Equipment\Link;
|
||||
|
||||
use App\Controllers\Admin\Equipment\EquipmentController;
|
||||
|
||||
use CodeIgniter\HTTP\RedirectResponse;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
use App\Services\Equipment\ServerService;
|
||||
|
||||
abstract class LinkController extends EquipmentController
|
||||
{
|
||||
private ?ServerService $_serverService = null;
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
}
|
||||
final public function getServerService(): ServerService
|
||||
{
|
||||
if (!$this->_serverService) {
|
||||
$this->_serverService = new ServerService($this->request);
|
||||
}
|
||||
return $this->_serverService;
|
||||
}
|
||||
abstract public function getPartService(): mixed;
|
||||
|
||||
protected function setOrderByForList()
|
||||
{
|
||||
//OrderBy 처리
|
||||
$this->getService()->getModel()->orderBy('serverinfo_uid', 'ASC', false);
|
||||
parent::setOrderByForList();
|
||||
}
|
||||
|
||||
protected function getResultPageByActon(string $action, string $message = MESSAGES["SUCCESS"]): RedirectResponse|string
|
||||
{
|
||||
switch ($action) {
|
||||
case 'index':
|
||||
$this->getHelper()->setViewDatas($this->getViewDatas());
|
||||
$result = view($this->view_path . 'popup' . DIRECTORY_SEPARATOR . $action, ['viewDatas' => $this->getViewDatas()]);
|
||||
break;
|
||||
default:
|
||||
$result = parent::getResultPageByActon($action, $message);
|
||||
break;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
protected function getFormFieldOption(string $field, array $options): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'serverinfo_uid':
|
||||
$temps = [];
|
||||
foreach ($this->getServerService()->getEntities() as $entity) {
|
||||
$temps[$entity->getPK()] = $entity->getTitle();
|
||||
}
|
||||
$options[$field] = $temps;
|
||||
// dd($options);
|
||||
break;
|
||||
case 'lineinfo_uid':
|
||||
case 'ipinfo_uid':
|
||||
case 'defenceinfo_uid':
|
||||
case 'softwareinfo_uid':
|
||||
case 'domaininfo_uid':
|
||||
case 'cpuinfo_uid':
|
||||
case 'raminfo_uid':
|
||||
case 'diskinfo_uid':
|
||||
$temps = [];
|
||||
foreach ($this->getPartService()->getEntities() as $entity) {
|
||||
$temps[$entity->getPK()] = $entity->getTitle();
|
||||
}
|
||||
$options[$field] = $temps;
|
||||
// dd($options);
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
break;
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
@ -1,55 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin\Equipment\Link;
|
||||
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
use App\Helpers\Equipment\Link\RamHelper;
|
||||
use App\Services\Equipment\Link\RamService;
|
||||
use App\Services\Equipment\Part\RamService as PartService;
|
||||
|
||||
class RamController extends LinkController
|
||||
{
|
||||
protected ?PartService $_partService = null;
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->title = lang("{$this->getService()->getClassName()}.title");
|
||||
$this->class_path .= $this->getService()->getClassName();
|
||||
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
|
||||
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
|
||||
|
||||
}
|
||||
public function getService(): RamService
|
||||
{
|
||||
if (!$this->_service) {
|
||||
$this->_service = new RamService($this->request);
|
||||
}
|
||||
return $this->_service;
|
||||
}
|
||||
public function getHelper(): RamHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new RamHelper($this->request);
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
public function getPartService(): PartService
|
||||
{
|
||||
if (!$this->_partService) {
|
||||
$this->_partService = new PartService($this->request);
|
||||
}
|
||||
return $this->_partService;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
protected function index_process(): array
|
||||
{
|
||||
$fields = [
|
||||
'fields' => ['serverinfo_uid', 'raminfo_uid'],
|
||||
];
|
||||
$this->init('index', $fields);
|
||||
return parent::index_process();
|
||||
}
|
||||
}
|
||||
@ -1,57 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin\Equipment\Link;
|
||||
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
use App\Helpers\Equipment\Link\SoftwareHelper;
|
||||
use App\Services\Equipment\Link\SoftwareService;
|
||||
use App\Services\Equipment\Part\SoftwareService as PartService;
|
||||
|
||||
class SoftwareController extends LinkController
|
||||
{
|
||||
protected ?PartService $_partService = null;
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->title = lang("{$this->getService()->getClassName()}.title");
|
||||
$this->class_path .= $this->getService()->getClassName();
|
||||
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
|
||||
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
|
||||
|
||||
}
|
||||
public function getService(): SoftwareService
|
||||
{
|
||||
if (!$this->_service) {
|
||||
$this->_service = new SoftwareService($this->request);
|
||||
}
|
||||
return $this->_service;
|
||||
}
|
||||
public function getHelper(): SoftwareHelper
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new SoftwareHelper($this->request);
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
public function getPartService(): PartService
|
||||
{
|
||||
if (!$this->_partService) {
|
||||
$this->_partService = new PartService($this->request);
|
||||
}
|
||||
return $this->_partService;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
|
||||
protected function index_process(): array
|
||||
{
|
||||
$fields = [
|
||||
'fields' => ['serverinfo_uid', 'softwareinfo_uid'],
|
||||
];
|
||||
// dd($fields);
|
||||
$this->init('index', $fields);
|
||||
return parent::index_process();
|
||||
}
|
||||
}
|
||||
@ -2,24 +2,16 @@
|
||||
|
||||
namespace App\Controllers\Admin\Equipment;
|
||||
|
||||
use CodeIgniter\HTTP\RedirectResponse;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
use App\Helpers\Equipment\ServerHelper;
|
||||
use App\Services\Equipment\ServerService;
|
||||
use App\Services\Equipment\Link\CpuService;
|
||||
use App\Services\Equipment\Link\RamService;
|
||||
use App\Services\Equipment\Link\DiskService;
|
||||
use App\Services\Equipment\Link\LINEService;
|
||||
use App\Services\Equipment\Link\IpService;
|
||||
use App\Services\Equipment\Link\DefenceService;
|
||||
use App\Services\Equipment\Link\SoftwareService;
|
||||
|
||||
|
||||
class ServerController extends EquipmentController
|
||||
{
|
||||
private $_adapterService = [];
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
@ -43,66 +35,15 @@ class ServerController extends EquipmentController
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
final public function getAdapterService(string $key): mixed
|
||||
{
|
||||
if (!array_key_exists($key, $this->_adapterService)) {
|
||||
switch ($key) {
|
||||
case 'CPU':
|
||||
$this->_adapterService[$key] = new CpuService();
|
||||
break;
|
||||
case 'RAM':
|
||||
$this->_adapterService[$key] = new RamService();
|
||||
break;
|
||||
case 'DISK':
|
||||
$this->_adapterService[$key] = new DiskService();
|
||||
break;
|
||||
case 'LINE':
|
||||
$this->_adapterService[$key] = new LineService();
|
||||
break;
|
||||
case 'IP':
|
||||
$this->_adapterService[$key] = new IpService();
|
||||
break;
|
||||
case 'DEFENCE':
|
||||
$this->_adapterService[$key] = new DefenceService();
|
||||
break;
|
||||
case 'SOFTWARE':
|
||||
$this->_adapterService[$key] = new SoftwareService();
|
||||
break;
|
||||
default:
|
||||
throw new \Exception("Unknown adapter service key: {$key}");
|
||||
}
|
||||
}
|
||||
return $this->_adapterService[$key];
|
||||
}
|
||||
protected function getResultPageByActon(string $action, string $message = MESSAGES["SUCCESS"]): RedirectResponse|string
|
||||
{
|
||||
switch ($action) {
|
||||
case 'index':
|
||||
$this->getHelper()->setViewDatas($this->getViewDatas());
|
||||
$result = view($this->view_path . 'server' . DIRECTORY_SEPARATOR . $action, ['viewDatas' => $this->getViewDatas()]);
|
||||
break;
|
||||
default:
|
||||
$result = parent::getResultPageByActon($action, $message);
|
||||
break;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
//Index,FieldForm관련
|
||||
protected function index_process(): array
|
||||
{
|
||||
$fields = [
|
||||
'fields' => ['code', 'switch', 'type', 'model', 'price', "raid", 'status', 'manufactur_at', 'created_at'],
|
||||
'fields' => ['code', 'model', 'price', 'status', 'manufactur_at', 'created_at'],
|
||||
];
|
||||
$this->init('index', $fields);
|
||||
// $this->modal_type = 'modal_fetch_v2'; //기본은 modal_iframe임
|
||||
$this->adapterFields = ['LINE', 'IP', 'CPU', 'RAM', 'DISK', 'DEFENCE', 'SOFTWARE'];
|
||||
$entities = [];
|
||||
foreach (parent::index_process() as $entity) {
|
||||
foreach ($this->adapterFields as $field) {
|
||||
$entity->setPartEntities($field, $this->getAdapterService($field)->getAdapterEntities($entity));
|
||||
}
|
||||
$entities[] = $entity;
|
||||
}
|
||||
return $entities;
|
||||
return parent::index_process();
|
||||
}
|
||||
}
|
||||
|
||||
654
app/Database/dbms_clean.sql
Normal file
654
app/Database/dbms_clean.sql
Normal file
@ -0,0 +1,654 @@
|
||||
/*!999999\- enable the sandbox mode */
|
||||
-- MariaDB dump 10.19 Distrib 10.5.25-MariaDB, for Win64 (AMD64)
|
||||
--
|
||||
-- Host: localhost Database: dbms
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 10.5.25-MariaDB
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
--
|
||||
-- Table structure for table `accountinfo`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `accountinfo`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `accountinfo` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`clientinfo_uid` int(11) NOT NULL,
|
||||
`title` varchar(255) NOT NULL,
|
||||
`alias` varchar(50) NOT NULL COMMENT '입출금자명',
|
||||
`amount` int(11) NOT NULL DEFAULT 0 COMMENT '압출금액',
|
||||
`status` varchar(20) NOT NULL DEFAULT 'default',
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_clientinfo_TO_accountinfo` (`clientinfo_uid`),
|
||||
CONSTRAINT `FK_clientinfo_TO_accountinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='예치금계좌';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `accountinfo`
|
||||
--
|
||||
|
||||
LOCK TABLES `accountinfo` WRITE;
|
||||
/*!40000 ALTER TABLE `accountinfo` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `accountinfo` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `clientinfo`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `clientinfo`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `clientinfo` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`role` varchar(50) NOT NULL DEFAULT 'user',
|
||||
`name` varchar(100) NOT NULL,
|
||||
`phone` varchar(50) DEFAULT NULL,
|
||||
`email` varchar(50) NOT NULL,
|
||||
`account_balance` int(11) NOT NULL DEFAULT 0 COMMENT '예치금',
|
||||
`coupon_balance` int(11) NOT NULL DEFAULT 0 COMMENT '쿠폰수',
|
||||
`point_balance` int(11) NOT NULL DEFAULT 0 COMMENT '포인트',
|
||||
`status` varchar(20) NOT NULL DEFAULT 'default',
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='고객정보';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `clientinfo`
|
||||
--
|
||||
|
||||
LOCK TABLES `clientinfo` WRITE;
|
||||
/*!40000 ALTER TABLE `clientinfo` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `clientinfo` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `couponinfo`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `couponinfo`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `couponinfo` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`clientinfo_uid` int(11) NOT NULL,
|
||||
`title` varchar(100) NOT NULL,
|
||||
`amount` int(11) NOT NULL DEFAULT 0 COMMENT '갯수',
|
||||
`status` varchar(20) NOT NULL DEFAULT 'default',
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_clientinfo_TO_couponinfo` (`clientinfo_uid`),
|
||||
CONSTRAINT `FK_clientinfo_TO_couponinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='쿠폰정보';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `couponinfo`
|
||||
--
|
||||
|
||||
LOCK TABLES `couponinfo` WRITE;
|
||||
/*!40000 ALTER TABLE `couponinfo` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `couponinfo` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `cpuinfo`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `cpuinfo`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `cpuinfo` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`model` varchar(50) NOT NULL,
|
||||
`price` int(11) NOT NULL DEFAULT 0,
|
||||
`status` varchar(20) NOT NULL DEFAULT 'default',
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
UNIQUE KEY `UQ_model` (`model`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='CPU 정보';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `cpuinfo`
|
||||
--
|
||||
|
||||
LOCK TABLES `cpuinfo` WRITE;
|
||||
/*!40000 ALTER TABLE `cpuinfo` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `cpuinfo` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `defenceinfo`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `defenceinfo`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `defenceinfo` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`type` varchar(20) NOT NULL,
|
||||
`ip` varchar(50) DEFAULT NULL,
|
||||
`price` int(11) NOT NULL DEFAULT 0,
|
||||
`accountid` varchar(50) DEFAULT NULL,
|
||||
`domain` varchar(100) DEFAULT NULL,
|
||||
`description` text DEFAULT NULL,
|
||||
`status` varchar(20) NOT NULL DEFAULT 'default',
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
UNIQUE KEY `UQ_uid` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='방어(CS)정보';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `defenceinfo`
|
||||
--
|
||||
|
||||
LOCK TABLES `defenceinfo` WRITE;
|
||||
/*!40000 ALTER TABLE `defenceinfo` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `defenceinfo` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `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,
|
||||
`price` int(11) NOT NULL DEFAULT 0,
|
||||
`status` varchar(20) NOT NULL DEFAULT 'default',
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
UNIQUE KEY `UQ_model` (`model`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='DISK 정보';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `diskinfo`
|
||||
--
|
||||
|
||||
LOCK TABLES `diskinfo` WRITE;
|
||||
/*!40000 ALTER TABLE `diskinfo` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `diskinfo` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `domaininfo`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `domaininfo`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `domaininfo` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`clientinfo_uid` int(11) NOT NULL,
|
||||
`domain` varchar(20) NOT NULL,
|
||||
`expired_at` date NOT NULL COMMENT '종료일',
|
||||
`price` int(11) NOT NULL DEFAULT 0,
|
||||
`status` varchar(20) NOT NULL DEFAULT 'default',
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
UNIQUE KEY `UQ_domain` (`domain`),
|
||||
KEY `FK_clientinfo_TO_domaininfo` (`clientinfo_uid`),
|
||||
CONSTRAINT `FK_clientinfo_TO_domaininfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='도메인 정보';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `domaininfo`
|
||||
--
|
||||
|
||||
LOCK TABLES `domaininfo` WRITE;
|
||||
/*!40000 ALTER TABLE `domaininfo` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `domaininfo` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `invoiceinfo`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `invoiceinfo`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `invoiceinfo` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`clientinfo_uid` int(11) NOT NULL,
|
||||
`issue_at` date DEFAULT NULL COMMENT '발행일',
|
||||
`due_at` date DEFAULT NULL COMMENT '지급기한일',
|
||||
`total_amount` int(11) NOT NULL DEFAULT 0 COMMENT '총금액',
|
||||
`status` varchar(20) NOT NULL DEFAULT 'default' COMMENT '상태',
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_clientinfo_TO_invoiceinfo` (`clientinfo_uid`),
|
||||
CONSTRAINT `FK_clientinfo_TO_invoiceinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='청구서정보';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `invoiceinfo`
|
||||
--
|
||||
|
||||
LOCK TABLES `invoiceinfo` WRITE;
|
||||
/*!40000 ALTER TABLE `invoiceinfo` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `invoiceinfo` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `invoiceinfo_items`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `invoiceinfo_items`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `invoiceinfo_items` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`invoiceinfo_uid` int(11) NOT NULL,
|
||||
`item_type` varchar(20) NOT NULL,
|
||||
`item_uid` int(11) NOT NULL,
|
||||
`billing_cyle` varchar(20) NOT NULL,
|
||||
`amount` int(11) NOT NULL DEFAULT 0 COMMENT '청구금액',
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_invoiceinfo_TO_invoiceinfo_items` (`invoiceinfo_uid`),
|
||||
CONSTRAINT `FK_invoiceinfo_TO_invoiceinfo_items` FOREIGN KEY (`invoiceinfo_uid`) REFERENCES `invoiceinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='청구서Item정보';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `invoiceinfo_items`
|
||||
--
|
||||
|
||||
LOCK TABLES `invoiceinfo_items` WRITE;
|
||||
/*!40000 ALTER TABLE `invoiceinfo_items` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `invoiceinfo_items` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `ipinfo`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `ipinfo`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `ipinfo` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`lineinfo_uid` int(11) NOT NULL,
|
||||
`ip` char(16) NOT NULL,
|
||||
`price` int(11) NOT NULL DEFAULT 50000,
|
||||
`status` varchar(20) NOT NULL DEFAULT 'default',
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
UNIQUE KEY `UQ_ip` (`ip`),
|
||||
KEY `FK_lineinfo_TO_ipinfo` (`lineinfo_uid`),
|
||||
CONSTRAINT `FK_lineinfo_TO_ipinfo` FOREIGN KEY (`lineinfo_uid`) REFERENCES `lineinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT=' IP 정보';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `ipinfo`
|
||||
--
|
||||
|
||||
LOCK TABLES `ipinfo` WRITE;
|
||||
/*!40000 ALTER TABLE `ipinfo` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `ipinfo` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `lineinfo`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `lineinfo`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `lineinfo` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`clientinfo_uid` int(11) DEFAULT NULL COMMENT '소유자정보',
|
||||
`type` varchar(20) NOT NULL COMMENT '회선구분',
|
||||
`title` varchar(100) NOT NULL,
|
||||
`bandwith` varchar(20) NOT NULL COMMENT 'IP 대역',
|
||||
`price` int(11) NOT NULL DEFAULT 0,
|
||||
`status` varchar(20) NOT NULL DEFAULT 'default',
|
||||
`start_at` date DEFAULT NULL COMMENT '개통일',
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
UNIQUE KEY `UQ_title` (`title`),
|
||||
KEY `FK_clientinfo_TO_lineinfo` (`clientinfo_uid`),
|
||||
CONSTRAINT `FK_clientinfo_TO_lineinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='회선 정보';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `lineinfo`
|
||||
--
|
||||
|
||||
LOCK TABLES `lineinfo` WRITE;
|
||||
/*!40000 ALTER TABLE `lineinfo` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `lineinfo` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `logger`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `logger`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `logger` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`user_uid` int(11) NOT NULL,
|
||||
`class_name` varchar(255) DEFAULT NULL,
|
||||
`method_name` varchar(255) DEFAULT NULL,
|
||||
`title` varchar(255) NOT NULL,
|
||||
`content` text NOT NULL,
|
||||
`status` varchar(20) DEFAULT 'default',
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_user_TO_logger` (`user_uid`),
|
||||
CONSTRAINT `FK_user_TO_logger` FOREIGN KEY (`user_uid`) REFERENCES `user` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='작업 기록 로그';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `logger`
|
||||
--
|
||||
|
||||
LOCK TABLES `logger` WRITE;
|
||||
/*!40000 ALTER TABLE `logger` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `logger` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `paymentinfo`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `paymentinfo`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `paymentinfo` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`invoiceinfo_uid` int(11) NOT NULL,
|
||||
`alias` varchar(50) NOT NULL COMMENT '결제자명',
|
||||
`type` varchar(20) NOT NULL COMMENT '결제방식',
|
||||
`amount` int(11) NOT NULL DEFAULT 0 COMMENT '결제금액',
|
||||
`paid_at` date DEFAULT NULL COMMENT '결제일',
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_invoiceinfo_TO_paymentinfo` (`invoiceinfo_uid`),
|
||||
CONSTRAINT `FK_invoiceinfo_TO_paymentinfo` FOREIGN KEY (`invoiceinfo_uid`) REFERENCES `invoiceinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='결제정보';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `paymentinfo`
|
||||
--
|
||||
|
||||
LOCK TABLES `paymentinfo` WRITE;
|
||||
/*!40000 ALTER TABLE `paymentinfo` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `paymentinfo` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `pointinfo`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `pointinfo`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `pointinfo` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`clientinfo_uid` int(11) NOT NULL,
|
||||
`title` varchar(255) NOT NULL,
|
||||
`amount` int(11) NOT NULL DEFAULT 0 COMMENT '압출금액',
|
||||
`status` varchar(20) NOT NULL DEFAULT 'default',
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_clientinfo_TO_pointinfo` (`clientinfo_uid`),
|
||||
CONSTRAINT `FK_clientinfo_TO_pointinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='포인트정보';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `pointinfo`
|
||||
--
|
||||
|
||||
LOCK TABLES `pointinfo` WRITE;
|
||||
/*!40000 ALTER TABLE `pointinfo` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `pointinfo` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `raminfo`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `raminfo`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `raminfo` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`model` varchar(50) NOT NULL,
|
||||
`price` int(11) NOT NULL DEFAULT 0,
|
||||
`status` varchar(20) NOT NULL DEFAULT 'default',
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
UNIQUE KEY `UQ_model` (`model`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='RAM 정보';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `raminfo`
|
||||
--
|
||||
|
||||
LOCK TABLES `raminfo` WRITE;
|
||||
/*!40000 ALTER TABLE `raminfo` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `raminfo` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `serverinfo`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `serverinfo`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `serverinfo` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`clientinfo_uid` int(11) DEFAULT NULL COMMENT '소유자정보',
|
||||
`code` varchar(20) NOT NULL,
|
||||
`model` varchar(50) NOT NULL,
|
||||
`price` int(11) NOT NULL DEFAULT 0,
|
||||
`description` text DEFAULT NULL,
|
||||
`status` varchar(20) NOT NULL DEFAULT 'default',
|
||||
`manufactur_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '제조일',
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
UNIQUE KEY `UQ_uid` (`uid`),
|
||||
UNIQUE KEY `UQ_code` (`code`),
|
||||
UNIQUE KEY `UQ_model` (`model`),
|
||||
KEY `FK_clientinfo_TO_serverinfo` (`clientinfo_uid`),
|
||||
CONSTRAINT `FK_clientinfo_TO_serverinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='서버정보';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `serverinfo`
|
||||
--
|
||||
|
||||
LOCK TABLES `serverinfo` WRITE;
|
||||
/*!40000 ALTER TABLE `serverinfo` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `serverinfo` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `serviceinfo`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `serviceinfo`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `serviceinfo` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`clientinfo_uid` int(11) NOT NULL,
|
||||
`switch` varchar(20) NOT NULL,
|
||||
`location` varchar(20) DEFAULT NULL,
|
||||
`type` varchar(20) NOT NULL,
|
||||
`raid` varchar(20) NOT NULL,
|
||||
`billing_at` date NOT NULL COMMENT '청구일',
|
||||
`start_at` date NOT NULL COMMENT '시작일',
|
||||
`end_at` date DEFAULT NULL COMMENT '종료일',
|
||||
`status` varchar(20) NOT NULL DEFAULT 'default' COMMENT '상태',
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_clientinfo_TO_serviceinfo` (`clientinfo_uid`),
|
||||
CONSTRAINT `FK_clientinfo_TO_serviceinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='서비스정보';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `serviceinfo`
|
||||
--
|
||||
|
||||
LOCK TABLES `serviceinfo` WRITE;
|
||||
/*!40000 ALTER TABLE `serviceinfo` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `serviceinfo` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `serviceinfo_items`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `serviceinfo_items`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `serviceinfo_items` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`serviceinfo_uid` int(11) NOT NULL,
|
||||
`item_type` varchar(20) NOT NULL,
|
||||
`item_uid` int(11) NOT NULL,
|
||||
`billing_cyle` varchar(20) NOT NULL,
|
||||
`price` int(11) NOT NULL DEFAULT 0 COMMENT '소비자금액',
|
||||
`amount` int(11) NOT NULL DEFAULT 0 COMMENT '청구금액',
|
||||
`start_at` date DEFAULT NULL COMMENT '시작일',
|
||||
`end_at` date DEFAULT NULL COMMENT '종료일',
|
||||
`status` varchar(20) NOT NULL DEFAULT 'default' COMMENT '상태',
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
KEY `FK_serviceinfo_TO_serviceinfo_items` (`serviceinfo_uid`),
|
||||
CONSTRAINT `FK_serviceinfo_TO_serviceinfo_items` FOREIGN KEY (`serviceinfo_uid`) REFERENCES `serviceinfo` (`uid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='서비스Item정보';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `serviceinfo_items`
|
||||
--
|
||||
|
||||
LOCK TABLES `serviceinfo_items` WRITE;
|
||||
/*!40000 ALTER TABLE `serviceinfo_items` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `serviceinfo_items` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `softwareinfo`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `softwareinfo`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `softwareinfo` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`type` varchar(20) NOT NULL,
|
||||
`model` varchar(50) NOT NULL,
|
||||
`price` int(11) NOT NULL DEFAULT 0,
|
||||
`description` text DEFAULT NULL,
|
||||
`status` varchar(20) NOT NULL DEFAULT 'default',
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
UNIQUE KEY `UQ_model` (`model`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='소프트웨어 정보';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `softwareinfo`
|
||||
--
|
||||
|
||||
LOCK TABLES `softwareinfo` WRITE;
|
||||
/*!40000 ALTER TABLE `softwareinfo` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `softwareinfo` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `user`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `user`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `user` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`id` varchar(20) NOT NULL,
|
||||
`passwd` varchar(255) NOT NULL,
|
||||
`name` varchar(20) NOT NULL,
|
||||
`email` varchar(50) NOT NULL,
|
||||
`mobile` varchar(20) DEFAULT NULL,
|
||||
`role` varchar(50) DEFAULT NULL,
|
||||
`status` varchar(20) DEFAULT 'default',
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
UNIQUE KEY `UQ_id` (`id`),
|
||||
UNIQUE KEY `UQ_email` (`email`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='관리자정보';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `user`
|
||||
--
|
||||
|
||||
LOCK TABLES `user` WRITE;
|
||||
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2025-06-02 11:51:35
|
||||
File diff suppressed because one or more lines are too long
667
app/Database/dbms_init_all.sql
Normal file
667
app/Database/dbms_init_all.sql
Normal file
File diff suppressed because one or more lines are too long
209
app/Database/dbms_init_data.sql
Normal file
209
app/Database/dbms_init_data.sql
Normal file
File diff suppressed because one or more lines are too long
@ -1,91 +0,0 @@
|
||||
/*!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 `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 'manager',
|
||||
`status` varchar(10) NOT NULL DEFAULT 'default',
|
||||
`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','default','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','default','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','default','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','default','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','default','2023-03-24 02:23:52','2023-03-24 02:23:52'),(7,'leeph','$2y$10$lR739WzJsW6rDLgchYs7buek4BYeTlKHTQY60RDqRms9Io7RSY3AC','이풍호','leeph@prime-idc.jp',NULL,'manager,cloudflare','default','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','default','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','default','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','default','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','default','2023-10-16 23:08:51','2023-03-24 02:27:05'),(12,'yunmuj','$2y$10$zkgwGVj2JSOVIsxLe8fePe1gvWWaCemfZMktzBlrN8oLb3CKydkZC','윤무정','yunmuj@idcjp.jp',NULL,'manager,cloudflare','default','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','default','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','default','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','default','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','pause','2023-09-04 10:27:32','2023-09-04 09:48:02'),(21,'masakuni','$2y$10$di6Y7CqJGbbf72kDyCrOCOafJgk3vqJCYg6N3EtBUc3J6r24/7SFe','김창국','masakuni@prime-idc.jp',NULL,'cloudflare','pause','2023-12-18 08:56:29','2023-12-18 08:56:29'),(22,'bjh','$2y$10$LnEQ6kz4igRPZeDYwe7UluRiSaMVGN9Jj1fW3QqUUp6zPeLJW9goS','배장훈','bjh@prime-idc.jp',NULL,'cloudflare','pause','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','pause','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','default',NULL,'2024-10-29 06:30:19'),(25,'jeong.sg','$2y$10$OzH6140JztiUEs4s/VHbPOxfxubFooqwqVhGpdFG8OJCGAFXNu546','정상구','jeong.sg@prime-idc.jp',NULL,'manager,cloudflare','default','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;
|
||||
|
||||
--
|
||||
-- Table structure for table `logger`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `logger`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `logger` (
|
||||
`uid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`user_uid` int(11) NOT NULL,
|
||||
`class_name` varchar(255) DEFAULT NULL,
|
||||
`method_name` varchar(255) DEFAULT NULL,
|
||||
`title` varchar(255) NOT NULL,
|
||||
`content` text NOT NULL,
|
||||
`status` varchar(20) DEFAULT 'default',
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=22 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;
|
||||
/*!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-22 10:45:17
|
||||
File diff suppressed because it is too large
Load Diff
@ -8,4 +8,17 @@ class ServiceEntity extends CustomerEntity
|
||||
{
|
||||
const PK = ServiceModel::PK;
|
||||
const TITLE = ServiceModel::TITLE;
|
||||
public function getAdapterEntities(string $type): array
|
||||
{
|
||||
return $this->attributes[$type] ?? [];
|
||||
}
|
||||
|
||||
public function setAdapterEntities(string $type, array $partEntities): void
|
||||
{
|
||||
if (!isset($this->attributes[$type])) {
|
||||
$this->attributes[$type] = [];
|
||||
}
|
||||
$this->attributes[$type] = $partEntities;
|
||||
// $this->attributes[$type] = array_unique($this->attributes[$type], SORT_REGULAR);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Equipment\Link;
|
||||
|
||||
use App\Models\Equipment\Link\CpuModel;
|
||||
|
||||
class CpuEntity extends LinkEntity
|
||||
{
|
||||
const PK = CpuModel::PK;
|
||||
const TITLE = CpuModel::TITLE;
|
||||
public function getAdapterInfoUID(): string
|
||||
{
|
||||
return $this->attributes['cpuinfo_uid'];
|
||||
}
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Equipment\Link;
|
||||
|
||||
use App\Models\Equipment\Link\DefenceModel;
|
||||
|
||||
class DefenceEntity extends LinkEntity
|
||||
{
|
||||
const PK = DefenceModel::PK;
|
||||
const TITLE = DefenceModel::TITLE;
|
||||
public function getAdapterInfoUID(): string
|
||||
{
|
||||
return $this->attributes['defenceinfo_uid'];
|
||||
}
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Equipment\Link;
|
||||
|
||||
use App\Models\Equipment\Link\DiskModel;
|
||||
|
||||
class DiskEntity extends LinkEntity
|
||||
{
|
||||
const PK = DiskModel::PK;
|
||||
const TITLE = DiskModel::TITLE;
|
||||
public function getAdapterInfoUID(): string
|
||||
{
|
||||
return $this->attributes['diskinfo_uid'];
|
||||
}
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Equipment\Link;
|
||||
|
||||
use App\Models\Equipment\Link\IpModel;
|
||||
|
||||
class IpEntity extends LinkEntity
|
||||
{
|
||||
const PK = IpModel::PK;
|
||||
const TITLE = IpModel::TITLE;
|
||||
public function getAdapterInfoUID(): string
|
||||
{
|
||||
return $this->attributes['ipinfo_uid'];
|
||||
}
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Equipment\Link;
|
||||
|
||||
use App\Models\Equipment\Link\LineModel;
|
||||
|
||||
class LineEntity extends LinkEntity
|
||||
{
|
||||
const PK = LineModel::PK;
|
||||
const TITLE = LineModel::TITLE;
|
||||
public function getAdapterInfoUID(): string
|
||||
{
|
||||
return $this->attributes['lineinfo_uid'];
|
||||
}
|
||||
}
|
||||
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Equipment\Link;
|
||||
|
||||
|
||||
use App\Entities\Equipment\EquipmentEntity;
|
||||
|
||||
abstract class LinkEntity extends EquipmentEntity
|
||||
{
|
||||
public function __construct(array|null $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
}
|
||||
abstract public function getAdapterInfoUID(): string;
|
||||
final public function getServiceInfoUID(): string
|
||||
{
|
||||
return $this->attributes['serverinfo_uid'];
|
||||
}
|
||||
final public function getServerInfoUID(): string
|
||||
{
|
||||
return $this->attributes['serverinfo_uid'];
|
||||
}
|
||||
final public function getBillingType(): string
|
||||
{
|
||||
return $this->attributes['billing_type'];
|
||||
}
|
||||
final public function getAmount(): string
|
||||
{
|
||||
return $this->attributes['amount'];
|
||||
}
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Equipment\Link;
|
||||
|
||||
use App\Models\Equipment\Link\RamModel;
|
||||
|
||||
class RamEntity extends LinkEntity
|
||||
{
|
||||
const PK = RamModel::PK;
|
||||
const TITLE = RamModel::TITLE;
|
||||
public function getAdapterInfoUID(): string
|
||||
{
|
||||
return $this->attributes['raminfo_uid'];
|
||||
}
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Equipment\Link;
|
||||
|
||||
use App\Models\Equipment\Link\SoftwareModel;
|
||||
|
||||
class SoftwareEntity extends LinkEntity
|
||||
{
|
||||
const PK = SoftwareModel::PK;
|
||||
const TITLE = SoftwareModel::TITLE;
|
||||
public function getAdapterInfoUID(): string
|
||||
{
|
||||
return $this->attributes['softwareinfo_uid'];
|
||||
}
|
||||
}
|
||||
@ -12,17 +12,4 @@ class ServerEntity extends EquipmentEntity
|
||||
{
|
||||
return parent::getTitle() . " [{$this->attributes['model']}]";
|
||||
}
|
||||
public function getPartEntities(string $type): array
|
||||
{
|
||||
return $this->attributes[$type] ?? [];
|
||||
}
|
||||
|
||||
public function setPartEntities(string $type, array $partEntities): void
|
||||
{
|
||||
if (!isset($this->attributes[$type])) {
|
||||
$this->attributes[$type] = [];
|
||||
}
|
||||
$this->attributes[$type] = $partEntities;
|
||||
// $this->attributes[$type] = array_unique($this->attributes[$type], SORT_REGULAR);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers\Equipment\Link;
|
||||
|
||||
use App\Models\Equipment\Link\CpuModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class CpuHelper extends LinkHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->setTitleField(field: CpuModel::TITLE);
|
||||
}
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers\Equipment\Link;
|
||||
|
||||
use App\Models\Equipment\Link\DefenceModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class DefenceHelper extends LinkHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->setTitleField(field: DefenceModel::TITLE);
|
||||
}
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers\Equipment\Link;
|
||||
|
||||
use App\Models\Equipment\Link\DiskModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class DiskHelper extends LinkHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->setTitleField(field: DiskModel::TITLE);
|
||||
}
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers\Equipment\Link;
|
||||
|
||||
use App\Models\Equipment\Link\IpModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class IpHelper extends LinkHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->setTitleField(field: IpModel::TITLE);
|
||||
}
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers\Equipment\Link;
|
||||
|
||||
use App\Models\Equipment\Link\LineModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class LineHelper extends LinkHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->setTitleField(field: LineModel::TITLE);
|
||||
}
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers\Equipment\Link;
|
||||
|
||||
use App\Helpers\Equipment\EquipmentHelper;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
abstract class LinkHelper extends EquipmentHelper
|
||||
{
|
||||
protected function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
}
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers\Equipment\Link;
|
||||
|
||||
use App\Models\Equipment\Link\RamModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class RamHelper extends LinkHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->setTitleField(field: RamModel::TITLE);
|
||||
}
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers\Equipment\Link;
|
||||
|
||||
use App\Models\Equipment\Link\SoftwareModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class SoftwareHelper extends LinkHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->setTitleField(field: SoftwareModel::TITLE);
|
||||
}
|
||||
}
|
||||
@ -3,15 +3,13 @@ return [
|
||||
'title' => "고객서비스정보",
|
||||
'label' => [
|
||||
'clientinfo_uid' => "고객명",
|
||||
'rack' => "Rack",
|
||||
'item_type' => "종류",
|
||||
'switch' => "Switch",
|
||||
'billing_at' => "청구일",
|
||||
'start_at' => "개통일",
|
||||
'end_at' => "해지일",
|
||||
'status' => "상태",
|
||||
'updated_at' => "수정일",
|
||||
'created_at' => "신청일",
|
||||
'SERVICE' => "서비스",
|
||||
'SERVER' => "서버",
|
||||
'LINE' => "회선",
|
||||
'IP' => "IP",
|
||||
@ -23,19 +21,35 @@ return [
|
||||
'DOMAIN' => "도메인",
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'type' => "hosting",
|
||||
'switch' => "default",
|
||||
'location' => "default",
|
||||
'type' => "default",
|
||||
'status' => 'default'
|
||||
],
|
||||
"ITEM_TYPE" => [
|
||||
"LINE" => "회선",
|
||||
"IP" => "IP",
|
||||
"SERVER" => "서버",
|
||||
"CPU" => "CPU",
|
||||
"RAM" => "RAM",
|
||||
"DISK" => "DISK",
|
||||
"DEFENCE" => "방어(CS)",
|
||||
"SOFTWARE" => "소프트웨어",
|
||||
"DOMAIN" => "도메인",
|
||||
"SWITCH" => [
|
||||
"R35P10" => "R35P10",
|
||||
"R45P20" => "R45P20",
|
||||
],
|
||||
"LOCATION" => [
|
||||
"default" => "치바",
|
||||
"tokyo" => "도쿄",
|
||||
],
|
||||
"TYPE" => [
|
||||
"default" => "일반",
|
||||
"defence" => "방어",
|
||||
"dedicated" => "전용",
|
||||
"alternative" => "대체",
|
||||
"test" => "테스트",
|
||||
"VPN" => "VPN",
|
||||
"own" => "자사용",
|
||||
"colocation" => "코로케이션",
|
||||
],
|
||||
"RAID" => [
|
||||
"default" => "사용않함",
|
||||
"RAID0" => "RAID0",
|
||||
"RAID1" => "RAID1",
|
||||
"RAID5" => "RAID5",
|
||||
"RAID6" => "RAID6",
|
||||
],
|
||||
"STATUS" => [
|
||||
'default' => "사용중",
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
<?php
|
||||
return [
|
||||
'title' => "CPU연결정보",
|
||||
'label' => [
|
||||
'serverinfo_uid' => "서버",
|
||||
'cpuinfo_uid' => "CPU",
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
];
|
||||
@ -1,9 +0,0 @@
|
||||
<?php
|
||||
return [
|
||||
'title' => "방어연결정보",
|
||||
'label' => [
|
||||
'serverinfo_uid' => "서버",
|
||||
'defenceinfo_uid' => "방어",
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
];
|
||||
@ -1,9 +0,0 @@
|
||||
<?php
|
||||
return [
|
||||
'title' => "Disk연결정보",
|
||||
'label' => [
|
||||
'serverinfo_uid' => "서버",
|
||||
'diskinfo_uid' => "DISK",
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
];
|
||||
@ -1,9 +0,0 @@
|
||||
<?php
|
||||
return [
|
||||
'title' => "IP연결정보",
|
||||
'label' => [
|
||||
'serverinfo_uid' => "서버",
|
||||
'ipinfo_uid' => "IP",
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
];
|
||||
@ -1,9 +0,0 @@
|
||||
<?php
|
||||
return [
|
||||
'title' => "Line연결정보",
|
||||
'label' => [
|
||||
'serverinfo_uid' => "서버",
|
||||
'lineinfo_uid' => "회선",
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
];
|
||||
@ -1,9 +0,0 @@
|
||||
<?php
|
||||
return [
|
||||
'title' => "Ram연결정보",
|
||||
'label' => [
|
||||
'serverinfo_uid' => "서버",
|
||||
'raminfo_uid' => "RAM",
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
];
|
||||
@ -1,9 +0,0 @@
|
||||
<?php
|
||||
return [
|
||||
'title' => "Software연결정보",
|
||||
'label' => [
|
||||
'serverinfo_uid' => "서버",
|
||||
'softwareinfo_uid' => "Software",
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
];
|
||||
@ -3,39 +3,17 @@ return [
|
||||
'title' => "서버장비정보",
|
||||
'label' => [
|
||||
'code' => "장비코드",
|
||||
'switch' => "스위치",
|
||||
'type' => "용도",
|
||||
'model' => "모델",
|
||||
'price' => "금액",
|
||||
'raid' => "RAID",
|
||||
'description' => "설명",
|
||||
'status' => "상태",
|
||||
'manufactur_at' => "입고일",
|
||||
'updated_at' => "수정일",
|
||||
'created_at' => "작성일",
|
||||
'LINE' => "회선",
|
||||
'IP' => "IP",
|
||||
'CPU' => "CPU",
|
||||
'RAM' => "RAM",
|
||||
'DISK' => "DISK",
|
||||
'DEFENCE' => "방어(CS)",
|
||||
'SOFTWARE' => "소프트웨어",
|
||||
'DOMAIN' => "도메인",
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'type' => 'default',
|
||||
'status' => 'default',
|
||||
],
|
||||
"TYPE" => [
|
||||
"default" => "일반",
|
||||
"defence" => "방어",
|
||||
"dedicated" => "전용",
|
||||
"alternative" => "대체",
|
||||
"test" => "테스트",
|
||||
"VPN" => "VPN",
|
||||
"own" => "자사용",
|
||||
"colocation" => "코로케이션",
|
||||
],
|
||||
"MODEL" => [
|
||||
"HP DL360 Gen 6" => "HP DL360 Gen 6",
|
||||
"HP DL360 Gen 7" => "HP DL360 Gen 7",
|
||||
@ -47,13 +25,6 @@ return [
|
||||
"12,13,14세대 PC" => "12,13,14세대 PC",
|
||||
"12,13,14세대 MiniPC" => "12,13,14세대 MiniPC",
|
||||
],
|
||||
"RAID" => [
|
||||
'default' => "없음",
|
||||
"RAID0" => "RAID0",
|
||||
"RAID1" => "RAID1",
|
||||
"RAID5" => "RAID5",
|
||||
"RAID6" => "RAID6",
|
||||
],
|
||||
"STATUS" => [
|
||||
'default' => "사용가능",
|
||||
"pause" => "일시정지",
|
||||
|
||||
@ -105,12 +105,9 @@ abstract class CommonModel extends Model
|
||||
case $this->getTitleField():
|
||||
$rule = "required|trim|string";
|
||||
break;
|
||||
case 'image':
|
||||
case 'picture':
|
||||
$rule = "is_image[{$field}]|mime_in[{$field},image/jpg,image/jpeg,image/gif,image/png,image/webp]|max_size[{$field},300]|max_dims[{$field},2048,768]";
|
||||
break;
|
||||
case "status":
|
||||
$rule = "if_exist|trim|string";
|
||||
break;
|
||||
case "updated_at":
|
||||
case "created_at":
|
||||
case "deleted_at":
|
||||
|
||||
@ -16,6 +16,7 @@ class DomainModel extends CustomerModel
|
||||
"clientinfo_uid",
|
||||
"domain",
|
||||
"price",
|
||||
"expired_at",
|
||||
"status",
|
||||
"updated_at"
|
||||
];
|
||||
@ -29,13 +30,16 @@ class DomainModel extends CustomerModel
|
||||
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
|
||||
}
|
||||
switch ($field) {
|
||||
case "domain":
|
||||
$rule = "required|trim|valid_domain";
|
||||
break;
|
||||
case "clientinfo_uid":
|
||||
case "price":
|
||||
$rule = "required|numeric";
|
||||
break;
|
||||
case "domain":
|
||||
$rule = "required|trim|valid_domain";
|
||||
break;
|
||||
case "expired_at":
|
||||
$rule = "required|valid_date";
|
||||
break;
|
||||
default:
|
||||
$rule = parent::getFieldRule($action, $field);
|
||||
break;
|
||||
|
||||
@ -8,15 +8,19 @@ class ServiceModel extends CustomerModel
|
||||
{
|
||||
const TABLE = "serviceinfo";
|
||||
const PK = "uid";
|
||||
const TITLE = "rack";
|
||||
const TITLE = "switch";
|
||||
protected $table = self::TABLE;
|
||||
protected $primaryKey = self::PK;
|
||||
protected $returnType = ServiceEntity::class;
|
||||
protected $allowedFields = [
|
||||
"clientinfo_uid",
|
||||
"item_type",
|
||||
"item_uid",
|
||||
"title",
|
||||
"switch",
|
||||
"location",
|
||||
"type",
|
||||
"raid",
|
||||
"billing_at",
|
||||
"start_at",
|
||||
"end_at",
|
||||
"status",
|
||||
"updated_at"
|
||||
];
|
||||
@ -33,10 +37,20 @@ class ServiceModel extends CustomerModel
|
||||
case "clientinfo_uid":
|
||||
$rule = "required|numeric";
|
||||
break;
|
||||
case "item_type":
|
||||
case "type":
|
||||
case "status":
|
||||
$rule = "required|trim|string";
|
||||
break;
|
||||
case "billing_at":
|
||||
case "start_at":
|
||||
$rule = "required|valid_date";
|
||||
break;
|
||||
case "end_at":
|
||||
$rule = "if_exist|valid_date";
|
||||
break;
|
||||
case "raid":
|
||||
$rule = "if_exist|trim|string";
|
||||
break;
|
||||
default:
|
||||
$rule = parent::getFieldRule($action, $field);
|
||||
break;
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Equipment\Link;
|
||||
|
||||
use App\Entities\Equipment\Link\CpuEntity;
|
||||
|
||||
class CpuModel extends LinkModel
|
||||
{
|
||||
const TABLE = "serverinfos_cpuinfos";
|
||||
const PK = "uid";
|
||||
const TITLE = "uid";
|
||||
protected $table = self::TABLE;
|
||||
protected $primaryKey = self::PK;
|
||||
protected $returnType = CpuEntity::class;
|
||||
protected $allowedFields = [
|
||||
"serverinfo_uid",
|
||||
"cpuinfo_uid",
|
||||
"updated_at",
|
||||
];
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Equipment\Link;
|
||||
|
||||
use App\Entities\Equipment\Link\DefenceEntity;
|
||||
|
||||
class DefenceModel extends LinkModel
|
||||
{
|
||||
const TABLE = "serverinfos_defenceinfos";
|
||||
const PK = "uid";
|
||||
const TITLE = "uid";
|
||||
protected $table = self::TABLE;
|
||||
protected $primaryKey = self::PK;
|
||||
protected $returnType = DefenceEntity::class;
|
||||
protected $allowedFields = [
|
||||
"serverinfo_uid",
|
||||
"defenceinfo_uid",
|
||||
"updated_at",
|
||||
];
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Equipment\Link;
|
||||
|
||||
use App\Entities\Equipment\Link\DiskEntity;
|
||||
|
||||
class DiskModel extends LinkModel
|
||||
{
|
||||
const TABLE = "serverinfos_diskinfos";
|
||||
const PK = "uid";
|
||||
const TITLE = "uid";
|
||||
protected $table = self::TABLE;
|
||||
protected $primaryKey = self::PK;
|
||||
protected $returnType = DiskEntity::class;
|
||||
protected $allowedFields = [
|
||||
"serverinfo_uid",
|
||||
"diskinfo_uid",
|
||||
"updated_at",
|
||||
];
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Equipment\Link;
|
||||
|
||||
use App\Entities\Equipment\Link\IpEntity;
|
||||
|
||||
class IpModel extends LinkModel
|
||||
{
|
||||
const TABLE = "serverinfos_ipinfos";
|
||||
const PK = "uid";
|
||||
const TITLE = "uid";
|
||||
protected $table = self::TABLE;
|
||||
protected $primaryKey = self::PK;
|
||||
protected $returnType = IpEntity::class;
|
||||
protected $allowedFields = [
|
||||
"serverinfo_uid",
|
||||
"ipinfo_uid",
|
||||
"updated_at",
|
||||
];
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Equipment\Link;
|
||||
|
||||
use App\Entities\Equipment\Link\LineEntity;
|
||||
|
||||
class LineModel extends LinkModel
|
||||
{
|
||||
const TABLE = "serverinfos_lineinfos";
|
||||
const PK = "uid";
|
||||
const TITLE = "uid";
|
||||
protected $table = self::TABLE;
|
||||
protected $primaryKey = self::PK;
|
||||
protected $returnType = LineEntity::class;
|
||||
protected $allowedFields = [
|
||||
"serverinfo_uid",
|
||||
"lineinfo_uid",
|
||||
"updated_at",
|
||||
];
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Equipment\Link;
|
||||
|
||||
use App\Models\Equipment\EquipmentModel;
|
||||
|
||||
abstract class LinkModel extends EquipmentModel
|
||||
{
|
||||
protected function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
final 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 "serverinfo_uid":
|
||||
case "cpuinfo_uid":
|
||||
case "raminfo_uid":
|
||||
case "diskinfo_uid":
|
||||
$rule = "required|numeric";
|
||||
break;
|
||||
default:
|
||||
$rule = parent::getFieldRule($action, $field);
|
||||
break;
|
||||
}
|
||||
return $rule;
|
||||
}
|
||||
}
|
||||
@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Equipment\Link;
|
||||
|
||||
use App\Entities\Equipment\Link\RamEntity;
|
||||
|
||||
class RamModel extends LinkModel
|
||||
{
|
||||
const TABLE = "serverinfos_raminfos";
|
||||
const PK = "uid";
|
||||
const TITLE = "uid";
|
||||
protected $table = self::TABLE;
|
||||
protected $primaryKey = self::PK;
|
||||
protected $returnType = RamEntity::class;
|
||||
protected $allowedFields = [
|
||||
"serverinfo_uid",
|
||||
"raminfo_uid",
|
||||
"updated_at",
|
||||
];
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Equipment\Link;
|
||||
|
||||
use App\Entities\Equipment\Link\SoftwareEntity;
|
||||
|
||||
class SoftwareModel extends LinkModel
|
||||
{
|
||||
const TABLE = "serverinfos_softwareinfos";
|
||||
const PK = "uid";
|
||||
const TITLE = "uid";
|
||||
protected $table = self::TABLE;
|
||||
protected $primaryKey = self::PK;
|
||||
protected $returnType = SoftwareEntity::class;
|
||||
protected $allowedFields = [
|
||||
"serverinfo_uid",
|
||||
"softwareinfo_uid",
|
||||
"updated_at",
|
||||
];
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
@ -8,17 +8,14 @@ class ServerModel extends EquipmentModel
|
||||
{
|
||||
const TABLE = "serverinfo";
|
||||
const PK = "uid";
|
||||
const TITLE = "code";
|
||||
const TITLE = "model";
|
||||
protected $table = self::TABLE;
|
||||
protected $primaryKey = self::PK;
|
||||
protected $returnType = ServerEntity::class;
|
||||
protected $allowedFields = [
|
||||
"code",
|
||||
"switch",
|
||||
"type",
|
||||
"model",
|
||||
"price",
|
||||
"raid",
|
||||
"manufactur_at",
|
||||
"description",
|
||||
"status",
|
||||
@ -35,10 +32,7 @@ class ServerModel extends EquipmentModel
|
||||
}
|
||||
switch ($field) {
|
||||
case "code":
|
||||
case "switch":
|
||||
case "model":
|
||||
case "type":
|
||||
case "raid":
|
||||
$rule = "required|trim|string";
|
||||
break;
|
||||
case "price":
|
||||
|
||||
@ -26,18 +26,22 @@ class ServiceService extends CustomerService
|
||||
{
|
||||
return [
|
||||
"clientinfo_uid",
|
||||
"item_type",
|
||||
"item_uid",
|
||||
"title",
|
||||
"status",
|
||||
"switch",
|
||||
"location",
|
||||
"type",
|
||||
"raid",
|
||||
"billing_at",
|
||||
"start_at",
|
||||
"end_at",
|
||||
"status"
|
||||
];
|
||||
}
|
||||
public function getFilterFields(): array
|
||||
{
|
||||
return ["clientinfo_uid", 'item_type', 'status'];
|
||||
return ["clientinfo_uid", 'switch', 'location', 'type', 'raid', 'status'];
|
||||
}
|
||||
public function getBatchJobFields(): array
|
||||
{
|
||||
return ['item_type', 'status'];
|
||||
return ['status'];
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Equipment\Link;
|
||||
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
use App\Entities\Equipment\Link\CpuEntity;
|
||||
use App\Models\Equipment\Link\CpuModel;
|
||||
use App\Services\Equipment\Part\CpuService as AdapterService;
|
||||
|
||||
class CpuService extends LinkService
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->addClassName('Cpu');
|
||||
}
|
||||
public function getModelClass(): CpuModel
|
||||
{
|
||||
return new CpuModel;
|
||||
}
|
||||
public function getEntityClass(): CpuEntity
|
||||
{
|
||||
return new CpuEntity();
|
||||
}
|
||||
protected function getAdapterService(): AdapterService
|
||||
{
|
||||
return new AdapterService();
|
||||
}
|
||||
protected function getAdapterField(): string
|
||||
{
|
||||
return "cpuinfo_uid";
|
||||
}
|
||||
}
|
||||
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Equipment\Link;
|
||||
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
use App\Entities\Equipment\Link\DefenceEntity;
|
||||
use App\Models\Equipment\Link\DefenceModel;
|
||||
use App\Services\Equipment\Part\DefenceService as AdapterService;
|
||||
|
||||
class DefenceService extends LinkService
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->addClassName('Defence');
|
||||
}
|
||||
public function getModelClass(): DefenceModel
|
||||
{
|
||||
return new DefenceModel;
|
||||
}
|
||||
public function getEntityClass(): DefenceEntity
|
||||
{
|
||||
return new DefenceEntity();
|
||||
}
|
||||
protected function getAdapterService(): AdapterService
|
||||
{
|
||||
return new AdapterService();
|
||||
}
|
||||
protected function getAdapterField(): string
|
||||
{
|
||||
return "defenceinfo_uid";
|
||||
}
|
||||
}
|
||||
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Equipment\Link;
|
||||
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
use App\Entities\Equipment\Link\DiskEntity;
|
||||
use App\Models\Equipment\Link\DiskModel;
|
||||
use App\Services\Equipment\Part\DiskService as AdapterService;
|
||||
|
||||
class DiskService extends LinkService
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->addClassName('Disk');
|
||||
}
|
||||
public function getModelClass(): DiskModel
|
||||
{
|
||||
return new DiskModel;
|
||||
}
|
||||
public function getEntityClass(): DiskEntity
|
||||
{
|
||||
return new DiskEntity();
|
||||
}
|
||||
protected function getAdapterService(): AdapterService
|
||||
{
|
||||
return new AdapterService();
|
||||
}
|
||||
protected function getAdapterField(): string
|
||||
{
|
||||
return "diskinfo_uid";
|
||||
}
|
||||
}
|
||||
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Equipment\Link;
|
||||
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
use App\Entities\Equipment\Link\IpEntity;
|
||||
use App\Models\Equipment\Link\IpModel;
|
||||
use App\Services\Equipment\Part\IpService as AdapterService;
|
||||
|
||||
class IpService extends LinkService
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->addClassName('Ip');
|
||||
}
|
||||
public function getModelClass(): IpModel
|
||||
{
|
||||
return new IpModel;
|
||||
}
|
||||
public function getEntityClass(): IpEntity
|
||||
{
|
||||
return new IpEntity();
|
||||
}
|
||||
protected function getAdapterService(): AdapterService
|
||||
{
|
||||
return new AdapterService();
|
||||
}
|
||||
protected function getAdapterField(): string
|
||||
{
|
||||
return "ipinfo_uid";
|
||||
}
|
||||
}
|
||||
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Equipment\Link;
|
||||
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
use App\Entities\Equipment\Link\LineEntity;
|
||||
use App\Models\Equipment\Link\LineModel;
|
||||
use App\Services\Equipment\Part\LineService as AdapterService;
|
||||
|
||||
class LineService extends LinkService
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->addClassName('Line');
|
||||
}
|
||||
public function getModelClass(): LineModel
|
||||
{
|
||||
return new LineModel;
|
||||
}
|
||||
public function getEntityClass(): LineEntity
|
||||
{
|
||||
return new LineEntity();
|
||||
}
|
||||
protected function getAdapterService(): AdapterService
|
||||
{
|
||||
return new AdapterService();
|
||||
}
|
||||
protected function getAdapterField(): string
|
||||
{
|
||||
return "lineinfo_uid";
|
||||
}
|
||||
}
|
||||
@ -1,44 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Equipment\Link;
|
||||
|
||||
|
||||
use App\Services\Equipment\EquipmentService;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
use App\Entities\Equipment\ServerEntity;
|
||||
|
||||
abstract class LinkService extends EquipmentService
|
||||
{
|
||||
protected function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->addClassName('Link');
|
||||
}
|
||||
abstract protected function getAdapterService(): mixed;
|
||||
abstract protected function getAdapterField(): string;
|
||||
final public function getAdapterEntities(ServerEntity $serverEntity): array
|
||||
{
|
||||
$entities = [];
|
||||
foreach ($this->getEntities(['serverinfo_uid' => $serverEntity->getPK()]) as $entity) {
|
||||
$entities[] = $this->getAdapterService()->getEntity($entity->getAdapterInfoUID());
|
||||
}
|
||||
return $entities;
|
||||
}
|
||||
|
||||
public function getFields(): array
|
||||
{
|
||||
return [
|
||||
"serverinfo_uid",
|
||||
$this->getAdapterField(),
|
||||
];
|
||||
}
|
||||
public function getFilterFields(): array
|
||||
{
|
||||
return ["serverinfo_uid", $this->getAdapterField()];
|
||||
}
|
||||
public function getBatchJobFields(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Equipment\Link;
|
||||
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
use App\Entities\Equipment\Link\RamEntity;
|
||||
use App\Models\Equipment\Link\RamModel;
|
||||
use App\Services\Equipment\Part\RamService as AdapterService;
|
||||
|
||||
class RamService extends LinkService
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->addClassName('Ram');
|
||||
}
|
||||
public function getModelClass(): RamModel
|
||||
{
|
||||
return new RamModel();
|
||||
}
|
||||
public function getEntityClass(): RamEntity
|
||||
{
|
||||
return new RamEntity();
|
||||
}
|
||||
protected function getAdapterService(): AdapterService
|
||||
{
|
||||
return new AdapterService();
|
||||
}
|
||||
protected function getAdapterField(): string
|
||||
{
|
||||
return "raminfo_uid";
|
||||
}
|
||||
}
|
||||
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Equipment\Link;
|
||||
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
use App\Entities\Equipment\Link\SoftwareEntity;
|
||||
use App\Models\Equipment\Link\SoftwareModel;
|
||||
use App\Services\Equipment\Part\SoftwareService as AdapterService;
|
||||
|
||||
class SoftwareService extends LinkService
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->addClassName('Software');
|
||||
}
|
||||
public function getModelClass(): SoftwareModel
|
||||
{
|
||||
return new SoftwareModel;
|
||||
}
|
||||
public function getEntityClass(): SoftwareEntity
|
||||
{
|
||||
return new SoftwareEntity();
|
||||
}
|
||||
protected function getAdapterService(): AdapterService
|
||||
{
|
||||
return new AdapterService();
|
||||
}
|
||||
protected function getAdapterField(): string
|
||||
{
|
||||
return "softwareinfo_uid";
|
||||
}
|
||||
}
|
||||
@ -5,7 +5,6 @@ namespace App\Services\Equipment\Part;
|
||||
use App\Entities\Equipment\Part\CpuEntity;
|
||||
use App\Models\Equipment\Part\CpuModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
use App\Services\Equipment\Link\CpuService as LinkService;
|
||||
|
||||
class CpuService extends PartService
|
||||
{
|
||||
@ -23,10 +22,6 @@ class CpuService extends PartService
|
||||
{
|
||||
return new CpuEntity();
|
||||
}
|
||||
protected function getLinkService(): LinkService
|
||||
{
|
||||
return new LinkService($this->request);
|
||||
}
|
||||
final public function getFields(): array
|
||||
{
|
||||
return [
|
||||
|
||||
@ -5,7 +5,6 @@ namespace App\Services\Equipment\Part;
|
||||
use App\Entities\Equipment\Part\DiskEntity;
|
||||
use App\Models\Equipment\Part\DiskModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
use App\Services\Equipment\Link\DiskService as LinkService;
|
||||
|
||||
class DiskService extends PartService
|
||||
{
|
||||
@ -23,10 +22,6 @@ class DiskService extends PartService
|
||||
{
|
||||
return new DiskEntity();
|
||||
}
|
||||
protected function getLinkService(): LinkService
|
||||
{
|
||||
return new LinkService($this->request);
|
||||
}
|
||||
final public function getFields(): array
|
||||
{
|
||||
return [
|
||||
|
||||
@ -5,7 +5,6 @@ namespace App\Services\Equipment\Part;
|
||||
use App\Entities\Equipment\Part\RamEntity;
|
||||
use App\Models\Equipment\Part\RamModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
use App\Services\Equipment\Link\RamService as LinkService;
|
||||
|
||||
class RamService extends PartService
|
||||
{
|
||||
@ -23,10 +22,6 @@ class RamService extends PartService
|
||||
{
|
||||
return new RamEntity();
|
||||
}
|
||||
protected function getLinkService(): LinkService
|
||||
{
|
||||
return new LinkService($this->request);
|
||||
}
|
||||
final public function getFields(): array
|
||||
{
|
||||
return [
|
||||
|
||||
@ -27,23 +27,20 @@ class ServerService extends EquipmentService
|
||||
{
|
||||
return [
|
||||
"code",
|
||||
"switch",
|
||||
"manufactur_at",
|
||||
"type",
|
||||
"model",
|
||||
"price",
|
||||
"raid",
|
||||
"status",
|
||||
"description",
|
||||
];
|
||||
}
|
||||
public function getFilterFields(): array
|
||||
{
|
||||
return ["type", 'model', "raid", 'status'];
|
||||
return ['model', 'status'];
|
||||
}
|
||||
public function getBatchJobFields(): array
|
||||
{
|
||||
return ["type", 'model', "raid", 'status'];
|
||||
return ['model', 'status'];
|
||||
}
|
||||
//서비스에서 사용중인 서버를 occupied로 변경
|
||||
public function setOccupied(ServerEntity $entity): ServerEntity
|
||||
|
||||
Loading…
Reference in New Issue
Block a user