13 lines
529 B
PHP
13 lines
529 B
PHP
<?php
|
|
namespace Modules\Content\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
final class ContentType extends Model
|
|
{
|
|
protected $fillable = ['name','key','description','schema','renderer','allowed_regions','is_system','is_active'];
|
|
protected function casts(): array { return ['schema'=>'array','allowed_regions'=>'array','is_system'=>'boolean','is_active'=>'boolean']; }
|
|
public function documents(): HasMany { return $this->hasMany(ContentDocument::class); }
|
|
}
|