package com.kamco.cd.kamcoback.postgres.core;

import com.kamco.cd.kamcoback.model.dto.ModelMgmtDto;
import com.kamco.cd.kamcoback.postgres.repository.model.ModelMgmtRepository;
import java.time.LocalDate;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class ModelMgmtCoreService {

  private final ModelMgmtRepository modelMgmtRepository;

  public Page<ModelMgmtDto.ModelList> findModelMgmtList(
      ModelMgmtDto.searchReq searchReq,
      LocalDate startDate,
      LocalDate endDate,
      String modelType,
      String searchVal) {
    return modelMgmtRepository.findModelMgmtList(
        searchReq, startDate, endDate, modelType, searchVal);
  }
}
