From 3e10adc83e6380a4e0d3d6acdd96b7811b58836c Mon Sep 17 00:00:00 2001 From: koseonje <127813439+KoSeonJe@users.noreply.github.com> Date: Mon, 14 Oct 2024 22:08:39 +0900 Subject: [PATCH] =?UTF-8?q?=08[DDING-000]=20FileMetaData=20DTO=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20(#145)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/dto/FileMetaDataCommand.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/main/java/ddingdong/ddingdongBE/domain/filemetadata/service/dto/FileMetaDataCommand.java diff --git a/src/main/java/ddingdong/ddingdongBE/domain/filemetadata/service/dto/FileMetaDataCommand.java b/src/main/java/ddingdong/ddingdongBE/domain/filemetadata/service/dto/FileMetaDataCommand.java new file mode 100644 index 00000000..85dc31bb --- /dev/null +++ b/src/main/java/ddingdong/ddingdongBE/domain/filemetadata/service/dto/FileMetaDataCommand.java @@ -0,0 +1,21 @@ +package ddingdong.ddingdongBE.domain.filemetadata.service.dto; + +import ddingdong.ddingdongBE.domain.filemetadata.entity.FileCategory; +import ddingdong.ddingdongBE.domain.filemetadata.entity.FileMetaData; +import java.util.UUID; +import lombok.Builder; + +@Builder +public record FileMetaDataCommand( + UUID fileId, + String fileName +) { + + public FileMetaData toEntity(FileCategory fileCategory) { + return FileMetaData.builder() + .fileCategory(fileCategory) + .fileId(fileId) + .fileName(fileName) + .build(); + } +}