Automation/app/Entities/Mangboard/UserEntity.php
2024-09-08 15:24:55 +09:00

50 lines
1.1 KiB
PHP

<?php
namespace App\Entities\Mangboard;
use App\Entities\CommonEntity;
class UserEntity extends CommonEntity
{
public function __toString(): string
{
return "{$this->getPK()}:{$this->getID()}:{$this->getTitle()},{$this->getLevel()}/{$this->getPoint()}";
}
public function getTitle(): string
{
return $this->attributes['user_name'];
}
public function setTitle(string $title): void
{
$this->attributes['user_name'] = $title;
}
//Common Function
public function getPK(): int
{
return $this->attributes['pid'];
}
public function getID(): string
{
return $this->attributes['user_id'];
}
public function getPoint(): int
{
return $this->attributes['user_point'];
}
public function setPoint(int $point): void
{
$this->attributes['user_point'] = $point;
}
public function getLevel(): int
{
return $this->attributes['user_level'];
}
public function setLevel(int $value): void
{
$this->attributes['user_level'] = $value;
}
}