공통코드 추가
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
package com.kamco.cd.kamcoback.code.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
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 java.time.Instant;
|
||||
import java.time.ZonedDateTime;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
|
||||
public class CommonCodeDto {
|
||||
|
||||
@Schema(name = "CodeAddReq", description = "코드저장 요청")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class AddReq {
|
||||
|
||||
private String code;
|
||||
private String name;
|
||||
private String description;
|
||||
private int order;
|
||||
private boolean used;
|
||||
private Long parentId;
|
||||
}
|
||||
|
||||
@Schema(name = "AnimalBasic", description = "동물 기본 정보")
|
||||
@Getter
|
||||
public static class Basic {
|
||||
|
||||
@JsonIgnore
|
||||
private Long id;
|
||||
private String codeCd;
|
||||
private String cdCt;
|
||||
private String cdNm;
|
||||
private Integer cdOdr;
|
||||
private Boolean used;
|
||||
private Boolean deleted;
|
||||
CommonCodeEntity parent;
|
||||
|
||||
@JsonFormat(
|
||||
shape = JsonFormat.Shape.STRING,
|
||||
pattern = "yyyy-MM-dd'T'HH:mm:ssXXX",
|
||||
timezone = "Asia/Seoul")
|
||||
private ZonedDateTime createdAt;
|
||||
|
||||
@JsonFormat(
|
||||
shape = JsonFormat.Shape.STRING,
|
||||
pattern = "yyyy-MM-dd'T'HH:mm:ssXXX",
|
||||
timezone = "Asia/Seoul")
|
||||
private ZonedDateTime updatedAt;
|
||||
|
||||
public Basic(
|
||||
Long id,
|
||||
String codeCd,
|
||||
String cdCt,
|
||||
String cdNm,
|
||||
Integer cdOdr,
|
||||
Boolean used,
|
||||
Boolean deleted,
|
||||
CommonCodeEntity parent,
|
||||
ZonedDateTime createdAt,
|
||||
ZonedDateTime updatedAt) {
|
||||
this.id = id;
|
||||
this.codeCd = codeCd;
|
||||
this.cdCt = cdCt;
|
||||
this.cdNm = cdNm;
|
||||
this.cdOdr = cdOdr;
|
||||
this.used = used;
|
||||
this.deleted = deleted;
|
||||
this.parent = parent;
|
||||
this.createdAt = createdAt;
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user