2023-06-15 12:36:36 +03:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
namespace openvk\Web\Models\Entities;
|
|
|
|
use openvk\Web\Models\RowModel;
|
|
|
|
use openvk\Web\Util\DateTime;
|
|
|
|
use openvk\Web\Models\Entities\{User, Manager};
|
|
|
|
use openvk\Web\Models\Repositories\{Users, Clubs};
|
|
|
|
|
|
|
|
class BlacklistItem extends RowModel
|
|
|
|
{
|
|
|
|
protected $tableName = "blacklists";
|
|
|
|
|
|
|
|
function getId(): int
|
|
|
|
{
|
|
|
|
return $this->getRecord()->index;
|
|
|
|
}
|
|
|
|
|
|
|
|
function getAuthor(): ?User
|
|
|
|
{
|
|
|
|
return (new Users)->get($this->getRecord()->author);
|
|
|
|
}
|
|
|
|
|
|
|
|
function getTarget(): ?User
|
|
|
|
{
|
|
|
|
return (new Users)->get($this->getRecord()->target);
|
|
|
|
}
|
|
|
|
|
|
|
|
function getCreationDate(): DateTime
|
|
|
|
{
|
|
|
|
return new DateTime($this->getRecord()->created);
|
|
|
|
}
|
2023-07-20 02:35:09 +03:00
|
|
|
|
|
|
|
|
2023-06-15 12:36:36 +03:00
|
|
|
}
|