28 lines
827 B
PHP
28 lines
827 B
PHP
<?php
|
|
|
|
namespace App\Entities\Cloudflare\API;
|
|
|
|
class RecordEntity 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['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";
|
|
}
|
|
}
|