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

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

public interface UserPatientRepository extends PagingAndSortingRepository<UserPatient, Integer> {


    @Query(value = "select count(1) from user_patient where user_id = ? and id_no = ? and deleted = 0 limit 1; ", nativeQuery = true)
    public int checkUserPatientExist(int userId, String idNo);

}
