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

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

@Repository
interface StockTakeLineRepository : AbstractRepository<StockTakeLine, Long> {
    fun findByIdAndDeletedIsFalse(id: Serializable): StockTakeLine?;
    fun findByInventoryLotLineIdAndStockTakeIdAndDeletedIsFalse(inventoryLotLineId: Serializable, stockTakeId: Serializable): StockTakeLine?;
    fun findByStockTakeRecord_IdAndDeletedIsFalse(stockTakeRecordId: Long): StockTakeLine?
    fun findAllByStockTakeRecord_IdInAndDeletedIsFalse(stockTakeRecordIds: Collection<Long>): List<StockTakeLine>
    fun findAllByStockTakeIdInAndInventoryLotLineIdInAndDeletedIsFalse(
        stockTakeIds: Collection<Long>,
        inventoryLotLineIds: Collection<Long>
    ): List<StockTakeLine>
}