package com.kamco.cd.training.postgres.repository.model;

import com.kamco.cd.training.model.dto.ModelTrainMngDto;
import com.kamco.cd.training.model.dto.ModelTrainMngDto.ListDto;
import com.kamco.cd.training.postgres.entity.ModelMasterEntity;
import com.kamco.cd.training.train.dto.TrainRunRequest;
import java.util.Optional;
import java.util.UUID;
import org.springframework.data.domain.Page;

public interface ModelMngRepositoryCustom {

  /**
   * 모델 목록 조회
   *
   * @param searchReq
   * @return
   */
  Page<ListDto> findByModels(ModelTrainMngDto.SearchReq searchReq);

  Optional<ModelMasterEntity> findByUuid(UUID uuid);

  Optional<ModelMasterEntity> findFirstByStatusCdAndDelYn(String statusCd, Boolean delYn);

  TrainRunRequest findTrainRunRequest(Long modelId);

  Long findModelStep1InProgressCnt();
}
