<?php

namespace App\Models;

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

class Log extends Model
{
    use HasFactory;

    protected $table = 'ms_log';
    protected $primaryKey = 'MsLogId';
    protected $fillable = ['module', 'task', 'user_id', 'ipaddress', 'useragent', 'note'];
    protected $guarded = ['created_at', 'updated_at'];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function user()
    {
        return $this->belongsTo('App\Models\User','id','user_id');
    }
}
