Перевод на доменную архитектуру
This commit is contained in:
10
app/Domain/Reports/Contracts/AuditLogger.php
Normal file
10
app/Domain/Reports/Contracts/AuditLogger.php
Normal 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;
|
||||
}
|
||||
12
app/Domain/Reports/Contracts/MetricCalculator.php
Normal file
12
app/Domain/Reports/Contracts/MetricCalculator.php
Normal 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;
|
||||
}
|
||||
11
app/Domain/Reports/Contracts/PatientSource.php
Normal file
11
app/Domain/Reports/Contracts/PatientSource.php
Normal 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;
|
||||
}
|
||||
13
app/Domain/Reports/Contracts/ReportRepository.php
Normal file
13
app/Domain/Reports/Contracts/ReportRepository.php
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user