<?php

namespace App\Models;

use App\Enums\CriteriumStatus;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Criterium extends Model
{
    protected $table = 'criteria';

    protected $fillable = [
        'overdrachtsplan_id',
        'beschrijving',
        'status',
        'verificatie',
    ];

    protected function casts(): array
    {
        return [
            'status' => CriteriumStatus::class,
        ];
    }

    public function overdrachtsplan(): BelongsTo
    {
        return $this->belongsTo(Overdrachtsplan::class);
    }
}
