student-30864-patch-1 #11

Closed
student-30864 wants to merge 19 commits from student-30864/NTO-2025-Backend-TeamTask-1:student-30864-patch-1 into main
Showing only changes of commit f8a1da5df9 - Show all commits

View File

@@ -1,10 +1,16 @@
package com.example.nto.repository;
/**
* TODO: ДОРАБОТАТЬ в рамках задания
* =================================
* МОЖНО: Добавлять методы, аннотации, зависимости
* НЕЛЬЗЯ: Изменять название класса и пакета
*/
public interface EmployeeRepository {
import com.example.nto.entity.Employee;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.Optional;
@Repository
public interface EmployeeRepository extends JpaRepository<Employee, Long> {
Optional<Employee> findByCode(String code);
boolean existsByCode(String code);
}