package com.ffii.fpsms.modules.stock.entity

import com.ffii.core.support.AbstractRepository
import com.ffii.fpsms.modules.pickOrder.entity.PickOrderLine
import org.springframework.stereotype.Repository

@Repository
interface SuggestPickLotRepository : AbstractRepository<SuggestedPickLot, Long> {
    fun findAllByPickOrderLineIn(lines: List<PickOrderLine>): List<SuggestedPickLot>
    fun findAllByPickOrderLineIdIn(pickOrderLineIds: List<Long>): List<SuggestedPickLot>
    fun findFirstByPickOrderLineId(pickOrderLineId: Long): SuggestedPickLot?
     
    fun findAllByPickOrderLineId(pickOrderLineId: Long): List<SuggestedPickLot>

    fun findAllByPickOrderLineIdAndDeletedFalse(pickOrderLineId: Long): List<SuggestedPickLot>

    fun findAllByPickOrderLineIdInAndDeletedFalse(pickOrderLineIds: List<Long>): List<SuggestedPickLot>

    fun findFirstByStockOutLineId(stockOutLineId: Long): SuggestedPickLot?
}