package com.ecep.contract.service;

import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import com.ecep.contract.util.ParamUtils;
import com.ecep.contract.vm.InventoryHistoryPriceViewModel;
import com.ecep.contract.vo.InventoryHistoryPriceVo;
import com.ecep.contract.vo.InventoryVo;

@Service
public class InventoryHistoryPriceService
        extends QueryService<InventoryHistoryPriceVo, InventoryHistoryPriceViewModel> {

    public List<InventoryHistoryPriceVo> findAllByInventory(InventoryVo parent) {
        return findAll(ParamUtils.builder().equals("inventoryId", parent.getId()).build(), 
                Pageable.unpaged()).getContent();
    }

}
