Ремонт сохранения снапшотов

This commit is contained in:
brusnitsyn
2026-05-06 20:50:07 +09:00
parent 2026a1ca9f
commit c5da85763c
3 changed files with 33 additions and 42 deletions

View File

@@ -33,6 +33,12 @@ class UnifiedMedicalHistory extends MaterializedViewModel
->latest('ingoing_date');
}
public function latestMigrationInDepartment($query, $departmentId)
{
return $query->where('department_id', $departmentId)
->latest('ingoing_date');
}
public function operationsInDepartment($query, $departmentId)
{
return $this->operations()->where('department_id', $departmentId);