Skip to content

Commit

Permalink
�[DDING-000] FileMetaData DTO 생성 (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
KoSeonJe authored Oct 14, 2024
1 parent 75e7dd0 commit 3e10adc
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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();
}
}

0 comments on commit 3e10adc

Please sign in to comment.