Перевод на доменную архитектуру
This commit is contained in:
26
app/Infrastructure/Reports/Logging/ReportsAuditLogger.php
Normal file
26
app/Infrastructure/Reports/Logging/ReportsAuditLogger.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Infrastructure\Reports\Logging;
|
||||
|
||||
use App\Application\Reports\DTO\ReportComparisonResult;
|
||||
use App\Domain\Reports\Contracts\AuditLogger;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
final class ReportsAuditLogger implements AuditLogger
|
||||
{
|
||||
public function logComparison(ReportComparisonResult $result): void
|
||||
{
|
||||
Log::channel('reports_audit')->info('reports.comparison', [
|
||||
'report_type' => $result->reportType,
|
||||
'path' => $result->path,
|
||||
'status' => $result->status,
|
||||
'department_id' => $result->departmentId,
|
||||
'user_id' => $result->userId,
|
||||
'period_start' => $result->periodStart,
|
||||
'period_end' => $result->periodEnd,
|
||||
'report_id' => $result->reportId,
|
||||
'diff' => $result->diff,
|
||||
'duration_ms' => $result->durationMs,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user