모델관리 테이블 변경 : mgmt 미사용 -> mng 재사용
This commit is contained in:
@@ -1,119 +0,0 @@
|
||||
package com.kamco.cd.kamcoback.model.dto;
|
||||
|
||||
import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.ZonedDateTime;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
|
||||
public class ModelMgmtDto {
|
||||
|
||||
@Schema(name = "ModelMgmtDto Basic", description = "모델관리 엔티티 기본 정보")
|
||||
@Getter
|
||||
@NoArgsConstructor
|
||||
public static class Basic {
|
||||
|
||||
private String modelVer;
|
||||
private String hyperVer;
|
||||
private String epochVer;
|
||||
private String dockerFileNm;
|
||||
|
||||
@JsonFormatDttm private ZonedDateTime createCompleteDttm;
|
||||
@JsonFormatDttm private ZonedDateTime recentUseDttm;
|
||||
private Boolean deleted;
|
||||
@JsonFormatDttm private ZonedDateTime createdDttm;
|
||||
private Long createdUid;
|
||||
|
||||
@JsonFormatDttm private ZonedDateTime updatedDttm;
|
||||
private Long updatedUid;
|
||||
|
||||
public Basic(
|
||||
String modelVer,
|
||||
String hyperVer,
|
||||
String epochVer,
|
||||
String dockerFileNm,
|
||||
ZonedDateTime createCompleteDttm,
|
||||
ZonedDateTime recentUseDttm,
|
||||
Boolean deleted,
|
||||
ZonedDateTime createdDttm,
|
||||
Long createdUid,
|
||||
ZonedDateTime updatedDttm,
|
||||
Long updatedUid) {
|
||||
this.modelVer = modelVer;
|
||||
this.hyperVer = hyperVer;
|
||||
this.epochVer = epochVer;
|
||||
this.dockerFileNm = dockerFileNm;
|
||||
this.createCompleteDttm = createCompleteDttm;
|
||||
this.recentUseDttm = recentUseDttm;
|
||||
this.deleted = deleted;
|
||||
this.createdDttm = createdDttm;
|
||||
this.createdUid = createdUid;
|
||||
this.updatedDttm = updatedDttm;
|
||||
this.updatedUid = updatedUid;
|
||||
}
|
||||
}
|
||||
|
||||
@Schema(name = "ModelList", description = "모델관리 목록")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class ModelList {
|
||||
private Integer rowNum;
|
||||
private String modelVer;
|
||||
private String dockerFileNm;
|
||||
private String modelType;
|
||||
private String createCompleteDttm;
|
||||
private String recentUseDttm; // TODO: 추론관리 테이블 나오면 분석진행중일 때 사용중으로 리턴하기
|
||||
private BigDecimal f1Score;
|
||||
private BigDecimal precision;
|
||||
private BigDecimal recall;
|
||||
private BigDecimal accuracy;
|
||||
private BigDecimal iou;
|
||||
private Boolean deleted;
|
||||
}
|
||||
|
||||
@Schema(name = "ModelAddReq", description = "모델 등록 req")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class AddReq {
|
||||
|
||||
private String modelType;
|
||||
private String dockerFileNm;
|
||||
private String modelVer;
|
||||
private String hyperVer;
|
||||
private String epochVer;
|
||||
}
|
||||
|
||||
@Schema(name = "searchReq", description = "검색 요청")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class searchReq {
|
||||
|
||||
// 페이징 파라미터
|
||||
private int page = 0;
|
||||
private int size = 20;
|
||||
private String sort;
|
||||
|
||||
public Pageable toPageable() {
|
||||
if (sort != null && !sort.isEmpty()) {
|
||||
String[] sortParams = sort.split(",");
|
||||
String property = sortParams[0];
|
||||
Sort.Direction direction =
|
||||
sortParams.length > 1 ? Sort.Direction.fromString(sortParams[1]) : Sort.Direction.ASC;
|
||||
return PageRequest.of(page, size, Sort.by(direction, property));
|
||||
}
|
||||
return PageRequest.of(page, size);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.kamco.cd.kamcoback.model.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
public class ModelMngBakDto {
|
||||
|
||||
@Schema(name = "AddReq", description = "등록 req")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class AddReq{
|
||||
private String modelCate;
|
||||
private String modelVer;
|
||||
private String modelPath;
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package com.kamco.cd.kamcoback.model.dto;
|
||||
|
||||
import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.ZonedDateTime;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
@@ -14,98 +14,86 @@ import org.springframework.data.domain.Sort;
|
||||
|
||||
public class ModelMngDto {
|
||||
|
||||
@Schema(name = "ModelMng Basic", description = "모델관리 엔티티 기본 정보")
|
||||
@Schema(name = "ModelMgmtDto Basic", description = "모델관리 엔티티 기본 정보")
|
||||
@Getter
|
||||
@NoArgsConstructor
|
||||
public static class Basic {
|
||||
|
||||
private final Long id;
|
||||
private final String modelNm;
|
||||
private final String modelCate;
|
||||
private final String modelPath;
|
||||
private String modelVer;
|
||||
private String hyperVer;
|
||||
private String epochVer;
|
||||
private String dockerFileNm;
|
||||
|
||||
@JsonFormatDttm private final ZonedDateTime createdDttm;
|
||||
private final Long createdUid;
|
||||
@JsonFormatDttm private ZonedDateTime createCompleteDttm;
|
||||
@JsonFormatDttm private ZonedDateTime recentUseDttm;
|
||||
private Boolean deleted;
|
||||
@JsonFormatDttm private ZonedDateTime createdDttm;
|
||||
private Long createdUid;
|
||||
|
||||
@JsonFormatDttm private final ZonedDateTime updatedDttm;
|
||||
private final Long updatedUid;
|
||||
private final String modelCntnt;
|
||||
@JsonFormatDttm private ZonedDateTime updatedDttm;
|
||||
private Long updatedUid;
|
||||
|
||||
public Basic(
|
||||
Long id,
|
||||
String modelNm,
|
||||
String modelCate,
|
||||
String modelPath,
|
||||
String modelVer,
|
||||
String hyperVer,
|
||||
String epochVer,
|
||||
String dockerFileNm,
|
||||
ZonedDateTime createCompleteDttm,
|
||||
ZonedDateTime recentUseDttm,
|
||||
Boolean deleted,
|
||||
ZonedDateTime createdDttm,
|
||||
Long createdUid,
|
||||
ZonedDateTime updatedDttm,
|
||||
Long updatedUid,
|
||||
String modelCntnt) {
|
||||
this.id = id;
|
||||
this.modelNm = modelNm;
|
||||
this.modelCate = modelCate;
|
||||
this.modelPath = modelPath;
|
||||
Long updatedUid) {
|
||||
this.modelVer = modelVer;
|
||||
this.hyperVer = hyperVer;
|
||||
this.epochVer = epochVer;
|
||||
this.dockerFileNm = dockerFileNm;
|
||||
this.createCompleteDttm = createCompleteDttm;
|
||||
this.recentUseDttm = recentUseDttm;
|
||||
this.deleted = deleted;
|
||||
this.createdDttm = createdDttm;
|
||||
this.createdUid = createdUid;
|
||||
this.updatedDttm = updatedDttm;
|
||||
this.updatedUid = updatedUid;
|
||||
this.modelCntnt = modelCntnt;
|
||||
}
|
||||
}
|
||||
|
||||
@Schema(name = "FinalModelDto", description = "최종 등록 모델")
|
||||
@Schema(name = "ModelList", description = "모델관리 목록")
|
||||
@Getter
|
||||
public static class FinalModelDto {
|
||||
private final Long modelUid;
|
||||
private final String modelNm;
|
||||
private final String modelCate;
|
||||
private final Long modelVerUid;
|
||||
private final String modelVer;
|
||||
private final String usedState;
|
||||
private final String modelState;
|
||||
private final Double qualityProb;
|
||||
private final String deployState;
|
||||
private final String modelPath;
|
||||
|
||||
public FinalModelDto(
|
||||
Long modelUid,
|
||||
String modelNm,
|
||||
String modelCate,
|
||||
Long modelVerUid,
|
||||
String modelVer,
|
||||
String usedState,
|
||||
String modelState,
|
||||
Double qualityProb,
|
||||
String deployState,
|
||||
String modelPath) {
|
||||
this.modelUid = modelUid;
|
||||
this.modelNm = modelNm;
|
||||
this.modelCate = modelCate;
|
||||
this.modelVerUid = modelVerUid;
|
||||
this.modelVer = modelVer;
|
||||
this.usedState = usedState;
|
||||
this.deployState = deployState;
|
||||
this.modelState = modelState;
|
||||
this.qualityProb = qualityProb;
|
||||
this.modelPath = modelPath;
|
||||
}
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class ModelList {
|
||||
private Integer rowNum;
|
||||
private String modelVer;
|
||||
private String dockerFileNm;
|
||||
private String modelType;
|
||||
private String createCompleteDttm;
|
||||
private String recentUseDttm; // TODO: 추론관리 테이블 나오면 분석진행중일 때 사용중으로 리턴하기
|
||||
private BigDecimal f1Score;
|
||||
private BigDecimal precision;
|
||||
private BigDecimal recall;
|
||||
private BigDecimal accuracy;
|
||||
private BigDecimal iou;
|
||||
private Boolean deleted;
|
||||
}
|
||||
|
||||
@Schema(name = "ModelAddReq", description = "모델 버전 등록 req")
|
||||
@Schema(name = "ModelAddReq", description = "모델 등록 req")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class AddReq {
|
||||
|
||||
private String modelNm;
|
||||
private String modelCate;
|
||||
private String modelPath;
|
||||
|
||||
@NotEmpty private String modelVer;
|
||||
private String modelCntnt;
|
||||
private String modelType;
|
||||
private String dockerFileNm;
|
||||
private String modelVer;
|
||||
private String hyperVer;
|
||||
private String epochVer;
|
||||
}
|
||||
|
||||
@Schema(name = "searchReq", description = "등록이력보기 검색 요청")
|
||||
@Schema(name = "searchReq", description = "검색 요청")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@@ -128,29 +116,4 @@ public class ModelMngDto {
|
||||
return PageRequest.of(page, size);
|
||||
}
|
||||
}
|
||||
|
||||
@Schema(name = "ModelRegHistory", description = "모델 등록 이력")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class ModelRegHistory {
|
||||
private String modelNm;
|
||||
private String modelCate;
|
||||
private String modelVer;
|
||||
private String strCreatedDttm;
|
||||
private String usedState;
|
||||
private String deployState;
|
||||
private String strDeployDttm;
|
||||
}
|
||||
|
||||
@Schema(name = "ModelDmlReturn", description = "모델 등록/수정/삭제 리턴")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class ModelDmlReturn {
|
||||
private String execStatus;
|
||||
private String message;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user