package kr.or.bok.rtgs.chanel.jpa

import kr.or.bok.rtgs.common.ledger.Account
import kr.or.bok.rtgs.common.ledger.NotificationEntity
import kr.or.bok.rtgs.common.ledger.RawMessageEntity
import kr.or.bok.rtgs.common.ledger.TransferRecord
import org.springframework.data.jpa.repository.JpaRepository

/** 조회(inquiry)용 읽기 접근 + 원전문 저장 — 권위 원장(PostgreSQL). */
interface AccountRepository : JpaRepository<Account, String>

interface TransferRepository : JpaRepository<TransferRecord, String>

interface RawMessageRepository : JpaRepository<RawMessageEntity, String>

/** 결과통보 아웃박스 — 신청/수취기관 앞 송부한 pacs.002 기록. */
interface NotificationRepository : JpaRepository<NotificationEntity, String> {
    fun findByBmiOrderByRole(bmi: String): List<NotificationEntity>
    fun findTop100ByOrderByCreatedAtDesc(): List<NotificationEntity>
}
