<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class RegistruModificare extends Model
{
    public $timestamps = false;
    protected $table = 'registru_modificari';

    protected $fillable = [
        'user_id',
        'user_name',
        'actiune',
        'model',
        'model_id',
        'descriere',
        'valori_vechi',
        'valori_noi',
        'data_ora',
    ];

    protected $casts = [
        'valori_vechi' => 'array',
        'valori_noi' => 'array',
        'data_ora' => 'datetime',
    ];

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