JsonFormat
This commit is contained in:
@@ -2,10 +2,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 lombok.AllArgsConstructor;
|
||||
@@ -23,7 +25,9 @@ public class CommonCodeDto {
|
||||
@AllArgsConstructor
|
||||
public static class AddReq {
|
||||
|
||||
@NotEmpty
|
||||
private String code;
|
||||
@NotEmpty
|
||||
private String name;
|
||||
private String description;
|
||||
private int order;
|
||||
@@ -45,17 +49,11 @@ public class CommonCodeDto {
|
||||
private Boolean deleted;
|
||||
CommonCodeEntity parent;
|
||||
|
||||
@JsonFormat(
|
||||
shape = JsonFormat.Shape.STRING,
|
||||
pattern = "yyyy-MM-dd'T'HH:mm:ssXXX",
|
||||
timezone = "Asia/Seoul")
|
||||
private ZonedDateTime createdAt;
|
||||
@JsonFormatDttm
|
||||
private ZonedDateTime createdDttm;
|
||||
|
||||
@JsonFormat(
|
||||
shape = JsonFormat.Shape.STRING,
|
||||
pattern = "yyyy-MM-dd'T'HH:mm:ssXXX",
|
||||
timezone = "Asia/Seoul")
|
||||
private ZonedDateTime updatedAt;
|
||||
@JsonFormatDttm
|
||||
private ZonedDateTime updatedDttm;
|
||||
|
||||
public Basic(
|
||||
Long id,
|
||||
@@ -66,8 +64,8 @@ public class CommonCodeDto {
|
||||
Boolean used,
|
||||
Boolean deleted,
|
||||
CommonCodeEntity parent,
|
||||
ZonedDateTime createdAt,
|
||||
ZonedDateTime updatedAt) {
|
||||
ZonedDateTime createdDttm,
|
||||
ZonedDateTime updatedDttm) {
|
||||
this.id = id;
|
||||
this.codeCd = codeCd;
|
||||
this.cdCt = cdCt;
|
||||
@@ -76,8 +74,8 @@ public class CommonCodeDto {
|
||||
this.used = used;
|
||||
this.deleted = deleted;
|
||||
this.parent = parent;
|
||||
this.createdAt = createdAt;
|
||||
this.updatedAt = updatedAt;
|
||||
this.createdDttm = createdDttm;
|
||||
this.updatedDttm = updatedDttm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user