<?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";
    }
}
