Automation/app/Entities/Mangboard/BoardEntity.php
2024-09-13 21:56:17 +09:00

44 lines
977 B
PHP

<?php
namespace App\Entities\Mangboard;
use App\Entities\CommonEntity;
class BoardEntity extends CommonEntity
{
public function __toString(): string
{
return "{$this->getPK()}|{$this->getTitle()}";
}
public function getTitle(): string
{
return $this->attributes['title'];
}
public function setTitle(string $title): void
{
$this->attributes['title'] = $title;
}
//Common Function
public function getPK(): int
{
return $this->attributes['pid'];
}
public function getImagePath(): string
{
return $this->attributes['image_path'];
}
public function setImagePath(string $image_path): void
{
$this->attributes['image_path'] = $image_path;
}
public function getContent(): string
{
return $this->attributes['content'];
}
public function setContent(string $content): void
{
$this->attributes['content'] = $content;
}
}