package com.ecep.contract.service;

import com.ecep.contract.util.ParamUtils;
import com.ecep.contract.vm.ProjectBidViewModel;
import com.ecep.contract.vo.ProjectBidVo;
import com.ecep.contract.vo.ProjectVo;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProjectBidService extends QueryService<ProjectBidVo, ProjectBidViewModel> {

    public List<ProjectBidVo> findAllByProject(ProjectVo project) {
        return findAll(ParamUtils.builder().equals("project", project.getId()).build(), Pageable.unpaged())
                .getContent();
    }

}
