80 lines
2.2 KiB
PHP
80 lines
2.2 KiB
PHP
<?php
|
|
|
|
namespace App\Repositories;
|
|
|
|
use App\Models\InterventionPractitioner;
|
|
|
|
interface InterventionPractitionerRepositoryInterface
|
|
{
|
|
/**
|
|
* Create a new intervention-practitioner assignment.
|
|
*
|
|
* @param int $interventionId
|
|
* @param int $practitionerId
|
|
* @param string $role
|
|
* @param string|null $assignedAt
|
|
* @return InterventionPractitioner
|
|
*/
|
|
public function createAssignment(int $interventionId, int $practitionerId, string $role, ?string $assignedAt = null): InterventionPractitioner;
|
|
|
|
/**
|
|
* Remove all practitioner assignments for an intervention.
|
|
*
|
|
* @param int $interventionId
|
|
* @return int
|
|
*/
|
|
public function removeAllAssignments(int $interventionId): int;
|
|
|
|
/**
|
|
* Remove specific practitioner assignment.
|
|
*
|
|
* @param int $interventionId
|
|
* @param int $practitionerId
|
|
* @return int
|
|
*/
|
|
public function removeAssignment(int $interventionId, int $practitionerId): int;
|
|
|
|
/**
|
|
* Check if a practitioner is already assigned to an intervention.
|
|
*
|
|
* @param int $interventionId
|
|
* @param int $practitionerId
|
|
* @return bool
|
|
*/
|
|
public function isPractitionerAssigned(int $interventionId, int $practitionerId): bool;
|
|
|
|
/**
|
|
* Get all practitioner assignments for an intervention.
|
|
*
|
|
* @param int $interventionId
|
|
* @return \Illuminate\Database\Eloquent\Collection
|
|
*/
|
|
public function getAssignmentsForIntervention(int $interventionId);
|
|
|
|
/**
|
|
* Get principal practitioners for an intervention.
|
|
*
|
|
* @param int $interventionId
|
|
* @return \Illuminate\Database\Eloquent\Collection
|
|
*/
|
|
public function getPrincipalPractitioners(int $interventionId);
|
|
|
|
/**
|
|
* Get assistant practitioners for an intervention.
|
|
*
|
|
* @param int $interventionId
|
|
* @return \Illuminate\Database\Eloquent\Collection
|
|
*/
|
|
public function getAssistantPractitioners(int $interventionId);
|
|
|
|
/**
|
|
* Update practitioner role for an intervention.
|
|
*
|
|
* @param int $interventionId
|
|
* @param int $practitionerId
|
|
* @param string $role
|
|
* @return bool
|
|
*/
|
|
public function updatePractitionerRole(int $interventionId, int $practitionerId, string $role): bool;
|
|
}
|