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 RegistrationRepository extends JpaRepository<Registration, Integer> {
    @Query(value = "select count(0) from his_registration where reg_id = ? and medical_card_id = ?;", nativeQuery = true)
    int count(String regId, int medicalCardId);

    @Query(value = "select * from his_registration where id >= ? and id <= ? order by id;", nativeQuery = true)
    List<Registration> getRegistrationList(int minId, int maxId);
}
