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

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

public interface CheckupBookingAnnouncementRepository extends JpaRepository<CheckupBookingAnnouncement, Integer>, JpaSpecificationExecutor<CheckupBookingAnnouncement> {
    @Query(value = "select * from checkup_booking_announcement where hospital_id = ? and status = 0 and deleted = 0 limit 1;", nativeQuery = true)
    CheckupBookingAnnouncement findOneByHospitalId(int hospitalId);
}