package com.kamco.cd.kamcoback.model.service;

import com.kamco.cd.kamcoback.config.api.ApiResponseDto;
import com.kamco.cd.kamcoback.model.dto.ModelMngDto;
import com.kamco.cd.kamcoback.postgres.core.ModelMngCoreService;
import java.time.LocalDate;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class ModelMngService {

  private final ModelMngCoreService modelMngCoreService;

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

  public ApiResponseDto.ResponseObj removeModel(String modelVer) {
    return modelMngCoreService.removeModel(modelVer);
  }
}
