'array', 'total_tables' => 'integer', 'processed_tables' => 'integer', 'total_rows' => 'integer', 'migrated_rows' => 'integer', 'failed_rows' => 'integer', 'started_at' => 'datetime', 'completed_at' => 'datetime', ]; public function schedule(): BelongsTo { return $this->belongsTo(MigrationSchedule::class, 'schedule_id'); } public function getProgressAttribute(): float { if ($this->total_tables === 0) { return 0; } return round(($this->processed_tables / $this->total_tables) * 100, 2); } public function getDurationAttribute(): ?string { if (!$this->started_at) { return null; } $end = $this->completed_at ?? now(); $duration = $this->started_at->diff($end); return $duration->format('%H:%I:%S'); } }