모델 수정/삭제 API 커밋
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
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;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "tb_model_ver")
|
||||
@NoArgsConstructor
|
||||
public class ModelVerEntity extends CommonDateEntity {
|
||||
|
||||
@Id
|
||||
@@ -57,8 +60,10 @@ public class ModelVerEntity extends CommonDateEntity {
|
||||
@Column(name = "updated_uid")
|
||||
private Long updatedUid;
|
||||
|
||||
private Boolean deleted = false;
|
||||
|
||||
public ModelVerEntity(Long id, Long modelUid, String modelCate, String modelVer, String usedState, String modelState,
|
||||
Double qualityProb, String deployState, String modelPath, Long createdUid, Long updatedUid) {
|
||||
Double qualityProb, String deployState, String modelPath, Long createdUid, Long updatedUid, Boolean deleted) {
|
||||
this.id = id;
|
||||
this.modelUid = modelUid;
|
||||
this.modelCate = modelCate;
|
||||
@@ -70,6 +75,7 @@ public class ModelVerEntity extends CommonDateEntity {
|
||||
this.modelPath = modelPath;
|
||||
this.createdUid = createdUid;
|
||||
this.updatedUid = updatedUid;
|
||||
this.deleted = deleted;
|
||||
}
|
||||
|
||||
public ModelVerEntity(Long modelUid, String modelCate, String modelVer, String usedState, String modelState,
|
||||
@@ -102,4 +108,18 @@ public class ModelVerEntity extends CommonDateEntity {
|
||||
super.getModifiedDate(),
|
||||
this.updatedUid);
|
||||
}
|
||||
|
||||
public void update(ModelMngDto.AddReq addReq) {
|
||||
this.modelCate = addReq.getModelCate();
|
||||
this.modelVer = addReq.getModelVer();
|
||||
this.modelPath = addReq.getModelPath();
|
||||
}
|
||||
|
||||
public Boolean isDeleted() {
|
||||
return deleted;
|
||||
}
|
||||
|
||||
public void deleted(){
|
||||
this.deleted = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user