<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Question extends Model
{
    protected $fillable = [
        'section_id',
        'question_text',
        'type',
        'allow_other_option',
        'order',
    ];

    protected $casts = [
        'lain_lain' => 'boolean',
    ];

    public function section()
    {
        return $this->belongsTo(Section::class);
    }
    public function options()
    {
        return $this->hasMany(Option::class);
    }
    public function answers()
    {
        return $this->hasMany(Answer::class);
    }
}
