공통코드 기능 수정
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
package com.kamco.cd.kamcoback.code.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
|
||||
import com.kamco.cd.kamcoback.postgres.entity.CommonCodeEntity;
|
||||
import com.kamco.cd.kamcoback.zoo.dto.AnimalDto.Category;
|
||||
import com.kamco.cd.kamcoback.zoo.dto.AnimalDto.Species;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import java.time.Instant;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -18,7 +15,7 @@ import lombok.Setter;
|
||||
|
||||
public class CommonCodeDto {
|
||||
|
||||
@Schema(name = "CodeAddReq", description = "코드저장 요청")
|
||||
@Schema(name = "CodeAddReq", description = "공통코드 저장 정보")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@@ -35,19 +32,31 @@ public class CommonCodeDto {
|
||||
private Long parentId;
|
||||
}
|
||||
|
||||
@Schema(name = "AnimalBasic", description = "동물 기본 정보")
|
||||
@Schema(name = "CodeModifyReq", description = "공통코드 수정 정보")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class ModifyReq {
|
||||
@NotEmpty
|
||||
private String name;
|
||||
private String description;
|
||||
private int order;
|
||||
private boolean used;
|
||||
}
|
||||
|
||||
@Schema(name = "CommonCode Basic", description = "공통코드 기본 정보")
|
||||
@Getter
|
||||
public static class Basic {
|
||||
|
||||
@JsonIgnore
|
||||
private Long id;
|
||||
private String codeCd;
|
||||
private String cdCt;
|
||||
private String cdNm;
|
||||
private Integer cdOdr;
|
||||
private String code;
|
||||
private String description;
|
||||
private String name;
|
||||
private Integer order;
|
||||
private Boolean used;
|
||||
private Boolean deleted;
|
||||
CommonCodeEntity parent;
|
||||
private List<CommonCodeDto.Basic> children;
|
||||
|
||||
@JsonFormatDttm
|
||||
private ZonedDateTime createdDttm;
|
||||
@@ -57,23 +66,23 @@ public class CommonCodeDto {
|
||||
|
||||
public Basic(
|
||||
Long id,
|
||||
String codeCd,
|
||||
String cdCt,
|
||||
String cdNm,
|
||||
Integer cdOdr,
|
||||
String code,
|
||||
String description,
|
||||
String name,
|
||||
Integer order,
|
||||
Boolean used,
|
||||
Boolean deleted,
|
||||
CommonCodeEntity parent,
|
||||
List<CommonCodeDto.Basic> children,
|
||||
ZonedDateTime createdDttm,
|
||||
ZonedDateTime updatedDttm) {
|
||||
this.id = id;
|
||||
this.codeCd = codeCd;
|
||||
this.cdCt = cdCt;
|
||||
this.cdNm = cdNm;
|
||||
this.cdOdr = cdOdr;
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
this.name = name;
|
||||
this.order = order;
|
||||
this.used = used;
|
||||
this.deleted = deleted;
|
||||
this.parent = parent;
|
||||
this.children = children;
|
||||
this.createdDttm = createdDttm;
|
||||
this.updatedDttm = updatedDttm;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user