dbms_init...1
This commit is contained in:
parent
a724b4c79f
commit
3023eb21ea
@ -97,6 +97,7 @@ define('EVENT_PRIORITY_HIGH', 10);
|
||||
define('DEFAULTS', [
|
||||
'DELIMITER_FILE' => "||",
|
||||
'DELIMITER_ROLE' => ",",
|
||||
'STATUS' => "default",
|
||||
]);
|
||||
define('MESSAGES', [
|
||||
'CREATED' => '생성되었습니다.',
|
||||
|
||||
@ -1,93 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin\Customer;
|
||||
|
||||
use App\Helpers\Customer\ServicePartHelper;
|
||||
use App\Services\Customer\ServicePartService;
|
||||
use App\Services\Equipment\PartService;
|
||||
|
||||
use CodeIgniter\HTTP\RedirectResponse;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class ServicePartController extends CustomerController
|
||||
{
|
||||
private ?PartService $_partService = null;
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
|
||||
$this->class_path = $this->getService()->getClassPath();
|
||||
$this->title = lang("{$this->getService()->getClassPath()}.title");
|
||||
$this->helper = $this->getHelper();
|
||||
}
|
||||
public function getService(): ServicePartService
|
||||
{
|
||||
if (!$this->_service) {
|
||||
$this->_service = new ServicePartService($this->request);
|
||||
}
|
||||
return $this->_service;
|
||||
}
|
||||
public function getHelper(): mixed
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new ServicePartHelper($this->request);
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
final public function getPartService(): PartService
|
||||
{
|
||||
if (!$this->_partService) {
|
||||
$this->_partService = new PartService($this->request);
|
||||
}
|
||||
return $this->_partService;
|
||||
}
|
||||
protected function getFormFieldOption(string $field, array $options): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'serviceinfo_uid':
|
||||
$options[$field] = $this->getServiceService()->getFormFieldOption($field,);
|
||||
break;
|
||||
case 'partinfo_uid':
|
||||
$options[$field] = $this->getPartService()->getFormFieldOption($field,);
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
break;
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
protected function getResultPageByActon(string $action, string $message = MESSAGES["SUCCESS"]): RedirectResponse|string
|
||||
{
|
||||
switch ($action) {
|
||||
case 'index':
|
||||
case 'view':
|
||||
$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;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
|
||||
|
||||
protected function setOrderByForList()
|
||||
{
|
||||
//OrderBy 처리
|
||||
$this->getService()->getModel()->orderBy('serviceinfo_uid', 'ASC', false);
|
||||
parent::setOrderByForList();
|
||||
}
|
||||
protected function index_process(): array
|
||||
{
|
||||
$fields = [
|
||||
'fields' => ['serviceinfo_uid', 'billing_type', 'partinfo_uid'],
|
||||
];
|
||||
$this->init('index', $fields);
|
||||
$this->modal_type = 'modal_iframe';
|
||||
return parent::index_process();
|
||||
}
|
||||
}
|
||||
@ -1,93 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin\Equipment;
|
||||
|
||||
use App\Helpers\Equipment\ServerPartHelper;
|
||||
use App\Services\Equipment\PartService;
|
||||
use App\Services\Equipment\ServerPartService;
|
||||
|
||||
use CodeIgniter\HTTP\RedirectResponse;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class ServerPartController extends EquipmentController
|
||||
{
|
||||
private ?PartService $_partService = null;
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
|
||||
$this->class_path = $this->getService()->getClassPath();
|
||||
$this->title = lang("{$this->getService()->getClassPath()}.title");
|
||||
$this->helper = $this->getHelper();
|
||||
}
|
||||
public function getService(): ServerPartService
|
||||
{
|
||||
if (!$this->_service) {
|
||||
$this->_service = new ServerPartService($this->request);
|
||||
}
|
||||
return $this->_service;
|
||||
}
|
||||
public function getHelper(): mixed
|
||||
{
|
||||
if (!$this->_helper) {
|
||||
$this->_helper = new ServerPartHelper($this->request);
|
||||
}
|
||||
return $this->_helper;
|
||||
}
|
||||
final public function getPartService(): PartService
|
||||
{
|
||||
if (!$this->_partService) {
|
||||
$this->_partService = new PartService($this->request);
|
||||
}
|
||||
return $this->_partService;
|
||||
}
|
||||
protected function getFormFieldOption(string $field, array $options): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'serverinfo_uid':
|
||||
$options = $this->getServerService()->getFormFieldOption($field);
|
||||
break;
|
||||
case 'partinfo_uid':
|
||||
$options = $this->getPartService()->getFormFieldOption($field);
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
break;
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
protected function getResultPageByActon(string $action, string $message = MESSAGES["SUCCESS"]): RedirectResponse|string
|
||||
{
|
||||
switch ($action) {
|
||||
case 'index':
|
||||
case 'view':
|
||||
$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;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
|
||||
|
||||
protected function setOrderByForList()
|
||||
{
|
||||
//OrderBy 처리
|
||||
$this->getService()->getModel()->orderBy('serverinfo_uid', 'ASC', false);
|
||||
parent::setOrderByForList();
|
||||
}
|
||||
protected function index_process(): array
|
||||
{
|
||||
$fields = [
|
||||
'fields' => ['serverinfo_uid', 'type', 'partinfo_uid'],
|
||||
];
|
||||
$this->init('index', $fields);
|
||||
$this->modal_type = 'modal_iframe';
|
||||
return parent::index_process();
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
91
app/Database/dbms_user_logger.sql
Normal file
91
app/Database/dbms_user_logger.sql
Normal file
@ -0,0 +1,91 @@
|
||||
/*!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 'use',
|
||||
`status` varchar(10) NOT NULL DEFAULT 'use',
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`uid`),
|
||||
UNIQUE KEY `id` (`id`),
|
||||
UNIQUE KEY `email` (`email`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `user`
|
||||
--
|
||||
|
||||
LOCK TABLES `user` WRITE;
|
||||
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
|
||||
INSERT INTO `user` VALUES (1,'choi.jh','$2y$10$9kUte0xrvEkxtI9CzVaeKeCAxzOR4pKPpsCaQHR1YW7dXsCrTLWeC','최준흠','choi.jh@prime-idc.jp','','manager,cloudflare,firewall,director,master','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','unuse','2023-09-04 10:27:32','2023-09-04 09:48:02'),(21,'masakuni','$2y$10$di6Y7CqJGbbf72kDyCrOCOafJgk3vqJCYg6N3EtBUc3J6r24/7SFe','김창국','masakuni@prime-idc.jp',NULL,'cloudflare','unuse','2023-12-18 08:56:29','2023-12-18 08:56:29'),(22,'bjh','$2y$10$LnEQ6kz4igRPZeDYwe7UluRiSaMVGN9Jj1fW3QqUUp6zPeLJW9goS','배장훈','bjh@prime-idc.jp',NULL,'cloudflare','unuse','2024-06-06 23:51:19','2024-02-26 01:26:20'),(23,'cho.sh','$2y$10$jmmNrEsFmb2.Zj3OkBXDHuktrIj.NCP/tO2k9kquFBTBssa/lNG6y','조성호','cho.sh@prime-idc.jp','','manager','unuse','2024-10-02 00:45:19','2024-10-02 00:32:30'),(24,'kobn','$2y$10$pWM/XFfSNeSng32sypbDX.WaR4UlM4EDkYKCQfFkYIOC7Ppg0nc5G','고병남','ko@prime-idc.jp',NULL,'manager,cloudflare','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 'use',
|
||||
`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
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Customer;
|
||||
|
||||
use App\Models\Customer\ServicePartModel;
|
||||
|
||||
class ServicePartEntity extends CustomerEntity
|
||||
{
|
||||
const PK = ServicePartModel::PK;
|
||||
const TITLE = ServicePartModel::TITLE;
|
||||
|
||||
public function getServiceInfo()
|
||||
{
|
||||
return $this->attributes['serviceinfo_uid'];
|
||||
}
|
||||
|
||||
public function getPartInfo()
|
||||
{
|
||||
return $this->attributes['partinfo_uid'];
|
||||
}
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Customer;
|
||||
|
||||
use App\Models\Customer\ServiceServerModel;
|
||||
|
||||
class ServiceServerEntity extends CustomerEntity
|
||||
{
|
||||
const PK = ServiceServerModel::PK;
|
||||
const TITLE = ServiceServerModel::TITLE;
|
||||
|
||||
public function getServiceInfoUID()
|
||||
{
|
||||
return $this->attributes['serviceinfo_uid'];
|
||||
}
|
||||
|
||||
public function getServerInfoUID()
|
||||
{
|
||||
return $this->attributes['serverinfo_uid'];
|
||||
}
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Equipment;
|
||||
|
||||
use App\Models\Equipment\ServerPartModel;
|
||||
|
||||
class ServerPartEntity extends EquipmentEntity
|
||||
{
|
||||
const PK = ServerPartModel::PK;
|
||||
const TITLE = ServerPartModel::TITLE;
|
||||
|
||||
public function getServerInfoUID()
|
||||
{
|
||||
return $this->attributes['serverinfo_uid'];
|
||||
}
|
||||
|
||||
public function getPartInfoUID()
|
||||
{
|
||||
return $this->attributes['partinfo_uid'];
|
||||
}
|
||||
}
|
||||
@ -337,7 +337,7 @@ class CommonHelper
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
public function getListRowColor(mixed $entity, string $field = 'status', string $value = 'use'): string
|
||||
final public function getListRowColor(mixed $entity, string $field = 'status', string $value = DEFAULTS['STATUS']): string
|
||||
{
|
||||
return $entity->isMatched($field, $value) ? "" : 'class="table-danger"';
|
||||
}
|
||||
|
||||
@ -13,8 +13,4 @@ class AccountHelper extends CustomerHelper
|
||||
parent::__construct($request);
|
||||
$this->setTitleField(AccountModel::TITLE);
|
||||
}
|
||||
public function getListRowColor(mixed $entity, string $field = 'status', string $value = 'in'): string
|
||||
{
|
||||
return $entity->isMatched($field, $value) ? "" : 'class="table-danger"';
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,8 +13,4 @@ class CouponHelper extends CustomerHelper
|
||||
parent::__construct($request);
|
||||
$this->setTitleField(CouponModel::TITLE);
|
||||
}
|
||||
public function getListRowColor(mixed $entity, string $field = 'status', string $value = 'in'): string
|
||||
{
|
||||
return $entity->isMatched($field, $value) ? "" : 'class="table-danger"';
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,8 +13,4 @@ class PointHelper extends CustomerHelper
|
||||
parent::__construct($request);
|
||||
$this->setTitleField(field: PointModel::TITLE);
|
||||
}
|
||||
public function getListRowColor(mixed $entity, string $field = 'status', string $value = 'in'): string
|
||||
{
|
||||
return $entity->isMatched($field, $value) ? "" : 'class="table-danger"';
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers\Customer;
|
||||
|
||||
use App\Models\Customer\ServicePartModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class ServicePartHelper extends CustomerHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->setTitleField(field: ServicePartModel::TITLE);
|
||||
}
|
||||
|
||||
public function getListRowColor(mixed $entity, string $field = 'status', string $value = 'use'): string
|
||||
{
|
||||
return "";
|
||||
// return $entity->isMatched($field, $value) ? "" : 'class="table-danger"';
|
||||
}
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers\Customer;
|
||||
|
||||
use App\Models\Customer\ServiceServerModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class ServiceServerHelper extends CustomerHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->setTitleField(field: ServiceServerModel::TITLE);
|
||||
}
|
||||
|
||||
public function getListRowColor(mixed $entity, string $field = 'status', string $value = 'use'): string
|
||||
{
|
||||
return "";
|
||||
// return $entity->isMatched($field, $value) ? "" : 'class="table-danger"';
|
||||
}
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers\Equipment;
|
||||
|
||||
use App\Models\Equipment\ServerPartModel;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
class ServerPartHelper extends EquipmentHelper
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->setTitleField(field: ServerPartModel::TITLE);
|
||||
}
|
||||
|
||||
public function getListRowColor(mixed $entity, string $field = 'status', string $value = 'use'): string
|
||||
{
|
||||
return "";
|
||||
// return $entity->isMatched($field, $value) ? "" : 'class="table-danger"';
|
||||
}
|
||||
}
|
||||
@ -11,10 +11,10 @@ return [
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'status' => "in"
|
||||
'status' => 'default',
|
||||
],
|
||||
"STATUS" => [
|
||||
"in" => "입금",
|
||||
'default' => "입금",
|
||||
"out" => "출금",
|
||||
],
|
||||
];
|
||||
|
||||
@ -15,7 +15,7 @@ return [
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'role' => "user",
|
||||
'status' => "use"
|
||||
'status' => 'default',
|
||||
],
|
||||
"ROLE" => [
|
||||
"user" => "일반회원",
|
||||
@ -23,7 +23,7 @@ return [
|
||||
"reseller" => "리셀러",
|
||||
],
|
||||
"STATUS" => [
|
||||
"use" => "사용",
|
||||
'default' => "사용",
|
||||
"pause" => "일시정지",
|
||||
"terminated" => "해지",
|
||||
],
|
||||
|
||||
@ -10,10 +10,10 @@ return [
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'status' => "in"
|
||||
'status' => 'default'
|
||||
],
|
||||
"STATUS" => [
|
||||
"in" => "추가",
|
||||
'default' => "추가",
|
||||
"out" => "사용",
|
||||
],
|
||||
];
|
||||
|
||||
@ -10,10 +10,10 @@ return [
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'status' => "in"
|
||||
'status' => 'default'
|
||||
],
|
||||
"STATUS" => [
|
||||
"in" => "입금",
|
||||
'default' => "입금",
|
||||
"out" => "출금",
|
||||
],
|
||||
];
|
||||
|
||||
@ -22,14 +22,14 @@ return [
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'type' => "hosting",
|
||||
'status' => "use"
|
||||
'status' => 'default'
|
||||
],
|
||||
"TYPE" => [
|
||||
"hosting" => "서버호스팅",
|
||||
"colocation" => "코로케이션",
|
||||
],
|
||||
"STATUS" => [
|
||||
"use" => "사용중",
|
||||
'default' => "사용중",
|
||||
"pause" => "일시정지",
|
||||
"terminated" => "해지",
|
||||
],
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
<?php
|
||||
return [
|
||||
'title' => "서비스부품연결",
|
||||
'label' => [
|
||||
'serviceinfo_uid' => "서비스",
|
||||
'partinfo_uid' => "장비부품",
|
||||
'billing_type' => "청구유형",
|
||||
'amount' => "금액",
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'billing_type' => 'month',
|
||||
],
|
||||
"BILLING_TYPE" => [
|
||||
"month" => "월별",
|
||||
"onetime" => "일회성",
|
||||
],
|
||||
];
|
||||
@ -1,18 +0,0 @@
|
||||
<?php
|
||||
return [
|
||||
'title' => "서비스서버연결",
|
||||
'label' => [
|
||||
'serviceinfo_uid' => "서비스",
|
||||
'serverinfo_uid' => "서버",
|
||||
'billing_type' => "청구유형",
|
||||
'amount' => "금액",
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'billing_type' => 'month',
|
||||
],
|
||||
"BILLING_TYPE" => [
|
||||
"month" => "월별",
|
||||
"onetime" => "일회성",
|
||||
],
|
||||
];
|
||||
@ -14,14 +14,14 @@ return [
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'type' => 'VPC-CS',
|
||||
'status' => "use"
|
||||
'status' => 'default'
|
||||
],
|
||||
"TYPE" => [
|
||||
"VPC-CS" => "VPC-CS",
|
||||
"KT-CS" => "KT-CS",
|
||||
],
|
||||
"STATUS" => [
|
||||
"use" => "사용가능",
|
||||
'default' => "사용가능",
|
||||
"pause" => "일시정지",
|
||||
"occupied" => "사용중",
|
||||
],
|
||||
|
||||
@ -10,10 +10,10 @@ return [
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'status' => "use"
|
||||
'status' => 'default'
|
||||
],
|
||||
"STATUS" => [
|
||||
"use" => "사용가능",
|
||||
'default' => "사용가능",
|
||||
"pause" => "일시정지",
|
||||
"occupied" => "사용중",
|
||||
"forbidden" => "사용금지됨",
|
||||
|
||||
@ -14,7 +14,7 @@ return [
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'type' => 'general',
|
||||
'status' => "use"
|
||||
'status' => 'default'
|
||||
],
|
||||
"TYPE" => [
|
||||
"general" => "일반",
|
||||
@ -22,7 +22,7 @@ return [
|
||||
"defence" => "방어",
|
||||
],
|
||||
"STATUS" => [
|
||||
"use" => "사용가능",
|
||||
'default' => "사용가능",
|
||||
"pause" => "일시정지",
|
||||
"terminated" => "해지",
|
||||
],
|
||||
|
||||
@ -9,10 +9,10 @@ return [
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'status' => "use"
|
||||
'status' => 'default'
|
||||
],
|
||||
"STATUS" => [
|
||||
"use" => "사용가능",
|
||||
'default' => "사용가능",
|
||||
"pause" => "일시정지",
|
||||
],
|
||||
];
|
||||
|
||||
@ -9,10 +9,10 @@ return [
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'status' => "use"
|
||||
'status' => 'default'
|
||||
],
|
||||
"STATUS" => [
|
||||
"use" => "사용가능",
|
||||
'default' => "사용가능",
|
||||
"pause" => "일시정지",
|
||||
],
|
||||
];
|
||||
|
||||
@ -9,10 +9,10 @@ return [
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'status' => "use"
|
||||
'status' => 'default'
|
||||
],
|
||||
"STATUS" => [
|
||||
"use" => "사용가능",
|
||||
'default' => "사용가능",
|
||||
"pause" => "일시정지",
|
||||
],
|
||||
];
|
||||
|
||||
@ -16,7 +16,7 @@ return [
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'type' => 'RacKMount',
|
||||
'status' => "use",
|
||||
'status' => 'default',
|
||||
],
|
||||
"TYPE" => [
|
||||
"Rack" => "RacKMount",
|
||||
@ -36,7 +36,7 @@ return [
|
||||
"12,13,14세대 MiniPC" => "12,13,14세대 MiniPC",
|
||||
],
|
||||
"STATUS" => [
|
||||
"use" => "사용가능",
|
||||
'default' => "사용가능",
|
||||
"pause" => "일시정지",
|
||||
"occupied" => "사용중",
|
||||
],
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
<?php
|
||||
return [
|
||||
'title' => "장비부품연결",
|
||||
'label' => [
|
||||
'type' => "종류",
|
||||
'serverinfo_uid' => "서버",
|
||||
'partinfo_uid' => "부품",
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'type' => 'CPU',
|
||||
],
|
||||
"TYPE" => [
|
||||
"CPU" => "CPU",
|
||||
"RAM" => "RAM",
|
||||
"DISK" => "DISK",
|
||||
],
|
||||
];
|
||||
@ -12,7 +12,7 @@ return [
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'type' => 'Windows',
|
||||
'status' => "use"
|
||||
'status' => 'default'
|
||||
],
|
||||
"TYPE" => [
|
||||
"Windows" => "Windows OS",
|
||||
@ -22,7 +22,7 @@ return [
|
||||
"App" => "어플리케이션",
|
||||
],
|
||||
"STATUS" => [
|
||||
"use" => "사용가능",
|
||||
'default' => "사용가능",
|
||||
"pause" => "일시정지",
|
||||
],
|
||||
];
|
||||
|
||||
@ -13,10 +13,10 @@ return [
|
||||
'created_at' => "작성일",
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'status' => "use"
|
||||
'status' => 'default'
|
||||
],
|
||||
"STATUS" => [
|
||||
"use" => "완료",
|
||||
'default' => "완료",
|
||||
"fail" => "실패",
|
||||
],
|
||||
];
|
||||
|
||||
@ -16,7 +16,7 @@ return [
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'role' => "manager",
|
||||
'status' => "use"
|
||||
'status' => 'default'
|
||||
],
|
||||
"ROLE" => [
|
||||
"manager" => "관리자",
|
||||
@ -26,7 +26,7 @@ return [
|
||||
"master" => "마스터",
|
||||
],
|
||||
"STATUS" => [
|
||||
"use" => "사용",
|
||||
'default' => "사용",
|
||||
"pause" => "사용정지",
|
||||
],
|
||||
];
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Customer;
|
||||
|
||||
use App\Entities\Customer\ServicePartEntity;
|
||||
|
||||
class ServicePartModel extends CustomerModel
|
||||
{
|
||||
const TABLE = "serviceinfos_partinfos";
|
||||
const PK = "uid";
|
||||
const TITLE = "uid";
|
||||
protected $table = self::TABLE;
|
||||
protected $primaryKey = self::PK;
|
||||
protected $returnType = ServicePartEntity::class;
|
||||
protected $allowedFields = [
|
||||
"serviceinfo_uid",
|
||||
"partinfo_uid",
|
||||
"billing_type",
|
||||
"amount",
|
||||
];
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
public function getFieldRule(string $action, string $field): string
|
||||
{
|
||||
if (is_array($field)) {
|
||||
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
|
||||
}
|
||||
switch ($field) {
|
||||
case "serviceinfo_uid":
|
||||
case "partinfo_uid":
|
||||
case "amount":
|
||||
$rule = "required|numeric";
|
||||
break;
|
||||
case "billing_type":
|
||||
$rule = "required|trim|string";
|
||||
break;
|
||||
default:
|
||||
$rule = parent::getFieldRule($action, $field);
|
||||
break;
|
||||
}
|
||||
return $rule;
|
||||
}
|
||||
}
|
||||
@ -1,45 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Customer;
|
||||
|
||||
use App\Entities\Customer\ServiceServerEntity;
|
||||
|
||||
class ServiceServerModel extends CustomerModel
|
||||
{
|
||||
const TABLE = "serviceinfos_partinfos";
|
||||
const PK = "uid";
|
||||
const TITLE = "uid";
|
||||
protected $table = self::TABLE;
|
||||
protected $primaryKey = self::PK;
|
||||
protected $returnType = ServiceServerEntity::class;
|
||||
protected $allowedFields = [
|
||||
"serviceinfo_uid",
|
||||
"partinfo_uid",
|
||||
"billing_type",
|
||||
"amount",
|
||||
];
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
public function getFieldRule(string $action, string $field): string
|
||||
{
|
||||
if (is_array($field)) {
|
||||
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
|
||||
}
|
||||
switch ($field) {
|
||||
case "serviceinfo_uid":
|
||||
case "partinfo_uid":
|
||||
case "amount":
|
||||
$rule = "required|numeric";
|
||||
break;
|
||||
case "billing_type":
|
||||
$rule = "required|trim|string";
|
||||
break;
|
||||
default:
|
||||
$rule = parent::getFieldRule($action, $field);
|
||||
break;
|
||||
}
|
||||
return $rule;
|
||||
}
|
||||
}
|
||||
@ -1,46 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Customer;
|
||||
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
use App\Entities\Customer\ServiceServerEntity;
|
||||
use App\Models\Customer\ServiceServerModel;
|
||||
|
||||
class ServiceServerService extends CustomerService
|
||||
{
|
||||
protected ?IncomingRequest $request = null;
|
||||
public function __construct(?IncomingRequest $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
}
|
||||
public function getClassName(): string
|
||||
{
|
||||
return parent::getClassName() . DIRECTORY_SEPARATOR . "ServiceServer";
|
||||
}
|
||||
public function getModelClass(): ServiceServerModel
|
||||
{
|
||||
return new ServiceServerModel();
|
||||
}
|
||||
public function getEntityClass(): ServiceServerEntity
|
||||
{
|
||||
return new ServiceServerEntity();
|
||||
}
|
||||
public function getFields(): array
|
||||
{
|
||||
return [
|
||||
"serviceinfo_uid",
|
||||
"partinfo_uid",
|
||||
"billing_type",
|
||||
"amount",
|
||||
];
|
||||
}
|
||||
public function getFilterFields(): array
|
||||
{
|
||||
return ["serviceinfo_uid", "type", "partinfo_uid"];
|
||||
}
|
||||
public function getBatchJobFields(): array
|
||||
{
|
||||
return ["type", "partinfo_uid"];
|
||||
}
|
||||
}
|
||||
@ -3,7 +3,6 @@
|
||||
namespace App\Services\Equipment\Link;
|
||||
|
||||
|
||||
use App\Entities\Equipment\ServerEntity;
|
||||
use App\Services\Equipment\EquipmentService;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user