dbmsv3 init...1

This commit is contained in:
choi.jh 2025-10-31 16:24:20 +09:00
parent 7a225df24d
commit 75ee436e08
16 changed files with 11 additions and 117 deletions

View File

@ -1,10 +0,0 @@
<?php
namespace App\Interfaces\Customer;
use App\Entities\Customer\ServiceEntity;
interface ServiceInterface
{
public function setAmount(ServiceEntity $entity, int $calculatedServerAmount): ServiceEntity;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -24,5 +24,6 @@ return [
"STATUS" => [
STATUS['DEPOSIT'] => "입금",
STATUS['WITHDRAWAL'] => "출금",
STATUS['PAID'] => "결제",
],
];

View File

@ -61,18 +61,17 @@ class AccountService extends CustomerService
'title' => "[결제차감] {$paymentEntity->getTitle()}",
'issue_at' => date('Y-m-d H:i:s'),
'amount' => $paymentEntity->getAmount(),
'status' => STATUS['WITHDRAWAL'],
'status' => STATUS['PAID'],
];
$this->setBalance($formDatas);
return $this->getModel()->create($formDatas)($formDatas);
return $this->getModel()->create($formDatas);
}
//기본 기능부분
//생성
protected function create_process(array $formDatas): AccountEntity
{
$this->setBalance($formDatas);
$entity = parent::create_process($formDatas)($formDatas);
return $entity;
return parent::create_process($formDatas);
}
//수정
public function modify(mixed $entity, array $formDatas): AccountEntity

View File

@ -4,7 +4,6 @@ namespace App\Services\Customer;
use App\Entities\Customer\ServiceEntity;
use App\Helpers\Customer\ServiceHelper;
use App\Interfaces\Customer\ServiceInterface;
use App\Models\Customer\ServiceModel;
use App\Processors\Customer\ServiceV1Processor as Proceessor;
use App\Services\Equipment\ServerService;
@ -12,7 +11,7 @@ use App\Services\PaymentService;
use DateTimeImmutable;
use DateTimeZone;
class ServiceService extends CustomerService implements ServiceInterface
class ServiceService extends CustomerService
{
private ?ServerService $_serverService = null;
private ?PaymentService $_paymentService = null;

View File

@ -6,7 +6,6 @@ use App\Entities\Equipment\ServerEntity;
use App\Entities\Equipment\ServerPartEntity;
use App\Entities\Part\PartEntity;
use App\Helpers\Equipment\ServerPartHelper;
use App\Interfaces\Equipment\ServerPartInterface;
use App\Models\Equipment\ServerPartModel;
use App\Processors\Equipment\ServerPartV1Processor as Proceessor;
use App\Services\Customer\ServiceService;
@ -21,7 +20,7 @@ use App\Services\Part\SOFTWAREService;
use App\Services\Part\SWITCHService;
use App\Services\PaymentService;
class ServerPartService extends EquipmentService implements ServerPartInterface
class ServerPartService extends EquipmentService
{
private ?ServiceService $_serviceService = null;
private ?ServerService $_serverService = null;

View File

@ -5,7 +5,6 @@ namespace App\Services\Equipment;
use App\Entities\Customer\ServiceEntity;
use App\Entities\Equipment\ServerEntity;
use App\Helpers\Equipment\ServerHelper;
use App\Interfaces\Equipment\ServerInterface;
use App\Models\Equipment\ServerModel;
use App\Services\Customer\ServiceService;
use App\Services\Equipment\EquipmentService;
@ -14,7 +13,7 @@ use App\Services\Part\IPService;
use App\Services\Part\SWITCHService;
use App\Processors\Equipment\ServerV1Processor as Proceessor;
class ServerService extends EquipmentService implements ServerInterface
class ServerService extends EquipmentService
{
private ?ServiceService $_serviceService = null;
private ?ServerPartService $_serverPartService = null;

View File

@ -7,14 +7,13 @@ use App\Entities\Equipment\ServerEntity;
use App\Entities\Equipment\ServerPartEntity;
use App\Entities\Part\IPEntity;
use App\Helpers\Part\IPHelper;
use App\Interfaces\Part\IPInterface;
use App\Models\Part\IPModel;
use App\Services\Customer\ServiceService;
use App\Services\Equipment\LineService;
use App\Services\Equipment\ServerService;
use App\Services\Part\PartService;
class IPService extends PartService implements IPInterface
class IPService extends PartService
{
private ?LineService $_lineService = null;
private ?ServiceService $_serviceService = null;

View File

@ -4,11 +4,10 @@ namespace App\Services\Part;
use App\Entities\Equipment\ServerPartEntity;
use App\Helpers\CommonHelper;
use App\Interfaces\Part\PartInterface;
use App\Models\CommonModel;
use App\Services\CommonService;
abstract class PartService extends CommonService implements PartInterface
abstract class PartService extends CommonService
{
protected function __construct(CommonModel $model, CommonHelper $helper)
{

View File

@ -6,13 +6,12 @@ use App\Entities\Equipment\ServerEntity;
use App\Entities\Equipment\ServerPartEntity;
use App\Entities\Part\SWITCHEntity;
use App\Helpers\Part\SWITCHHelper;
use App\Interfaces\Part\SWITCHInterface;
use App\Models\Part\SWITCHModel;
use App\Services\Customer\ServiceService;
use App\Services\Equipment\ServerService;
use App\Services\Part\PartService;
class SWITCHService extends PartService implements SWITCHInterface
class SWITCHService extends PartService
{
private ?ServiceService $_serviceService = null;
private ?ServerService $_serverService = null;

View File

@ -8,7 +8,6 @@ use App\Entities\Equipment\ServerEntity;
use App\Entities\Equipment\ServerPartEntity;
use App\Entities\PaymentEntity;
use App\Helpers\PaymentHelper;
use App\Interfaces\PaymentInterface;
use App\Models\PaymentModel;
use App\Services\CommonService;
use App\Services\Customer\AccountService;
@ -18,7 +17,7 @@ use App\Services\Equipment\ServerService;
use DateTimeImmutable;
use DateTimeZone;
class PaymentService extends CommonService implements PaymentInterface
class PaymentService extends CommonService
{
private ?ServiceService $_serviceService = null;
private ?ServerService $_serverService = null;