18 lines
505 B
PHP
18 lines
505 B
PHP
<?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]
|
|
);
|
|
}
|
|
}
|