30 lines
687 B
PHP
30 lines
687 B
PHP
<?php
|
|
|
|
namespace App\Entities\Mangboard;
|
|
|
|
use App\Entities\MyStorage\FileEntity as MyStorageEntity;
|
|
|
|
class FileEntity extends MyStorageEntity
|
|
{
|
|
public function __toString(): string
|
|
{
|
|
return "{$this->getPK()}|{$this->getTitle()}|{$this->getSequence()}번째";
|
|
}
|
|
//Common Function
|
|
|
|
public function getPK(): int
|
|
{
|
|
return $this->attributes['pid'];
|
|
}
|
|
|
|
//한게시물에 여러개가 있을경우 번호
|
|
final public function getSequence(): int
|
|
{
|
|
return $this->attributes['file_sequence'];
|
|
}
|
|
public function setSequence(int $file_sequence): void
|
|
{
|
|
$this->attributes['file_sequence'] = $file_sequence;
|
|
}
|
|
}
|