dbmsv3 init...1
This commit is contained in:
parent
7a225df24d
commit
75ee436e08
@ -1,10 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Interfaces\Customer;
|
|
||||||
|
|
||||||
use App\Entities\Customer\ServiceEntity;
|
|
||||||
|
|
||||||
interface ServiceInterface
|
|
||||||
{
|
|
||||||
public function setAmount(ServiceEntity $entity, int $calculatedServerAmount): ServiceEntity;
|
|
||||||
}
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Interfaces\Equipment;
|
|
||||||
|
|
||||||
use App\Entities\Customer\ServiceEntity;
|
|
||||||
use App\Entities\Equipment\ServerEntity;
|
|
||||||
|
|
||||||
interface ServerInterface
|
|
||||||
{
|
|
||||||
public function attachToService(ServiceEntity $serviceEntity, $serverinfo_uid, array $formDatas = []): ServerEntity;
|
|
||||||
public function detachFromService($serverinfo_uid): ServerEntity;
|
|
||||||
public function setAmount(ServerEntity $entity): ServerEntity;
|
|
||||||
}
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Interfaces\Equipment;
|
|
||||||
|
|
||||||
use App\Entities\Equipment\ServerEntity;
|
|
||||||
use App\Entities\Equipment\ServerPartEntity;
|
|
||||||
|
|
||||||
interface ServerPartInterface
|
|
||||||
{
|
|
||||||
public function attachToServer(ServerEntity $serverEntity, array $formDatas = []): void;
|
|
||||||
public function detachFromServer(ServerEntity $serverEntity): void;
|
|
||||||
public function setAmount(ServerPartEntity $entity, string $callBack): ServerPartEntity;
|
|
||||||
}
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Interfaces\Part;
|
|
||||||
|
|
||||||
use App\Entities\Equipment\LineEntity;
|
|
||||||
use App\Entities\Equipment\ServerEntity;
|
|
||||||
use App\Entities\Equipment\ServerPartEntity;
|
|
||||||
use App\Entities\Part\IPEntity;
|
|
||||||
|
|
||||||
interface IPInterface
|
|
||||||
{
|
|
||||||
//회선관련 작업
|
|
||||||
public function attachToLine(LineEntity $lineEntity, string $ip): IPEntity;
|
|
||||||
//서버관련 작업
|
|
||||||
public function attachToServer(ServerEntity $serverEntity, array $formDatas = []): IPEntity;
|
|
||||||
public function detachFromServer(ServerEntity $serverEntity): IPEntity;
|
|
||||||
//서버파트관련 작업
|
|
||||||
public function attachToServerPart(ServerPartEntity $serverPartEntity): IPEntity;
|
|
||||||
public function detachFromServerPart(ServerPartEntity $serverPartEntity): IPEntity;
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Interfaces\Part;
|
|
||||||
|
|
||||||
use App\Entities\Equipment\ServerPartEntity;
|
|
||||||
|
|
||||||
interface PartInterface
|
|
||||||
{
|
|
||||||
public function attachToServerPart(ServerPartEntity $serverPartEntity): mixed;
|
|
||||||
public function detachFromServerPart(ServerPartEntity $serverPartEntity): mixed;
|
|
||||||
}
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Interfaces\Part;
|
|
||||||
|
|
||||||
use App\Entities\Equipment\ServerEntity;
|
|
||||||
use App\Entities\Part\SWITCHEntity;
|
|
||||||
|
|
||||||
interface SWITCHInterface
|
|
||||||
{
|
|
||||||
public function attachToServer(ServerEntity $serverEntity, array $formDatas = []): SWITCHEntity;
|
|
||||||
public function detachFromServer(ServerEntity $serverEntity): SWITCHEntity;
|
|
||||||
}
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Interfaces;
|
|
||||||
|
|
||||||
use App\Entities\Customer\ServiceEntity;
|
|
||||||
use App\Entities\Equipment\ServerPartEntity;
|
|
||||||
use App\Entities\PaymentEntity;
|
|
||||||
|
|
||||||
interface PaymentInterface
|
|
||||||
{
|
|
||||||
//서비스 결제(월과금 서비스 사용)
|
|
||||||
public function createForService(ServiceEntity $serviceEntity, int $amount): PaymentEntity;
|
|
||||||
public function updateForService(ServiceEntity $serviceEntity, int $amount): PaymentEntity;
|
|
||||||
public function unlinkFromService(ServiceEntity $serviceEntity): PaymentEntity;
|
|
||||||
|
|
||||||
//서버 파트 결제(파트/기타 일회성 서비스 사용)
|
|
||||||
public function createForServerPart(ServerPartEntity $serverPartEntity): PaymentEntity;
|
|
||||||
public function updateForServerPart(ServerPartEntity $serverPartEntity): PaymentEntity;
|
|
||||||
public function unlinkFromServerPart(ServerPartEntity $serverPartEntity): PaymentEntity;
|
|
||||||
}
|
|
||||||
@ -24,5 +24,6 @@ return [
|
|||||||
"STATUS" => [
|
"STATUS" => [
|
||||||
STATUS['DEPOSIT'] => "입금",
|
STATUS['DEPOSIT'] => "입금",
|
||||||
STATUS['WITHDRAWAL'] => "출금",
|
STATUS['WITHDRAWAL'] => "출금",
|
||||||
|
STATUS['PAID'] => "결제",
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -61,18 +61,17 @@ class AccountService extends CustomerService
|
|||||||
'title' => "[결제차감] {$paymentEntity->getTitle()}",
|
'title' => "[결제차감] {$paymentEntity->getTitle()}",
|
||||||
'issue_at' => date('Y-m-d H:i:s'),
|
'issue_at' => date('Y-m-d H:i:s'),
|
||||||
'amount' => $paymentEntity->getAmount(),
|
'amount' => $paymentEntity->getAmount(),
|
||||||
'status' => STATUS['WITHDRAWAL'],
|
'status' => STATUS['PAID'],
|
||||||
];
|
];
|
||||||
$this->setBalance($formDatas);
|
$this->setBalance($formDatas);
|
||||||
return $this->getModel()->create($formDatas)($formDatas);
|
return $this->getModel()->create($formDatas);
|
||||||
}
|
}
|
||||||
//기본 기능부분
|
//기본 기능부분
|
||||||
//생성
|
//생성
|
||||||
protected function create_process(array $formDatas): AccountEntity
|
protected function create_process(array $formDatas): AccountEntity
|
||||||
{
|
{
|
||||||
$this->setBalance($formDatas);
|
$this->setBalance($formDatas);
|
||||||
$entity = parent::create_process($formDatas)($formDatas);
|
return parent::create_process($formDatas);
|
||||||
return $entity;
|
|
||||||
}
|
}
|
||||||
//수정
|
//수정
|
||||||
public function modify(mixed $entity, array $formDatas): AccountEntity
|
public function modify(mixed $entity, array $formDatas): AccountEntity
|
||||||
|
|||||||
@ -4,7 +4,6 @@ namespace App\Services\Customer;
|
|||||||
|
|
||||||
use App\Entities\Customer\ServiceEntity;
|
use App\Entities\Customer\ServiceEntity;
|
||||||
use App\Helpers\Customer\ServiceHelper;
|
use App\Helpers\Customer\ServiceHelper;
|
||||||
use App\Interfaces\Customer\ServiceInterface;
|
|
||||||
use App\Models\Customer\ServiceModel;
|
use App\Models\Customer\ServiceModel;
|
||||||
use App\Processors\Customer\ServiceV1Processor as Proceessor;
|
use App\Processors\Customer\ServiceV1Processor as Proceessor;
|
||||||
use App\Services\Equipment\ServerService;
|
use App\Services\Equipment\ServerService;
|
||||||
@ -12,7 +11,7 @@ use App\Services\PaymentService;
|
|||||||
use DateTimeImmutable;
|
use DateTimeImmutable;
|
||||||
use DateTimeZone;
|
use DateTimeZone;
|
||||||
|
|
||||||
class ServiceService extends CustomerService implements ServiceInterface
|
class ServiceService extends CustomerService
|
||||||
{
|
{
|
||||||
private ?ServerService $_serverService = null;
|
private ?ServerService $_serverService = null;
|
||||||
private ?PaymentService $_paymentService = null;
|
private ?PaymentService $_paymentService = null;
|
||||||
|
|||||||
@ -6,7 +6,6 @@ use App\Entities\Equipment\ServerEntity;
|
|||||||
use App\Entities\Equipment\ServerPartEntity;
|
use App\Entities\Equipment\ServerPartEntity;
|
||||||
use App\Entities\Part\PartEntity;
|
use App\Entities\Part\PartEntity;
|
||||||
use App\Helpers\Equipment\ServerPartHelper;
|
use App\Helpers\Equipment\ServerPartHelper;
|
||||||
use App\Interfaces\Equipment\ServerPartInterface;
|
|
||||||
use App\Models\Equipment\ServerPartModel;
|
use App\Models\Equipment\ServerPartModel;
|
||||||
use App\Processors\Equipment\ServerPartV1Processor as Proceessor;
|
use App\Processors\Equipment\ServerPartV1Processor as Proceessor;
|
||||||
use App\Services\Customer\ServiceService;
|
use App\Services\Customer\ServiceService;
|
||||||
@ -21,7 +20,7 @@ use App\Services\Part\SOFTWAREService;
|
|||||||
use App\Services\Part\SWITCHService;
|
use App\Services\Part\SWITCHService;
|
||||||
use App\Services\PaymentService;
|
use App\Services\PaymentService;
|
||||||
|
|
||||||
class ServerPartService extends EquipmentService implements ServerPartInterface
|
class ServerPartService extends EquipmentService
|
||||||
{
|
{
|
||||||
private ?ServiceService $_serviceService = null;
|
private ?ServiceService $_serviceService = null;
|
||||||
private ?ServerService $_serverService = null;
|
private ?ServerService $_serverService = null;
|
||||||
|
|||||||
@ -5,7 +5,6 @@ namespace App\Services\Equipment;
|
|||||||
use App\Entities\Customer\ServiceEntity;
|
use App\Entities\Customer\ServiceEntity;
|
||||||
use App\Entities\Equipment\ServerEntity;
|
use App\Entities\Equipment\ServerEntity;
|
||||||
use App\Helpers\Equipment\ServerHelper;
|
use App\Helpers\Equipment\ServerHelper;
|
||||||
use App\Interfaces\Equipment\ServerInterface;
|
|
||||||
use App\Models\Equipment\ServerModel;
|
use App\Models\Equipment\ServerModel;
|
||||||
use App\Services\Customer\ServiceService;
|
use App\Services\Customer\ServiceService;
|
||||||
use App\Services\Equipment\EquipmentService;
|
use App\Services\Equipment\EquipmentService;
|
||||||
@ -14,7 +13,7 @@ use App\Services\Part\IPService;
|
|||||||
use App\Services\Part\SWITCHService;
|
use App\Services\Part\SWITCHService;
|
||||||
use App\Processors\Equipment\ServerV1Processor as Proceessor;
|
use App\Processors\Equipment\ServerV1Processor as Proceessor;
|
||||||
|
|
||||||
class ServerService extends EquipmentService implements ServerInterface
|
class ServerService extends EquipmentService
|
||||||
{
|
{
|
||||||
private ?ServiceService $_serviceService = null;
|
private ?ServiceService $_serviceService = null;
|
||||||
private ?ServerPartService $_serverPartService = null;
|
private ?ServerPartService $_serverPartService = null;
|
||||||
|
|||||||
@ -7,14 +7,13 @@ use App\Entities\Equipment\ServerEntity;
|
|||||||
use App\Entities\Equipment\ServerPartEntity;
|
use App\Entities\Equipment\ServerPartEntity;
|
||||||
use App\Entities\Part\IPEntity;
|
use App\Entities\Part\IPEntity;
|
||||||
use App\Helpers\Part\IPHelper;
|
use App\Helpers\Part\IPHelper;
|
||||||
use App\Interfaces\Part\IPInterface;
|
|
||||||
use App\Models\Part\IPModel;
|
use App\Models\Part\IPModel;
|
||||||
use App\Services\Customer\ServiceService;
|
use App\Services\Customer\ServiceService;
|
||||||
use App\Services\Equipment\LineService;
|
use App\Services\Equipment\LineService;
|
||||||
use App\Services\Equipment\ServerService;
|
use App\Services\Equipment\ServerService;
|
||||||
use App\Services\Part\PartService;
|
use App\Services\Part\PartService;
|
||||||
|
|
||||||
class IPService extends PartService implements IPInterface
|
class IPService extends PartService
|
||||||
{
|
{
|
||||||
private ?LineService $_lineService = null;
|
private ?LineService $_lineService = null;
|
||||||
private ?ServiceService $_serviceService = null;
|
private ?ServiceService $_serviceService = null;
|
||||||
|
|||||||
@ -4,11 +4,10 @@ namespace App\Services\Part;
|
|||||||
|
|
||||||
use App\Entities\Equipment\ServerPartEntity;
|
use App\Entities\Equipment\ServerPartEntity;
|
||||||
use App\Helpers\CommonHelper;
|
use App\Helpers\CommonHelper;
|
||||||
use App\Interfaces\Part\PartInterface;
|
|
||||||
use App\Models\CommonModel;
|
use App\Models\CommonModel;
|
||||||
use App\Services\CommonService;
|
use App\Services\CommonService;
|
||||||
|
|
||||||
abstract class PartService extends CommonService implements PartInterface
|
abstract class PartService extends CommonService
|
||||||
{
|
{
|
||||||
protected function __construct(CommonModel $model, CommonHelper $helper)
|
protected function __construct(CommonModel $model, CommonHelper $helper)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,13 +6,12 @@ use App\Entities\Equipment\ServerEntity;
|
|||||||
use App\Entities\Equipment\ServerPartEntity;
|
use App\Entities\Equipment\ServerPartEntity;
|
||||||
use App\Entities\Part\SWITCHEntity;
|
use App\Entities\Part\SWITCHEntity;
|
||||||
use App\Helpers\Part\SWITCHHelper;
|
use App\Helpers\Part\SWITCHHelper;
|
||||||
use App\Interfaces\Part\SWITCHInterface;
|
|
||||||
use App\Models\Part\SWITCHModel;
|
use App\Models\Part\SWITCHModel;
|
||||||
use App\Services\Customer\ServiceService;
|
use App\Services\Customer\ServiceService;
|
||||||
use App\Services\Equipment\ServerService;
|
use App\Services\Equipment\ServerService;
|
||||||
use App\Services\Part\PartService;
|
use App\Services\Part\PartService;
|
||||||
|
|
||||||
class SWITCHService extends PartService implements SWITCHInterface
|
class SWITCHService extends PartService
|
||||||
{
|
{
|
||||||
private ?ServiceService $_serviceService = null;
|
private ?ServiceService $_serviceService = null;
|
||||||
private ?ServerService $_serverService = null;
|
private ?ServerService $_serverService = null;
|
||||||
|
|||||||
@ -8,7 +8,6 @@ use App\Entities\Equipment\ServerEntity;
|
|||||||
use App\Entities\Equipment\ServerPartEntity;
|
use App\Entities\Equipment\ServerPartEntity;
|
||||||
use App\Entities\PaymentEntity;
|
use App\Entities\PaymentEntity;
|
||||||
use App\Helpers\PaymentHelper;
|
use App\Helpers\PaymentHelper;
|
||||||
use App\Interfaces\PaymentInterface;
|
|
||||||
use App\Models\PaymentModel;
|
use App\Models\PaymentModel;
|
||||||
use App\Services\CommonService;
|
use App\Services\CommonService;
|
||||||
use App\Services\Customer\AccountService;
|
use App\Services\Customer\AccountService;
|
||||||
@ -18,7 +17,7 @@ use App\Services\Equipment\ServerService;
|
|||||||
use DateTimeImmutable;
|
use DateTimeImmutable;
|
||||||
use DateTimeZone;
|
use DateTimeZone;
|
||||||
|
|
||||||
class PaymentService extends CommonService implements PaymentInterface
|
class PaymentService extends CommonService
|
||||||
{
|
{
|
||||||
private ?ServiceService $_serviceService = null;
|
private ?ServiceService $_serviceService = null;
|
||||||
private ?ServerService $_serverService = null;
|
private ?ServerService $_serverService = null;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user