getKey(); $backup = CleanupBackup::with(['files', 'sqlBackups'])->find($backupId); if (!$backup) { return $this->response() ->error('备份不存在'); } $html = '
| 表名 | 文件名 | 文件大小 | 类型 | 压缩 |
|---|---|---|---|---|
| ' . $file->table_name . ' | '; $html .= '' . $file->file_name . ' | '; $html .= '' . $this->formatBytes($file->file_size) . ' | '; $html .= '' . $this->getBackupTypeName($file->backup_type) . ' | '; $html .= '' . $this->getCompressionTypeName($file->compression_type) . ' | '; $html .= '
| 表名 | 记录数量 | 内容大小 | 创建时间 |
|---|---|---|---|
| ' . $sqlBackup->table_name . ' | '; $html .= '' . number_format($sqlBackup->records_count) . ' | '; $html .= '' . $this->formatBytes($sqlBackup->content_size) . ' | '; $html .= '' . $sqlBackup->created_at . ' | '; $html .= '