dbmsv4/app/Entities/BoardEntity.php
2026-02-04 11:18:22 +09:00

41 lines
873 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 array $nullableFields = [
'user_uid',
'worker_uid',
];
protected $attributes = [
'user_uid' => null,
'worker_uid' => null,
'category' => '',
'title' => '',
'status' => '',
'content' => ''
];
public function __construct(array|null $data = null)
{
parent::__construct($data);
}
public function getUserUid(): int|null
{
return $this->user_uid ?? null;
}
public function getWorkerUid(): int|null
{
return $this->worker_uid ?? null;
}
public function getCaregory(): string
{
return $this->category ?? "";
}
}