package com.ywt.outpatient.domain.entity.center;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface DoctorDeptRepository extends JpaRepository<DoctorDept, Integer> {

    List<DoctorDept> getDoctorDeptListByDoctorId(int doctorId);

    @Query(value = "select * from doctor_dept WHERE doctor_id = ? AND is_deleted = 0 limit 1;",nativeQuery = true)
    DoctorDept getDoctorDeptByDoctorId(int doctorId);

}
