package com.ywt.mg.domain.entities;

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

public interface RegisteredOrderRepository extends JpaRepository<RegisteredOrder, Integer> {
    @Query(value = "select * from registered_order where medical_card_id = ? and deleted = 0 order by create_time desc limit 1;", nativeQuery = true)
    RegisteredOrder getRegisteredOrderByMedicalCardId(int medicalCardId);
}
