<?php

namespace App\Entities\Cloudflare;

use App\Models\Cloudflare\AuthModel;
use App\Entities\CommonEntity;

class AuthEntity extends CommonEntity
{
    public function __toString()
    {
        return "{$this->getPK()}|{$this->getTitle()}|{$this->getAuthKey()}|{$this->attributes['status']}";
    }
    public function getPK(): string
    {
        return $this->attributes[AuthModel::PK];
    }
    public function getTitle(): string
    {
        return $this->attributes[AuthModel::TITLE];
    }
    public function setTitle(string $title): void
    {
        $this->attributes[AuthModel::TITLE] = $title;
    }
    //Common Function
    public function getID(): string
    {
        return $this->attributes['id'];
    }
    public function getAuthKey(): string
    {
        return $this->attributes['authkey'];
    }
}
