27 lines
554 B
PHP
27 lines
554 B
PHP
<?php
|
|
|
|
namespace App\Entities;
|
|
|
|
use App\Entities\CommonEntity as Entity;
|
|
use App\Models\UserModel as Model;
|
|
|
|
class UserEntity extends CommonEntity
|
|
{
|
|
const PK = Model::PK;
|
|
const Title = Model::TITLE;
|
|
public function __toString(): string
|
|
{
|
|
return "{$this->getPK()}:{$this->getID()}:{$this->getTitle()},{$this->getRole()}}";
|
|
}
|
|
//공통부분
|
|
|
|
public function getID(): string
|
|
{
|
|
return $this->attributes['id'];
|
|
}
|
|
public function getRole(): string
|
|
{
|
|
return $this->attributes['role'];
|
|
}
|
|
}
|