<?php

namespace App\Entities\Cloudflare;

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

class AccountEntity extends CommonEntity
{
    public function __toString()
    {
        return "{$this->getPK()}|{$this->getTitle()}|{$this->attributes['type']}|{$this->attributes['status']}";
    }
    public function getPK(): string
    {
        return $this->attributes[AccountModel::PK];
    }
    public function getTitle(): string
    {
        return $this->attributes[AccountModel::TITLE];
    }
    public function setTitle(string $title): void
    {
        $this->attributes[AccountModel::TITLE] = $title;
    }
    //Common Function
    public function getParent(): string
    {
        return $this->attributes[AccountModel::PARENT];
    }
}
