cfmgrv3/app/Entities/Cloudflare/API/ZoneEntity.php
2023-06-19 16:38:30 +09:00

28 lines
761 B
PHP

<?php
namespace App\Entities\Cloudflare\API;
class ZoneEntity extends APIEntity
{
protected $datamap = [];
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
protected $casts = [];
public function getPrimaryKey()
{
return $this->attributes['uid'];
}
public function getTitle()
{
return $this->attributes['domain'];
}
public function __toString()
{
return "uid:{$this->attributes['uid']}|account_uid:{$this->attributes['account_uid']}|domain:{$this->attributes['domain']}|{$this->attributes['development_mode']}|{$this->attributes['ipv6']}|{$this->attributes['security_level']}";
}
public function getParentField(): string
{
return "account_uid";
}
}