41 lines
1020 B
PHP
41 lines
1020 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Service\Contracts;
|
|
|
|
use App\Entity\Contract;
|
|
use App\Entity\Employee;
|
|
use App\Entity\EmployeeContractPeriod;
|
|
use App\Enum\ContractNature;
|
|
use DateTimeImmutable;
|
|
|
|
interface EmployeeContractPeriodManagerInterface
|
|
{
|
|
public function ensureContractPeriodExists(
|
|
Employee $employee,
|
|
Contract $contract,
|
|
DateTimeImmutable $startDate,
|
|
?DateTimeImmutable $endDate,
|
|
ContractNature $nature,
|
|
bool $isDriver = false,
|
|
): void;
|
|
|
|
public function closeCurrentPeriod(
|
|
?EmployeeContractPeriod $todayPeriod,
|
|
DateTimeImmutable $requestedEndDate,
|
|
bool $paidLeaveSettled,
|
|
?string $comment = null
|
|
): void;
|
|
|
|
public function createNextPeriod(
|
|
Employee $employee,
|
|
Contract $contract,
|
|
DateTimeImmutable $startDate,
|
|
?DateTimeImmutable $endDate,
|
|
ContractNature $nature,
|
|
?EmployeeContractPeriod $todayPeriod,
|
|
bool $isDriver = false,
|
|
): void;
|
|
}
|