- Add explicit $table property to all Eloquent models with Dutch names - Fix pivot table names in belongsToMany relationships - Fix seeder: use valid enum values for afhankelijkheden status Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
43 lines
846 B
PHP
43 lines
846 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Enums\Prioriteit;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class Thema extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'themas';
|
|
|
|
protected $fillable = [
|
|
'naam',
|
|
'beschrijving',
|
|
'prioriteit',
|
|
'periode_start',
|
|
'periode_eind',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'prioriteit' => Prioriteit::class,
|
|
'periode_start' => 'date',
|
|
'periode_eind' => 'date',
|
|
];
|
|
}
|
|
|
|
public function speerpunten(): HasMany
|
|
{
|
|
return $this->hasMany(Speerpunt::class);
|
|
}
|
|
|
|
public function roadmapItems(): HasMany
|
|
{
|
|
return $this->hasMany(RoadmapItem::class);
|
|
}
|
|
}
|