<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use App\Models\{User, Appointment};

class AppointmentTechnicalRequest extends Model
{
    //
        protected $fillable = [
        'appointment_id',
        'requested_by',
        'assigned_to',
        'institution_id',
        'message',
        'status',
        'answer_message',
        'requester_message'
    ];

    public function appointment()
    {
        return $this->belongsTo(Appointment::class);
    }

    public function requestedBy()
    {
        return $this->belongsTo(User::class, 'requested_by');
    }

    public function assignedTo()
    {
        return $this->belongsTo(User::class, 'assigned_to');
    }
}
