<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class RequestAction extends Model
{
    protected $fillable = [
        'install_request_id',
        'user_id',
        'action',
        'note',
    ];

    public function request(): BelongsTo
    {
        return $this->belongsTo(InstallRequest::class, 'install_request_id');
    }

    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class);
    }
}
