mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-24 06:54:02 +00:00
31 lines
1.1 KiB
PHP
31 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Companies\Services;
|
|
|
|
use App\Classes\General\Eloquent\AbstractUpdateRecord;
|
|
use App\Classes\Modules\Companies\DataTransferObjects\CompanyInfoObject;
|
|
use App\Models\CompanyInfo;
|
|
|
|
class CreatesCompanyInfo extends AbstractUpdateRecord
|
|
{
|
|
|
|
/**
|
|
* @param CompanyInfoObject $object
|
|
* @return \Illuminate\Database\Eloquent\Model
|
|
* @throws \App\Classes\Exceptions\MalformedRequestException
|
|
*/
|
|
public function execute(CompanyInfoObject $object)
|
|
{
|
|
$model = new CompanyInfo();
|
|
$model->company_id = $object->getCompany()->id;
|
|
$model->unified_social_credit_identifier = $object->getUnifiedSocialCreditIdentifier();
|
|
$model->business_registration_number = $object->getBusinessRegistrationNumber();
|
|
$model->type = $object->getType();
|
|
$model->legal_representative = $object->getLegalRepresentative();
|
|
$model->last_year_of_inspection = $object->getLastYearInspection();
|
|
$model->date_of_establishment = $object->getDateOfEstablishment();
|
|
$model->operation_period = $object->getOperationPeriod();
|
|
|
|
return $this->handler($model);
|
|
}
|
|
} |