<?php

namespace App\Entities\Cloudflare\API;

class FirewallEntity 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['description'];
    }
    public function __toString()
    {
        return "uid:{$this->attributes['uid']}|zone_uid:{$this->attributes['zone_uid']}|host:{$this->attributes['description']}|content:{$this->attributes['action']}";
    }
    public function getParentField(): string
    {
        return "zone_uid";
    }
}
