package com.magistr.app.repository;

import com.magistr.app.model.SpecialtyProfile;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

public interface SpecialtyProfileRepository extends JpaRepository<SpecialtyProfile, Long> {

    List<SpecialtyProfile> findBySpecialityIdOrderByNameAsc(Long specialityId);

    Optional<SpecialtyProfile> findBySpecialityIdAndName(Long specialityId, String name);
}
