dbms/app/Entities/UserSNSEntity.php
2025-04-28 19:06:09 +09:00

44 lines
991 B
PHP

<?php
namespace App\Entities;
use App\Entities\CommonEntity;
use App\Models\UserSNSModel;
class UserSNSEntity extends CommonEntity
{
public function __toString(): string
{
return "{$this->getPK()}|{$this->getID()}|{$this->getTitle()}";
}
public function getPK(): int
{
return $this->attributes[UserSNSModel::PK];
}
public function getTitle(): string
{
return $this->attributes[UserSNSModel::TITLE];
}
public function setTitle(string $title): void
{
$this->attributes[UserSNSModel::TITLE] = $title;
}
//Common Function
public function getParent(): int|null
{
return $this->attributes[UserSNSModel::PARENT];
}
public function getID(): string
{
return $this->attributes['id'];
}
public function getSite(): string
{
return $this->attributes['site'];
}
public function getEmail(): string
{
return $this->attributes['email'];
}
}