dbmsv4/app/Entities/BoardEntity.php
2025-12-19 10:03:03 +09:00

35 lines
786 B
PHP

<?php
namespace App\Entities;
use App\Entities\CommonEntity;
use App\Models\BoardModel as Model;
class BoardEntity extends CommonEntity
{
const PK = Model::PK;
const TITLE = Model::TITLE;
protected $attributes = [
'category' => '',
'title' => '',
'status' => '',
'content' => ''
];
public function __construct(array|null $data = null)
{
parent::__construct($data);
}
final public function getUserUid(): int|null
{
return $this->attributes['user_uid'] ?? null;
}
final public function getWorkerUid(): int|null
{
return $this->attributes['worker_uid'] ?? null;
}
final public function getCaregory(): string
{
return $this->attributes['category'] ?? "";
}
}