<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\MorphTo;
use Swindon\FilamentHashids\Traits\HasHashid;

class RejectionReason extends Model
{
    use HasFactory, HasHashid;

    protected $guarded = ['id'];

    protected function casts(): array
    {
        return [
            'rejectable_id' => 'integer',
        ];
    }

    public function rejectable(): MorphTo
    {
        return $this->morphTo();
    }
}
