공통코드 중복체크,등록,수정,순서저장 API 커밋

This commit is contained in:
2025-12-05 15:32:47 +09:00
parent bcce56438f
commit 3804582b82
9 changed files with 210 additions and 171 deletions

View File

@@ -15,7 +15,6 @@ import jakarta.persistence.OneToMany;
import jakarta.persistence.Table;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.time.ZonedDateTime;
import java.util.ArrayList;
import java.util.List;
@@ -97,32 +96,6 @@ public class CommonCodeEntity extends CommonDateEntity {
this.props3 = props3;
}
public CommonCodeEntity(
Long id,
String code,
String name,
String description,
Integer order,
Boolean used,
Boolean deleted,
String props1,
String props2,
String props3,
ZonedDateTime deletedDttm
) {
this.id = id;
this.code = code;
this.name = name;
this.description = description;
this.order = order;
this.used = used;
this.deleted = deleted;
this.props1 = props1;
this.props2 = props2;
this.props3 = props3;
this.deletedDttm = deletedDttm;
}
public CommonCodeDto.Basic toDto() {
return new CommonCodeDto.Basic(
this.id,
@@ -138,8 +111,7 @@ public class CommonCodeEntity extends CommonDateEntity {
this.props1,
this.props2,
this.props3,
this.deletedDttm
);
this.deletedDttm);
}
public void addParent(CommonCodeEntity parent) {
@@ -158,4 +130,14 @@ public class CommonCodeEntity extends CommonDateEntity {
public void updateOrder(int order) {
this.order = order;
}
public void update(
String name, String description, boolean used, String props1, String props2, String props3) {
this.name = name;
this.description = description;
this.used = used;
this.props1 = props1;
this.props2 = props2;
this.props3 = props3;
}
}