package com.ffii.fpsms.modules.master.entity

import com.ffii.core.support.AbstractRepository
import org.springframework.data.jpa.repository.Query
import org.springframework.stereotype.Repository
import java.io.Serializable

@Repository
interface ItemUomRespository : AbstractRepository<ItemUom, Long> {
    fun findAllByItemIdAndDeletedIsFalse(itemId: Serializable): List<ItemUom>

    fun findByIdAndDeletedIsFalse(id: Serializable): ItemUom?

    fun findByM18IdAndDeletedIsFalse(m18Id: Serializable): ItemUom?

    fun deleteAllByIdIn(id: List<Serializable>)

    fun findByItemIdAndPurchaseUnitIsTrueAndDeletedIsFalse(itemId: Serializable): ItemUom?

    fun findByItemM18IdAndPurchaseUnitIsTrueAndDeletedIsFalse(itemM18Id: Long): ItemUom?
}