Перевод на DDD
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Infrastructure\Database\Repositories;
|
||||
|
||||
use App\Domain\ReportDuty\Contracts\DutyMetricRepositoryInterface;
|
||||
use App\Models\DutyReportMetricResult;
|
||||
|
||||
class DutyMetricRepository implements DutyMetricRepositoryInterface
|
||||
{
|
||||
public function saveMetric(int $reportId, int $metricId, float|int $value): void
|
||||
{
|
||||
DutyReportMetricResult::updateOrCreate(
|
||||
['rf_report_id' => $reportId, 'rf_metrika_item_id' => $metricId],
|
||||
['value' => $value]
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user