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

import com.ffii.core.support.AbstractRepository
import org.springframework.stereotype.Repository
import java.io.Serializable

@Repository
interface BomMaterialRepository : AbstractRepository<BomMaterial, Long> {
    fun findByIdAndDeletedIsFalse(id: Serializable): BomMaterial?

    fun findByM18IdAndDeletedIsFalse(m18Id: Long): BomMaterial?

    fun findAllByBomItemIdAndDeletedIsFalse(itemId: Long): List<BomMaterial>

    fun findAllByBomIdAndDeletedIsFalse(bomId: Long): List<BomMaterial>

    fun findByBomIdAndItemId(bomId: Long, itemId: Long): BomMaterial?
}