Files
portal-api/modules/DomainFluctuation/App/Http/Resources/DomainFluctuationResource.php
2026-07-01 10:51:05 +07:00

50 lines
1.9 KiB
PHP

<?php
namespace Modules\DomainFluctuation\App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class DomainFluctuationResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'id' => $this->id,
'domainName' => $this->domainName,
'term_id' => $this->term_id,
'term' => DomainFluctuationTermResource::make($this->whenLoaded('term')),
'registeredDate' => $this->registeredDate,
'expiredDate' => $this->expiredDate,
'ownerName' => $this->ownerName,
'ownerType' => $this->ownerType,
'address' => $this->address,
'wardName' => $this->wardName,
'districtName' => $this->districtName,
'cityName' => $this->cityName,
'cityCode' => $this->cityCode,
'countryCode' => $this->countryCode,
'phone' => $this->phone,
'email' => $this->email,
'fax' => $this->fax,
'adminName' => $this->adminName,
'businessCode' => $this->businessCode,
'eidCode' => $this->eidCode,
'personalId' => $this->personalId,
'birthDate' => $this->birthDate,
'icannRegistrarName' => $this->icannRegistrarName,
'icannRegistrarTradeName' => $this->icannRegistrarTradeName,
'isAgentManager' => (bool) $this->isAgentManager,
'action' => $this->action,
'actionReason' => $this->actionReason,
'actionSource' => $this->actionSource,
'actionDate' => $this->actionDate,
'note' => $this->note,
'ianaNumber' => $this->ianaNumber,
'status' => (int) $this->status,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
];
}
}