| 1 | package com.tecmilenio.mapsconect.repository; |
| 2 | |
| 3 | import com.tecmilenio.mapsconect.entity.Estudiante; |
| 4 | import org.springframework.data.jpa.repository.JpaRepository; |
| 5 | import org.springframework.stereotype.Repository; |
| 6 | |
| 7 | import java.util.Optional; |
| 8 | |
| 9 | @Repository |
| 10 | public interface EstudianteRepository extends JpaRepository<Estudiante, Integer> { |
| 11 | |
| 12 | Optional<Estudiante> findByUsuario_Id(Integer idUsuario); |
| 13 | |
| 14 | boolean existsByMatricula(String matricula); |
| 15 | |
| 16 | } |