<?php

namespace App\Models;

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

class UserLog extends Model
{
    use HasFactory;

    /**
     * Mass assignable attributes
     */
    protected $fillable = [
        'user_id',
        'action',
        'comment',
    ];

    /**
     * Relationship: User who performed the action
     */
    public function user()
    {
        return $this->belongsTo('App\Models\User', 'user_id');
    }
}
