41 lines
873 B
PHP
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 ?? "";
|
|
}
|
|
}
|