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.ContractPayPlanViewModel;
import com.ecep.contract.vo.ContractPayPlanVo;
import com.ecep.contract.vo.ContractVo;

@Service
public class ContractPayPlanService extends QueryService<ContractPayPlanVo, ContractPayPlanViewModel> {



    public List<ContractPayPlanVo> findAllByContract(ContractVo contract) {
        return findAll(ParamUtils.builder()
                .equals("contract", contract.getId())
                .build(), Pageable.unpaged()).getContent();
    }

}
