<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class ImportacionError extends Model
{
    protected $table = 'importaciones_errores';
    protected $fillable = ['importacion_id', 'hoja', 'numero_fila', 'mensaje', 'datos_originales'];
    protected $casts = ['datos_originales' => 'array'];

    public function importacion(): BelongsTo { return $this->belongsTo(Importacion::class, 'importacion_id'); }
}
