From 1628286ddc5a5e8477cc41cd838e6517b41aa71d Mon Sep 17 00:00:00 2001 From: ChaHyeonMin Date: Tue, 14 May 2024 17:14:53 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=EB=9D=BC=EC=9D=B8=EC=97=85=20?= =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=97=94=ED=8B=B0=ED=8B=B0?= =?UTF-8?q?=EC=97=90=20blurData=20=ED=95=84=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../council/domain/danfesta/model/dto/LineUpImageDto.java | 4 ++++ .../council/domain/danfesta/model/entity/LineUpImage.java | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/dku/council/domain/danfesta/model/dto/LineUpImageDto.java b/src/main/java/com/dku/council/domain/danfesta/model/dto/LineUpImageDto.java index 3d0cd570..b7c23268 100644 --- a/src/main/java/com/dku/council/domain/danfesta/model/dto/LineUpImageDto.java +++ b/src/main/java/com/dku/council/domain/danfesta/model/dto/LineUpImageDto.java @@ -23,12 +23,16 @@ public class LineUpImageDto { @Schema(description = "이미지 파일 타입", example = "image/jpeg") private final String mimeType; + @Schema(description = "blur 데이터") + private final String blurData; + public LineUpImageDto(ObjectUploadContext context, LineUpImage image) { this.url = context.getImageUrl(image.getFileId()); this.originalName = image.getFileName(); String imageMimeType = image.getMimeType(); this.mimeType = Objects.requireNonNullElse(imageMimeType, MediaType.APPLICATION_OCTET_STREAM_VALUE); + this.blurData = image.getBlurData(); } public static List listOf(ObjectUploadContext context, List entities) { diff --git a/src/main/java/com/dku/council/domain/danfesta/model/entity/LineUpImage.java b/src/main/java/com/dku/council/domain/danfesta/model/entity/LineUpImage.java index fd7cca7a..a071573d 100644 --- a/src/main/java/com/dku/council/domain/danfesta/model/entity/LineUpImage.java +++ b/src/main/java/com/dku/council/domain/danfesta/model/entity/LineUpImage.java @@ -28,11 +28,15 @@ public class LineUpImage extends BaseEntity { private String fileName; + @Lob + private String blurData; + @Builder - private LineUpImage(String fileId, String mimeType, String fileName) { + private LineUpImage(String fileId, String mimeType, String fileName, String blurData) { this.fileId = fileId; this.mimeType = mimeType; this.fileName = fileName; + this.blurData = blurData; } public void changeLineUp(LineUp lineUp) {