Update src/main/java/com/example/nto/repository/EmployeeRepository.java

This commit is contained in:
2025-12-08 12:05:13 +00:00
parent f870b7991a
commit f8a1da5df9

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);
}