27 خطوط
562 B
PHP
27 خطوط
562 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class ImportBatchRow extends Model
|
|
{
|
|
protected $fillable = ['import_batch_id', 'lead_id', 'original_data', 'status', 'error'];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return ['original_data' => 'array'];
|
|
}
|
|
|
|
public function importBatch(): BelongsTo
|
|
{
|
|
return $this->belongsTo(ImportBatch::class);
|
|
}
|
|
|
|
public function lead(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Lead::class);
|
|
}
|
|
}
|