mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
feat wiki/ayuda section
This commit is contained in:
28
ci4/app/Entities/Wiki/WikiSectionRoleEntity.php
Normal file
28
ci4/app/Entities/Wiki/WikiSectionRoleEntity.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
namespace App\Entities\Wiki;
|
||||
|
||||
use App\Models\Wiki\WikiContentModel;
|
||||
use App\Models\Wiki\WikiPageModel;
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user