21 lines
672 B
PHP
21 lines
672 B
PHP
<?php
|
|
|
|
namespace App\Domain\ReportDuty\Contracts;
|
|
|
|
use App\Domain\ReportDuty\DTO\CreateReportDutyDto;
|
|
use App\Domain\ReportDuty\Models\ReportDuty;
|
|
|
|
interface ReportDutyRepositoryInterface
|
|
{
|
|
public function save(ReportDuty $reportDuty): ?ReportDuty;
|
|
public function update(ReportDuty $reportDuty): ?ReportDuty;
|
|
|
|
// Поиск
|
|
public function findByPeriod(string $startAt, string $endAt): ?ReportDuty;
|
|
public function findByDepartment(int $departmentId): ?ReportDuty;
|
|
public function findByUser(int $userId): ?ReportDuty;
|
|
public function findById(int $id): ?ReportDuty;
|
|
public function findOrCreate(CreateReportDutyDto $dto): ?ReportDuty;
|
|
|
|
}
|