38 lines
841 B
PHP
38 lines
841 B
PHP
<?php
|
|
|
|
namespace App\Entities;
|
|
|
|
use App\Entities\CommonEntity;
|
|
use App\Models\UserSNSModel as Model;
|
|
|
|
class UserSNSEntity extends CommonEntity
|
|
{
|
|
const PK = Model::PK;
|
|
const Title = Model::TITLE;
|
|
public function __toString(): string
|
|
{
|
|
return "{$this->getPK()}|{$this->getID()}|{$this->getTitle()}";
|
|
}
|
|
public function setTitle(string $title): void
|
|
{
|
|
$this->attributes[Model::TITLE] = $title;
|
|
}
|
|
//Common Function
|
|
public function getParent(): int|null
|
|
{
|
|
return $this->attributes[Model::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'];
|
|
}
|
|
}
|