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

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

public interface DoctorFreeConsultScheduleRepository extends JpaRepository<DoctorFreeConsultSchedule, Integer> {
    @Query(value = "select * from doctor_free_consult_schedule where deleted = 0 and doctor_id = ? and hospital_ids like ?", nativeQuery = true)
    DoctorFreeConsultSchedule getByDoctorIdAndHospitalId(int doctorId, String hospitalId);

    @Query(value = "select * from doctor_free_consult_schedule where deleted = 0 and doctor_id = ? ", nativeQuery = true)
    DoctorFreeConsultSchedule getByDoctorId(int doctorId);

    @Query(value = "select * from doctor_free_consult_schedule where deleted = 0 and doctor_id = ? and display_terminal_ids like ?", nativeQuery = true)
    DoctorFreeConsultSchedule getByDoctorIdAndTerminal(int doctorId, String terminal);
}