dataset 테이블 수정, 모델학습 설정 dto 추가

This commit is contained in:
2026-02-04 12:24:55 +09:00
parent f1ad59d0b1
commit 60d45ee2ce
12 changed files with 459 additions and 131 deletions

View File

@@ -0,0 +1,27 @@
package com.kamco.cd.training.common.enums;
import com.kamco.cd.training.common.utils.enums.CodeExpose;
import com.kamco.cd.training.common.utils.enums.EnumType;
import lombok.AllArgsConstructor;
import lombok.Getter;
@CodeExpose
@Getter
@AllArgsConstructor
public enum HyperParamSelectType implements EnumType {
OPTIMIZED("최적화 파라미터"),
EXISTING("기존 파라미터"),
NEW("신규 파라미터");
private final String desc;
@Override
public String getId() {
return name();
}
@Override
public String getText() {
return desc;
}
}

View File

@@ -37,6 +37,8 @@ public class DatasetDto {
private String groupTitleCd;
private String title;
private Long roundNo;
private Integer compareYyyy;
private Integer targetYyyy;
private String totalSize;
private String memo;
@JsonFormatDttm private ZonedDateTime createdDttm;
@@ -154,10 +156,15 @@ public class DatasetDto {
@Schema(description = "제목", example = "1차 제작")
private String title;
@NotBlank(message = "연도는 필수입니다")
@Size(max = 4, message = "연도는 4자리입니다")
@Schema(description = "연도 (YYYY)", example = "2024")
private String year;
@NotBlank(message = "비교연도는 필수입니다")
@Size(max = 4, message = "비교연도는 4자리입니다")
@Schema(description = "비교연도 (YYYY)", example = "2024")
private Integer compareYear;
@NotBlank(message = "기준연도는 필수입니다")
@Size(max = 4, message = "기준연도는 4자리입니다")
@Schema(description = "기준연도 (YYYY)", example = "2024")
private Integer targetYyyy;
@Schema(description = "회차", example = "1")
private Long roundNo;

View File

@@ -1,8 +1,8 @@
package com.kamco.cd.training.model;
import com.kamco.cd.training.config.api.ApiResponseDto;
import com.kamco.cd.training.model.dto.ModelMngDto;
import com.kamco.cd.training.model.dto.ModelMngDto.Basic;
import com.kamco.cd.training.model.dto.ModelTrainDto;
import com.kamco.cd.training.model.dto.ModelTrainDto.Basic;
import com.kamco.cd.training.model.service.ModelMngService;
import com.kamco.cd.training.model.service.ModelTrainService;
import io.swagger.v3.oas.annotations.Operation;
@@ -18,6 +18,8 @@ import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@@ -53,7 +55,7 @@ public class ModelMngApiController {
String status,
@Parameter(description = "페이지 번호") @RequestParam(defaultValue = "0") int page,
@Parameter(description = "페이지 크기") @RequestParam(defaultValue = "20") int size) {
ModelMngDto.SearchReq searchReq = new ModelMngDto.SearchReq(status, page, size);
ModelTrainDto.SearchReq searchReq = new ModelTrainDto.SearchReq(status, page, size);
return ApiResponseDto.ok(modelMngService.getModelList(searchReq));
}
@@ -71,6 +73,18 @@ public class ModelMngApiController {
modelMngService.deleteModelTrain(uuid);
return ApiResponseDto.ok(null);
}
@Operation(summary = "학습 모델 등록", description = "학습 모델 등록 API")
@ApiResponses(
value = {
@ApiResponse(responseCode = "200", description = "등록 성공", content = @Content),
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
})
@PostMapping
public ApiResponseDto<String> createModelTrain(@RequestBody ModelTrainDto.AddReq modelTrainDto) {
return ApiResponseDto.ok(null);
}
//
// @Operation(summary = "학습 모델 상세 조회", description = "학습 모델의 상세 정보를 UUID로 조회합니다")
// @ApiResponses(

View File

@@ -1,124 +1,21 @@
package com.kamco.cd.training.model.dto;
import com.kamco.cd.training.common.enums.TrainStatusType;
import com.kamco.cd.training.common.enums.TrainType;
import com.kamco.cd.training.common.utils.interfaces.JsonFormatDttm;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import java.time.Duration;
import java.time.ZonedDateTime;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
public class ModelMngDto {
@Schema(name = "모델관리 목록 조회", description = "모델관리 목록 조회")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public static class Basic {
private Long id;
private UUID uuid;
private String modelVer;
@JsonFormatDttm private ZonedDateTime startDttm;
@JsonFormatDttm private ZonedDateTime step1StrtDttm;
@JsonFormatDttm private ZonedDateTime step1EndDttm;
@JsonFormatDttm private ZonedDateTime step2StrtDttm;
@JsonFormatDttm private ZonedDateTime step2EndDttm;
private String step1Status;
private String step2Status;
private String statusCd;
private String trainType;
public String getStatusName() {
if (this.statusCd == null || this.statusCd.isBlank()) return null;
try {
return TrainStatusType.valueOf(this.statusCd).getText(); // 또는 getName()
} catch (IllegalArgumentException e) {
return this.statusCd; // 매핑 못하면 코드 그대로 반환(원하면 null 처리)
}
}
public String getStep1StatusName() {
if (this.step1Status == null || this.step1Status.isBlank()) return null;
try {
return TrainStatusType.valueOf(this.step1Status).getText(); // 또는 getName()
} catch (IllegalArgumentException e) {
return this.step1Status; // 매핑 못하면 코드 그대로 반환(원하면 null 처리)
}
}
public String getStep2StatusNAme() {
if (this.step2Status == null || this.step2Status.isBlank()) return null;
try {
return TrainStatusType.valueOf(this.step2Status).getText(); // 또는 getName()
} catch (IllegalArgumentException e) {
return this.step2Status; // 매핑 못하면 코드 그대로 반환(원하면 null 처리)
}
}
public String getTrainTypeName() {
if (this.trainType == null || this.trainType.isBlank()) return null;
try {
return TrainType.valueOf(this.trainType).getText(); // 또는 getName()
} catch (IllegalArgumentException e) {
return this.trainType; // 매핑 못하면 코드 그대로 반환(원하면 null 처리)
}
}
private String formatDuration(ZonedDateTime start, ZonedDateTime end) {
if (start == null || end == null) {
return null;
}
long totalSeconds = Math.abs(Duration.between(start, end).getSeconds());
long hours = totalSeconds / 3600;
long minutes = (totalSeconds % 3600) / 60;
long seconds = totalSeconds % 60;
return String.format("%d시간 %d분 %d초", hours, minutes, seconds);
}
public String getStep1Duration() {
return formatDuration(this.step1StrtDttm, this.step1EndDttm);
}
public String getStep2Duration() {
return formatDuration(this.step2StrtDttm, this.step2EndDttm);
}
}
@Schema(name = "searchReq", description = "모델 관리 목록조회 파라미터")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public static class SearchReq {
private String status;
// 페이징 파라미터
private int page = 0;
private int size = 20;
public Pageable toPageable() {
return PageRequest.of(page, size);
}
}
@Schema(name = "Detail", description = "모델 상세 정보")
@Getter
@Builder

View File

@@ -0,0 +1,336 @@
package com.kamco.cd.training.model.dto;
import com.kamco.cd.training.common.enums.TrainStatusType;
import com.kamco.cd.training.common.enums.TrainType;
import com.kamco.cd.training.common.utils.interfaces.JsonFormatDttm;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import java.time.Duration;
import java.time.ZonedDateTime;
import java.util.List;
import java.util.UUID;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
public class ModelTrainDto {
@Schema(name = "모델학습관리 목록", description = "모델학습관리 목록")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public static class Basic {
private Long id;
private UUID uuid;
private String modelVer;
@JsonFormatDttm private ZonedDateTime startDttm;
@JsonFormatDttm private ZonedDateTime step1StrtDttm;
@JsonFormatDttm private ZonedDateTime step1EndDttm;
@JsonFormatDttm private ZonedDateTime step2StrtDttm;
@JsonFormatDttm private ZonedDateTime step2EndDttm;
private String step1Status;
private String step2Status;
private String statusCd;
private String trainType;
public String getStatusName() {
if (this.statusCd == null || this.statusCd.isBlank()) return null;
try {
return TrainStatusType.valueOf(this.statusCd).getText(); // 또는 getName()
} catch (IllegalArgumentException e) {
return this.statusCd; // 매핑 못하면 코드 그대로 반환(원하면 null 처리)
}
}
public String getStep1StatusName() {
if (this.step1Status == null || this.step1Status.isBlank()) return null;
try {
return TrainStatusType.valueOf(this.step1Status).getText(); // 또는 getName()
} catch (IllegalArgumentException e) {
return this.step1Status; // 매핑 못하면 코드 그대로 반환(원하면 null 처리)
}
}
public String getStep2StatusNAme() {
if (this.step2Status == null || this.step2Status.isBlank()) return null;
try {
return TrainStatusType.valueOf(this.step2Status).getText(); // 또는 getName()
} catch (IllegalArgumentException e) {
return this.step2Status; // 매핑 못하면 코드 그대로 반환(원하면 null 처리)
}
}
public String getTrainTypeName() {
if (this.trainType == null || this.trainType.isBlank()) return null;
try {
return TrainType.valueOf(this.trainType).getText(); // 또는 getName()
} catch (IllegalArgumentException e) {
return this.trainType; // 매핑 못하면 코드 그대로 반환(원하면 null 처리)
}
}
private String formatDuration(ZonedDateTime start, ZonedDateTime end) {
if (start == null || end == null) {
return null;
}
long totalSeconds = Math.abs(Duration.between(start, end).getSeconds());
long hours = totalSeconds / 3600;
long minutes = (totalSeconds % 3600) / 60;
long seconds = totalSeconds % 60;
return String.format("%d시간 %d분 %d초", hours, minutes, seconds);
}
public String getStep1Duration() {
return formatDuration(this.step1StrtDttm, this.step1EndDttm);
}
public String getStep2Duration() {
return formatDuration(this.step2StrtDttm, this.step2EndDttm);
}
}
@Schema(name = "searchReq", description = "모델학습 관리 목록조회 파라미터")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public static class SearchReq {
private String status;
// 페이징 파라미터
private int page = 0;
private int size = 20;
public Pageable toPageable() {
return PageRequest.of(page, size);
}
}
@Schema(name = "addReq", description = "모델학습 관리 등록 파라미터")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public static class AddReq {
HyperParamDto hyperParam;
TrainingDataConfigDto trainingDataConfig;
EtcConfig etcConfig;
}
/** 학습실행설정 하이퍼파라미터 설정 */
@Schema(name = "하이퍼파라미터 설정", description = "학습실행설정 > 하이퍼파라미터 설정")
@Getter
@Setter
public static class HyperParamDto {
@NotNull
@Schema(
description = "OPTIMIZED(최적화 파라미터),EXISTING(기존 파라미터),NEW(신규 파라미터)",
example = "EXISTING")
private String hyperParamType;
@Schema(description = "기존 파라미터 uuid", example = "57fc9170-64c1-4128-aa7b-0657f08d6d10")
private String hyperUuid;
// -------------------------
// Important
// -------------------------
@Schema(description = "백본 네트워크", example = "large")
private String backbone; // backbone
@Schema(description = "입력 이미지 크기(H,W)", example = "512,512")
private String inputSize; // input_size
@Schema(description = "크롭 크기(H,W 또는 단일값)", example = "256,256")
private String cropSize; // crop_size
@Schema(description = "배치 크기(Per GPU)", example = "16")
private Integer batchSize; // batch_size
// -------------------------
// Data
// -------------------------
@Schema(description = "Train dataloader workers", example = "16")
private Integer trainNumWorkers; // train_num_workers
@Schema(description = "Val dataloader workers", example = "8")
private Integer valNumWorkers; // val_num_workers
@Schema(description = "Test dataloader workers", example = "8")
private Integer testNumWorkers; // test_num_workers
@Schema(description = "Train shuffle 여부", example = "true")
private Boolean trainShuffle; // train_shuffle
@Schema(description = "Train persistent workers 여부", example = "true")
private Boolean trainPersistent; // train_persistent
@Schema(description = "Val persistent workers 여부", example = "true")
private Boolean valPersistent; // val_persistent
// -------------------------
// Model Architecture
// -------------------------
@Schema(description = "Drop Path 비율", example = "0.3")
private Double dropPathRate; // drop_path_rate
@Schema(description = "Freeze 단계(-1:None)", example = "-1")
private Integer frozenStages; // frozen_stages
@Schema(description = "Neck 결합 정책", example = "abs_diff")
private String neckPolicy; // neck_policy
@Schema(description = "디코더 채널 구성", example = "512,256,128,64")
private String decoderChannels; // decoder_channels
@Schema(description = "클래스별 가중치", example = "1,10")
private String classWeight; // class_weight
// -------------------------
// Loss & Optimization
// -------------------------
@Schema(description = "학습률", example = "0.00006")
private Double learningRate; // learning_rate
@Schema(description = "Weight Decay", example = "0.05")
private Double weightDecay; // weight_decay
@Schema(description = "Layer Decay Rate", example = "0.9")
private Double layerDecayRate; // layer_decay_rate
@Schema(description = "DDP unused params 탐색 여부", example = "true")
private Boolean ddpFindUnusedParams; // ddp_find_unused_params
@Schema(description = "Loss 계산 제외 인덱스", example = "255")
private Integer ignoreIndex; // ignore_index
@Schema(description = "레이어 깊이", example = "24")
private Integer numLayers; // num_layers
// -------------------------
// Evaluation
// -------------------------
@Schema(description = "평가 지표 목록", example = "mFscore,mIoU")
private String metrics; // metrics
@Schema(description = "Best 모델 선정 기준 지표", example = "changed_fscore")
private String saveBest; // save_best
@Schema(description = "Best 모델 선정 규칙", example = "less")
private String saveBestRule; // save_best_rule
@Schema(description = "검증 수행 주기(Epoch)", example = "10")
private Integer valInterval; // val_interval
@Schema(description = "로그 기록 주기(Iteration)", example = "400")
private Integer logInterval; // log_interval
@Schema(description = "시각화 저장 주기(Epoch)", example = "1")
private Integer visInterval; // vis_interval
// -------------------------
// Augmentation
// -------------------------
@Schema(description = "회전 적용 확률", example = "0.5")
private Double rotProb; // rot_prob
@Schema(description = "회전 각도 범위(Min,Max)", example = "-20,20")
private String rotDegree; // rot_degree
@Schema(description = "반전 적용 확률", example = "0.5")
private Double flipProb; // flip_prob
@Schema(description = "채널 교환 확률", example = "0.5")
private Double exchangeProb; // exchange_prob
@Schema(description = "밝기 변화량", example = "10")
private Integer brightnessDelta; // brightness_delta
@Schema(description = "대비 범위(Min,Max)", example = "0.8,1.2")
private String contrastRange; // contrast_range
@Schema(description = "채도 범위(Min,Max)", example = "0.8,1.2")
private String saturationRange; // saturation_range
@Schema(description = "색조 변화량", example = "10")
private Integer hueDelta; // hue_delta
// -------------------------
// Hardware
// -------------------------
@Schema(description = "사용 GPU 개수", example = "4")
private Integer gpuCnt; // gpu_cnt
@Schema(description = "사용 GPU ID 목록", example = "0,1,2,3")
private String gpuIds; // gpu_ids
@Schema(description = "분산학습 마스터 포트", example = "1122")
private Integer masterPort; // master_port
// -------------------------
// Memo
// -------------------------
@Schema(description = "메모", example = "하이퍼파라미터 신규등록")
private String memo; // memo
}
@Getter
@Setter
public static class TrainingDataConfigDto {
Summary summary;
List<Dataset> datasetList;
}
@Getter
@Setter
public static class Summary {
@Schema(description = "건물", example = "0")
private Long buildingCnt;
@Schema(description = "컨테이너", example = "0")
private Long containerCnt;
@Schema(description = "폐기물", example = "0")
private Long wasteCnt;
@Schema(
description = "도로, 비닐하우스, 밭, 과수원, 초지, 숲, 물, 모재/자갈, 토분(무덤), 일반토지, 태양광, 기타",
example = "0")
private Long LandCoverCnt;
}
@Getter
@Setter
public static class Dataset {
@Schema(description = "데이터셋 uuid")
private UUID uuid;
}
@Getter
@Setter
public static class EtcConfig {
@Schema(description = "에폭 횟수", example = "0")
private Long epochCnt;
@Schema(description = "학습데이터셋 비율 Training", example = "0")
private Integer trainingCnt;
@Schema(description = "학습데이터셋 비율 Validation", example = "0")
private Integer validationCnt;
@Schema(description = "학습데이터셋 비율 Test", example = "0")
private Integer testCnt;
@Schema(description = "메모", example = "메모 입니다.")
private String memo;
}
}

View File

@@ -1,8 +1,8 @@
package com.kamco.cd.training.model.service;
import com.kamco.cd.training.model.dto.ModelMngDto;
import com.kamco.cd.training.model.dto.ModelMngDto.Basic;
import com.kamco.cd.training.model.dto.ModelMngDto.SearchReq;
import com.kamco.cd.training.model.dto.ModelTrainDto;
import com.kamco.cd.training.model.dto.ModelTrainDto.SearchReq;
import com.kamco.cd.training.postgres.core.ModelMngCoreService;
import java.util.UUID;
import lombok.RequiredArgsConstructor;
@@ -25,7 +25,7 @@ public class ModelMngService {
* @param searchReq 검색 조건
* @return 페이징 처리된 모델 목록
*/
public Page<Basic> getModelList(SearchReq searchReq) {
public Page<ModelTrainDto.Basic> getModelList(SearchReq searchReq) {
return modelMngCoreService.findByModelList(searchReq);
}
@@ -38,6 +38,10 @@ public class ModelMngService {
modelMngCoreService.deleteModel(uuid);
}
public String createModelTrain(ModelMngDto modelMngDto) {
return null;
}
/**
* 모델 상세 조회
*

View File

@@ -109,7 +109,8 @@ public class DatasetCoreService
entity.setTitle(registerReq.getTitle());
// entity.setYear(registerReq.getYear());
entity.setGroupTitle(LearnDataType.PRODUCTION.getId());
entity.setDataYear(registerReq.getYear());
entity.setCompareYyyy(registerReq.getCompareYear());
entity.setTargetYyyy(registerReq.getTargetYyyy());
entity.setRoundNo(registerReq.getRoundNo() != null ? registerReq.getRoundNo() : 1L);
entity.setMemo(registerReq.getMemo());
entity.setStatus(LearnDataRegister.READY.getId());

View File

@@ -5,7 +5,8 @@ import com.kamco.cd.training.common.exception.CustomApiException;
import com.kamco.cd.training.common.exception.NotFoundException;
import com.kamco.cd.training.common.utils.UserUtil;
import com.kamco.cd.training.model.dto.ModelMngDto;
import com.kamco.cd.training.model.dto.ModelMngDto.Basic;
import com.kamco.cd.training.model.dto.ModelTrainDto;
import com.kamco.cd.training.model.dto.ModelTrainDto.Basic;
import com.kamco.cd.training.postgres.entity.ModelDatasetMappEntity;
import com.kamco.cd.training.postgres.entity.ModelMasterEntity;
import com.kamco.cd.training.postgres.repository.model.ModelDatasetMappRepository;
@@ -31,7 +32,7 @@ public class ModelMngCoreService {
* @param searchReq 검색 조건
* @return 페이징 처리된 모델 목록
*/
public Page<Basic> findByModelList(ModelMngDto.SearchReq searchReq) {
public Page<Basic> findByModelList(ModelTrainDto.SearchReq searchReq) {
Page<ModelMasterEntity> entityPage = modelMngRepository.findByModels(searchReq);
return entityPage.map(ModelMasterEntity::toDto);
}

View File

@@ -9,6 +9,7 @@ import jakarta.persistence.Id;
import jakarta.persistence.Table;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.time.Instant;
import java.time.ZonedDateTime;
import java.util.Map;
import java.util.UUID;
@@ -29,16 +30,16 @@ public class DatasetEntity {
@Column(name = "dataset_uid", nullable = false)
private Long id;
@Column(name = "uuid", nullable = false)
private UUID uuid;
@Size(max = 200)
@Column(name = "group_title", length = 200)
@NotNull
@Column(name = "group_title", nullable = false, length = 200)
private String groupTitle;
@Size(max = 10)
@Column(name = "data_year", length = 10)
private String dataYear;
@Column(name = "compare_yyyy", nullable = false)
private Integer compareYyyy;
@Column(name = "target_yyyy", nullable = false)
private Integer targetYyyy;
@Size(max = 50)
@ColumnDefault("'CREATE'")
@@ -65,6 +66,25 @@ public class DatasetEntity {
@Column(name = "status", length = 20)
private String status;
@Size(max = 50)
@Column(name = "reg_user_id", length = 50)
private String regUserId;
@ColumnDefault("now()")
@Column(name = "reg_dttm")
private Instant regDttm;
@Column(name = "mod_dttm")
private Instant modDttm;
@NotNull
@Column(name = "id", nullable = false)
private Long id1;
@Size(max = 50)
@Column(name = "created_by", length = 50)
private String createdBy;
@NotNull
@ColumnDefault("now()")
@Column(name = "created_dttm", nullable = false)
@@ -82,13 +102,34 @@ public class DatasetEntity {
@Column(name = "total_items")
private Long totalItems;
@Size(max = 50)
@Column(name = "updated_by", length = 50)
private String updatedBy;
@Column(name = "updated_dttm")
private ZonedDateTime updatedDttm;
@Column(name = "class_counts", columnDefinition = "jsonb")
@NotNull
@ColumnDefault("uuid_generate_v4()")
@Column(name = "uuid", nullable = false)
private UUID uuid;
@ColumnDefault("0")
@Column(name = "total_object_count")
private Long totalObjectCount;
@Size(max = 1000)
@Column(name = "dataset_path", length = 1000)
private String datasetPath;
@Column(name = "class_counts")
@JdbcTypeCode(SqlTypes.JSON)
private Map<String, Integer> classCounts;
@Size(max = 255)
@Column(name = "uid")
private String uid;
public DatasetDto.Basic toDto() {
return new DatasetDto.Basic(
this.id,

View File

@@ -1,6 +1,6 @@
package com.kamco.cd.training.postgres.entity;
import com.kamco.cd.training.model.dto.ModelMngDto;
import com.kamco.cd.training.model.dto.ModelTrainDto;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
@@ -90,8 +90,8 @@ public class ModelMasterEntity {
@Column(name = "train_type")
private String trainType;
public ModelMngDto.Basic toDto() {
return new ModelMngDto.Basic(
public ModelTrainDto.Basic toDto() {
return new ModelTrainDto.Basic(
this.id,
this.uuid,
this.modelVer,

View File

@@ -1,6 +1,6 @@
package com.kamco.cd.training.postgres.repository.model;
import com.kamco.cd.training.model.dto.ModelMngDto;
import com.kamco.cd.training.model.dto.ModelTrainDto;
import com.kamco.cd.training.postgres.entity.ModelMasterEntity;
import java.util.Optional;
import java.util.UUID;
@@ -14,7 +14,7 @@ public interface ModelMngRepositoryCustom {
* @param searchReq
* @return
*/
Page<ModelMasterEntity> findByModels(ModelMngDto.SearchReq searchReq);
Page<ModelMasterEntity> findByModels(ModelTrainDto.SearchReq searchReq);
Optional<ModelMasterEntity> findByUuid(UUID uuid);

View File

@@ -2,7 +2,7 @@ package com.kamco.cd.training.postgres.repository.model;
import static com.kamco.cd.training.postgres.entity.QModelMasterEntity.modelMasterEntity;
import com.kamco.cd.training.model.dto.ModelMngDto;
import com.kamco.cd.training.model.dto.ModelTrainDto;
import com.kamco.cd.training.postgres.entity.ModelMasterEntity;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.jpa.impl.JPAQueryFactory;
@@ -28,7 +28,7 @@ public class ModelMngRepositoryImpl implements ModelMngRepositoryCustom {
* @return
*/
@Override
public Page<ModelMasterEntity> findByModels(ModelMngDto.SearchReq req) {
public Page<ModelMasterEntity> findByModels(ModelTrainDto.SearchReq req) {
Pageable pageable = req.toPageable();
BooleanBuilder builder = new BooleanBuilder();