<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Database\Eloquent\SoftDeletes;

class Question extends Model
{
    use SoftDeletes;

    protected $table = 'questions';

    protected $fillable = [
        'question',
        'type',
        'options'
    ];

    protected $dates = ['deleted_at'];

    public function getAnswer(): BelongsTo
    {
        return $this->belongsTo(PatientAnswer::class, 'appointment_id');
    }
}
