29 lines
707 B
PHP
29 lines
707 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class ImportRow extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'import_id', 'row_number', 'sheet_name', 'record_type', 'raw_data', 'mapped_data', 'status', 'errors', 'warnings', 'entity_type', 'entity_id', 'fingerprint', 'raw_sha1',
|
|
];
|
|
|
|
protected $casts = [
|
|
'raw_data' => 'array',
|
|
'mapped_data' => 'array',
|
|
'errors' => 'array',
|
|
'warnings' => 'array',
|
|
];
|
|
|
|
public function import(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Import::class);
|
|
}
|
|
}
|