Перевод на доменную архитектуру

This commit is contained in:
brusnitsyn
2026-04-26 23:37:50 +09:00
parent 75ca01ffd8
commit f107ebd167
70 changed files with 4656 additions and 2070 deletions

View File

@@ -0,0 +1,10 @@
<?php
namespace App\Domain\Reports\Contracts;
use App\Application\Reports\DTO\ReportComparisonResult;
interface AuditLogger
{
public function logComparison(ReportComparisonResult $result): void;
}

View File

@@ -0,0 +1,12 @@
<?php
namespace App\Domain\Reports\Contracts;
use App\Domain\Reports\Models\MetricResultCollection;
use App\Domain\Reports\Models\PatientCollection;
use App\Domain\Reports\Models\ReportContext;
interface MetricCalculator
{
public function calculate(ReportContext $context, PatientCollection $patients): MetricResultCollection;
}

View File

@@ -0,0 +1,11 @@
<?php
namespace App\Domain\Reports\Contracts;
use App\Domain\Reports\Models\PatientCollection;
use App\Domain\Reports\Models\ReportContext;
interface PatientSource
{
public function load(ReportContext $context): PatientCollection;
}

View File

@@ -0,0 +1,13 @@
<?php
namespace App\Domain\Reports\Contracts;
use App\Domain\Reports\Models\ReportSnapshot;
use App\Domain\Reports\Models\SavedReportResult;
interface ReportRepository
{
public function save(ReportSnapshot $snapshot): SavedReportResult;
public function findSnapshot(int $reportId): ?ReportSnapshot;
}