forked from Olympic/NTO-2025-Backend-TeamTask
Update src/main/java/com/example/nto/repository/EmployeeRepository.java
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user