<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class QuizLink extends Model
{
    use HasFactory, SoftDeletes;
    protected $table = 'quiz_links';

    protected $fillable = [
        'quiz_id', 'link'
    ];
    
    protected $casts = [
        'quiz_id' => 'integer',
    ];

    public function quiz()
    {
        return $this->belongsTo(Quiz::class)->withTrashed();
    }
}
