25 lines
743 B
PHP
25 lines
743 B
PHP
<?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;
|
||
}
|