Модуль отчетов
This commit is contained in:
24
app/Services/Reports/Contracts/ReportDefinition.php
Normal file
24
app/Services/Reports/Contracts/ReportDefinition.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Reports\Contracts;
|
||||
|
||||
use App\Models\Department;
|
||||
use App\Services\DateRange;
|
||||
use App\Services\Reports\ReportPayload;
|
||||
|
||||
interface ReportDefinition
|
||||
{
|
||||
public function code(): string;
|
||||
|
||||
public function label(): string;
|
||||
|
||||
/**
|
||||
* Права, любое из которых открывает доступ к просмотру отчёта. Пустой массив —
|
||||
* отчёт доступен всем, у кого есть общий доступ к отчётам (report.view или nurse.report.view).
|
||||
*
|
||||
* @return array<int,string>
|
||||
*/
|
||||
public function requiredPermissions(): array;
|
||||
|
||||
public function build(Department $department, DateRange $dateRange): ReportPayload;
|
||||
}
|
||||
Reference in New Issue
Block a user