<?php

namespace App\Models;

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

class TransactionMappingLog extends Model
{
    protected $fillable = ['imported_by','data','imported_date','type'];

    protected $casts = [
        'data' => 'array',
    ];

    public static function boot() {
        parent::boot();

        static::creating(function ($model) {
            $model->imported_by = auth()->user()->id;
        });
    }
    
}
