package vn.azteam.tpf.service;

import vn.azteam.tpf.service.dto.TBBlockDetailsDTO;
import vn.azteam.tpf.service.dto.TBSuppliesInWarehouseDTO;
import vn.azteam.tpf.service.dto.WarehouseStockUpdateDTO;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.Optional;

/**
 * Service Interface for managing TBBlockDetails.
 */
public interface TBBlockDetailsService {

    /**
     * Save a tBBlockDetails.
     *
     * @param tBBlockDetailsDTO the entity to save
     * @return the persisted entity
     */
    TBBlockDetailsDTO save(TBBlockDetailsDTO tBBlockDetailsDTO);

    /**
     * Get all the tBBlockDetails.
     *
     * @param pageable the pagination information
     * @return the list of entities
     */
    Page<TBBlockDetailsDTO> findAll(Pageable pageable);


    /**
     * Get the "id" tBBlockDetails.
     *
     * @param id the id of the entity
     * @return the entity
     */
    Optional<TBBlockDetailsDTO> findOne(Long id);

    /**
     * Delete the "id" tBBlockDetails.
     *
     * @param id the id of the entity
     */
    void delete(Long id);

    /**
     * Search for the tBBlockDetails corresponding to the query.
     *
     * @param query the query of the search
     * 
     * @param pageable the pagination information
     * @return the list of entities
     */
    Page<TBBlockDetailsDTO> search(String query, Pageable pageable);


    TBBlockDetailsDTO getTBBlockDetailsByWarehouseStockUpdate(
        WarehouseStockUpdateDTO warehouseStockUpdateDTO,
        TBSuppliesInWarehouseDTO tBSuppliesInWarehouseDTO
    );
}
