<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class StatusHistory extends Model
{
    protected $table = 'status_histories';

    protected $fillable = [
        'service_request_id',
        'status',
        'changed_by',
        'comment',
    ];

    public function serviceRequest()
    {
        return $this->belongsTo(ServiceRequest::class);
    }

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