package com.ywt.mg.domain.entities;

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

import java.util.List;

public interface MedicalCardRepository extends JpaRepository<MedicalCard, Integer>, JpaSpecificationExecutor<MedicalCard> {

    @Query(value = "select * from medical_card where mobile = ? ;", nativeQuery = true)
    List<MedicalCard> getCardByMobile(String patientmobile);
}