공통코드 삭제 API 커밋, 삭제일시 컬럼 추가, 에러로그에 userId 토큰으로 로직 변경

This commit is contained in:
2025-12-05 12:07:03 +09:00
parent 88cdfa7ce7
commit eeef8c8d32
8 changed files with 130 additions and 23 deletions

View File

@@ -15,6 +15,8 @@ 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;
import lombok.AccessLevel;
@@ -73,6 +75,9 @@ public class CommonCodeEntity extends CommonDateEntity {
@Column(name = "props3")
private String props3;
@Column(name = "deleted_dttm")
private ZonedDateTime deletedDttm;
public CommonCodeEntity(
String code,
String name,
@@ -102,7 +107,9 @@ public class CommonCodeEntity extends CommonDateEntity {
Boolean deleted,
String props1,
String props2,
String props3) {
String props3,
ZonedDateTime deletedDttm
) {
this.id = id;
this.code = code;
this.name = name;
@@ -113,6 +120,7 @@ public class CommonCodeEntity extends CommonDateEntity {
this.props1 = props1;
this.props2 = props2;
this.props3 = props3;
this.deletedDttm = deletedDttm;
}
public CommonCodeDto.Basic toDto() {
@@ -129,7 +137,9 @@ public class CommonCodeEntity extends CommonDateEntity {
super.getModifiedDate(),
this.props1,
this.props2,
this.props3);
this.props3,
this.deletedDttm
);
}
public void addParent(CommonCodeEntity parent) {
@@ -142,6 +152,7 @@ public class CommonCodeEntity extends CommonDateEntity {
public void deleted() {
this.deleted = true;
this.deletedDttm = ZonedDateTime.now();
}
public void updateOrder(int order) {