36 lines
1.3 KiB
PHP
36 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Services\Payment;
|
|
|
|
use App\Entities\Customer\ServiceEntity;
|
|
use App\Entities\Equipment\ServerPartEntity;
|
|
use App\Interfaces\Customer\ServiceInterface;
|
|
use App\Services\Customer\ServiceService;
|
|
|
|
class Service extends ServiceService implements ServiceInterface
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
//서버연결정보용 등록
|
|
//서비스정보용 등록
|
|
public function setService(string $action, ServiceEntity $serviceEntity, array $serviceDatas = []): ServiceEntity
|
|
{
|
|
$formDatas = [];
|
|
$formDatas['clientinfo_uid'] = $serviceEntity->getClientInfoUID();
|
|
$formDatas['serviceinfo_uid'] = $serviceEntity->getPK();
|
|
$formDatas['serverinfo_uid'] = $serviceEntity->getServerInfoUID();
|
|
$formDatas['title'] = $serviceEntity->getServerEntity()->getTitle();
|
|
$formDatas['amount'] = $serviceEntity->getAmount();
|
|
$formDatas['billing'] = PAYMENT['BILLING']['MONTH'];
|
|
$formDatas['billing_at'] = $serviceEntity->getBillingAt();
|
|
$this->create($formDatas);
|
|
return $serviceEntity;
|
|
}
|
|
public function setServiceAmount(ServerPartEntity $serverPartEntity, array $serverPartDatas): ServerPartEntity
|
|
{
|
|
return $serverPartEntity;
|
|
}
|
|
}
|