<?php
namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use App\Models\User;

class WorkflowAudit extends Model
{
    protected $fillable = [
        'entity_type', 'entity_id', 'user_id', 'action', 'before', 'after'
    ];

    protected $casts = [
        'before' => 'array',
        'after' => 'array',
    ];

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