26 lines
699 B
PHP
26 lines
699 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace RomhackPlaza\Master\Entity;
|
||
|
|
|
||
|
|
use XF\Mvc\Entity\Entity;
|
||
|
|
use XF\Mvc\Entity\Structure;
|
||
|
|
|
||
|
|
class News extends Entity
|
||
|
|
{
|
||
|
|
#[Override]
|
||
|
|
public static function getStructure(Structure $structure)
|
||
|
|
{
|
||
|
|
$structure->shortName = 'RomhackPlaza\Master:News';
|
||
|
|
$structure->table = 'xf_romhackplaza_news'; // Unused.
|
||
|
|
$structure->primaryKey = 'id';
|
||
|
|
|
||
|
|
$structure->columns = [
|
||
|
|
'id' => ['type' => self::UINT],
|
||
|
|
'user_id' => ['type' => self::UINT, 'required' => true],
|
||
|
|
'title' => ['type' => self::STR, 'required' => true],
|
||
|
|
'slug' => ['type' => self::STR, 'required' => true],
|
||
|
|
];
|
||
|
|
|
||
|
|
return $structure;
|
||
|
|
}
|
||
|
|
}
|