Automation/app/Entities/Mangboard/UserEntity.php
2024-08-23 19:48:19 +09:00

46 lines
890 B
PHP

<?php
namespace App\Entities\Mangboard;
use CodeIgniter\Entity\Entity;
class UserEntity extends Entity
{
protected $datamap = [];
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
protected $casts = [];
public function __toString()
{
return "{$this->getName()}";
}
public function getUserID()
{
return $this->attributes['user_id'];
}
public function getName()
{
return $this->attributes['user_name'];
}
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;
}
}