44 lines
880 B
PHP
44 lines
880 B
PHP
<?php
|
|
|
|
namespace App\Entities\Mangboard;
|
|
|
|
use CodeIgniter\Entity\Entity;
|
|
|
|
class UserEntity extends MangboardEntity
|
|
{
|
|
public function __toString()
|
|
{
|
|
return "{$this->getPK()}:{$this->getID()}:{$this->getName()}";
|
|
}
|
|
public function getPK()
|
|
{
|
|
return $this->attributes['pid'];
|
|
}
|
|
public function getName()
|
|
{
|
|
return $this->attributes['user_name'];
|
|
}
|
|
public function getID()
|
|
{
|
|
return $this->attributes['user_id'];
|
|
}
|
|
public function getPoint()
|
|
{
|
|
return $this->attributes['user_point'];
|
|
}
|
|
public function setPoint(int $point)
|
|
{
|
|
|
|
$this->attributes['user_point'] = $point;
|
|
}
|
|
|
|
public function getLevel()
|
|
{
|
|
return $this->attributes['user_level'];
|
|
}
|
|
public function setLevel(int $level)
|
|
{
|
|
$this->attributes['user_level'] = $level;
|
|
}
|
|
}
|