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

import com.ffii.core.support.AbstractRepository
import com.ffii.fpsms.modules.master.entity.projections.BomCombo
import org.springframework.stereotype.Repository
import java.io.Serializable

@Repository
interface BomRepository : AbstractRepository<Bom, Long> {
    fun findAllByDeletedIsFalse(): List<Bom>

    fun findByIdAndDeletedIsFalse(id: Serializable): Bom?

    fun findByM18IdAndDeletedIsFalse(m18Id: Long): Bom?

    fun findByItemIdAndDeletedIsFalse(itemId: Serializable): Bom?

    fun findBomComboByDeletedIsFalse(): List<BomCombo>

    fun findByCodeAndDeletedIsFalse(code: String): Bom?
}