Skip to content

Commit

Permalink
Merge pull request EveryUniv#190 from gutanbug/dev_deploy
Browse files Browse the repository at this point in the history
fix : 라인업 이미지 엔티티에 blurData 필드 추가
  • Loading branch information
gutanbug authored May 14, 2024
2 parents e3470f7 + 1628286 commit 19d2b0d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<LineUpImageDto> listOf(ObjectUploadContext context, List<LineUpImage> entities) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 19d2b0d

Please sign in to comment.