package com.ffii.fpsms.m18.entity

import com.ffii.core.support.AbstractRepository
import com.ffii.fpsms.m18.enums.M18DataLogStatus
import org.springframework.stereotype.Repository

@Repository
interface M18DataLogRepository : AbstractRepository<M18DataLog, Long> {
    // find latest m18 data log by m18 id & ref type & status is true & deleted is false (order by id asc limit 1)
    fun findTopByM18IdAndRefTypeAndDeletedIsFalseAndStatusOrderByIdDesc(m18Id: Long, refType: String, status: M18DataLogStatus): M18DataLog?
}