mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
27 lines
528 B
PHP
Executable File
27 lines
528 B
PHP
Executable File
<?php
|
|
namespace App\Entities\Wiki;
|
|
|
|
use App\Models\Wiki\WikiSectionModel;
|
|
use CodeIgniter\Entity\Entity;
|
|
|
|
class WikiSectionRoleEntity extends Entity
|
|
{
|
|
protected $attributes = [
|
|
"wiki_section_id" => null,
|
|
"role" => null,
|
|
];
|
|
protected $casts = [
|
|
"wiki_section_id" => "int",
|
|
"role" => "string",
|
|
];
|
|
|
|
public function page(): ?WikiSectionEntity
|
|
{
|
|
$m = model(WikiSectionModel::class);
|
|
return $m->where('id',$this->attributes['section_id'])->first();
|
|
}
|
|
|
|
|
|
|
|
}
|