13 lines
530 B
PHP
13 lines
530 B
PHP
|
|
<?php
|
||
|
|
namespace App\Models;
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||
|
|
class AuditLog extends Model {
|
||
|
|
protected $table = 'audit_log';
|
||
|
|
public $timestamps = false;
|
||
|
|
protected $fillable = ['user_id','device_id','action','old_value','new_value','ip_address','created_at'];
|
||
|
|
protected $casts = ['created_at'=>'datetime'];
|
||
|
|
public function user(): BelongsTo { return $this->belongsTo(User::class); }
|
||
|
|
public function device(): BelongsTo { return $this->belongsTo(Device::class); }
|
||
|
|
}
|