모델관리, 모델버전 조회,등록 진행중
This commit is contained in:
@@ -51,7 +51,7 @@ public class MapSheetAnalEntity {
|
||||
@Column(name = "anal_end_dttm")
|
||||
private ZonedDateTime analEndDttm;
|
||||
|
||||
@Column(name = "anal_ss")
|
||||
@Column(name = "anal_sec")
|
||||
private Integer analSs;
|
||||
|
||||
@Size(max = 20)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.kamco.cd.kamcoback.postgres.entity;
|
||||
|
||||
import com.kamco.cd.kamcoback.model.dto.ModelMngDto;
|
||||
import com.kamco.cd.kamcoback.postgres.CommonDateEntity;
|
||||
import jakarta.persistence.*;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Getter;
|
||||
@@ -13,7 +14,7 @@ import java.time.ZonedDateTime;
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "tb_model_mng")
|
||||
public class ModelMngEntity {
|
||||
public class ModelMngEntity extends CommonDateEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tb_model_mng_id_gen")
|
||||
@@ -36,30 +37,35 @@ public class ModelMngEntity {
|
||||
@Column(name = "model_path")
|
||||
private String modelPath;
|
||||
|
||||
@Column(name = "created_dttm")
|
||||
private ZonedDateTime createdDttm;
|
||||
|
||||
@Column(name = "created_uid")
|
||||
private Long createdUid;
|
||||
|
||||
@Column(name = "updated_dttm")
|
||||
private ZonedDateTime updatedDttm;
|
||||
|
||||
@Column(name = "updated_uid")
|
||||
private Long updatedUid;
|
||||
|
||||
@Column(name = "model_cntnt", columnDefinition = "TEXT")
|
||||
private String modelCntnt;
|
||||
|
||||
public ModelMngEntity(String modelNm, String modelCate, String modelPath,
|
||||
Long createdUid, Long updatedUid, String modelCntnt) {
|
||||
this.modelNm = modelNm;
|
||||
this.modelCate = modelCate;
|
||||
this.modelPath = modelPath;
|
||||
this.modelCntnt = modelCntnt;
|
||||
|
||||
this.createdUid = createdUid;
|
||||
this.updatedUid = updatedUid;
|
||||
}
|
||||
|
||||
public ModelMngDto.Basic toDto() {
|
||||
return new ModelMngDto.Basic(
|
||||
this.id,
|
||||
this.modelNm,
|
||||
this.modelCate,
|
||||
this.modelPath,
|
||||
this.createdDttm,
|
||||
super.getCreatedDate(),
|
||||
this.createdUid,
|
||||
this.updatedDttm,
|
||||
super.getModifiedDate(),
|
||||
this.updatedUid,
|
||||
this.modelCntnt);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.kamco.cd.kamcoback.postgres.entity;
|
||||
|
||||
import com.kamco.cd.kamcoback.model.dto.ModelMngDto;
|
||||
import com.kamco.cd.kamcoback.model.dto.ModelVerDto;
|
||||
import com.kamco.cd.kamcoback.postgres.CommonDateEntity;
|
||||
import jakarta.persistence.*;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
@@ -13,7 +16,7 @@ import java.time.ZonedDateTime;
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "tb_model_ver")
|
||||
public class ModelVerEntity {
|
||||
public class ModelVerEntity extends CommonDateEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tb_model_ver_id_gen")
|
||||
@@ -52,17 +55,40 @@ public class ModelVerEntity {
|
||||
@Column(name = "model_path")
|
||||
private String modelPath;
|
||||
|
||||
@ColumnDefault("now()")
|
||||
@Column(name = "created_dttm")
|
||||
private ZonedDateTime createdDttm;
|
||||
|
||||
@Column(name = "created_uid")
|
||||
private Long createdUid;
|
||||
|
||||
@Column(name = "updated_dttm")
|
||||
private ZonedDateTime updatedDttm;
|
||||
|
||||
@Column(name = "updated_uid")
|
||||
private Long updatedUid;
|
||||
|
||||
public ModelVerEntity(Long modelUid, String modelCate, String modelVer, String usedState, String modelState,
|
||||
Double qualityProb, String deployState, String modelPath, Long createdUid, Long updatedUid) {
|
||||
this.modelUid = modelUid;
|
||||
this.modelCate = modelCate;
|
||||
this.modelVer = modelVer;
|
||||
this.usedState = usedState;
|
||||
this.modelState = modelState;
|
||||
this.qualityProb = qualityProb;
|
||||
this.deployState = deployState;
|
||||
this.modelPath = modelPath;
|
||||
this.createdUid = createdUid;
|
||||
this.updatedUid = updatedUid;
|
||||
}
|
||||
|
||||
public ModelVerDto.Basic toDto() {
|
||||
return new ModelVerDto.Basic(
|
||||
this.id,
|
||||
this.modelUid,
|
||||
this.modelCate,
|
||||
this.modelVer,
|
||||
this.usedState,
|
||||
this.modelState,
|
||||
this.qualityProb,
|
||||
this.deployState,
|
||||
this.modelPath,
|
||||
super.getCreatedDate(),
|
||||
this.createdUid,
|
||||
super.getModifiedDate(),
|
||||
this.updatedUid);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user