cfmgrv3/app/Entities/Cloudflare/RecordEntity.php
2023-06-19 13:06:49 +09:00

30 lines
877 B
PHP

<?php
namespace App\Entities\Cloudflare;
use App\Entities\Cloudflare\CloudflareEntity;
class RecordEntity extends CloudflareEntity
{
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['host']}-{$this->attributes['content']}";
}
public function __toString()
{
return "uid:{$this->attributes['uid']}|zone_uid:{$this->attributes['zone_uid']}|host:{$this->attributes['host']}|content:{$this->attributes['content']}|proxied:{$this->attributes['proxied']}|fixed:{$this->attributes['fixed']}|locked:{$this->attributes['locked']}";
}
public function getParentField(): string
{
return "zone_uid";
}
}