<?php

namespace Modules\SmartStorage\Entities;

use Illuminate\Database\Eloquent\Model;

class SsAccessLog extends Model
{
    protected $table = 'ss_access_logs';

    public $timestamps = false;

    protected $guarded = ['id'];

    protected $casts = [
        'granted'    => 'boolean',
        'created_at' => 'datetime',
    ];

    public function user()
    {
        return $this->belongsTo(\App\User::class, 'user_id');
    }

    public function file()
    {
        return $this->belongsTo(SsFile::class, 'file_id');
    }
}
