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