<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class ImportBatchRow extends Model
{
    use SoftDeletes;

    protected $table = 'import_batch_rows';

    protected $fillable = [
        'import_batch_id',
        'request_data',
        'response_data',
        'row_data',
    ];

    protected $casts = [
        'request_data' => 'array',
        'response_data' => 'array',
        'row_data' => 'array',
    ];

    public function batch()
    {
        return $this->belongsTo(ImportBatch::class, 'import_batch_id');
    }
}

