Skip to content

Commit

Permalink
feat: 동영상 엔티티 필드명 수정
Browse files Browse the repository at this point in the history
- `fileUrl` -> `videoUrl`
  • Loading branch information
SJ70 committed Aug 14, 2024
1 parent 31880dd commit 94e3917
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/j9/bestmoments/domain/Video.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class Video {

@Id
private UUID id;
private String fileUrl;
private String videoUrl;
private String title;
@Lob
private String description;
Expand Down Expand Up @@ -84,8 +84,8 @@ public void setVideoTags(List<String> tags) {
this.tags = tags;
}

public void setFileUrl(String fileUrl) {
this.fileUrl = fileUrl;
public void setVideoUrl(String videoUrl) {
this.videoUrl = videoUrl;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public record VideoFindDto(
public static VideoFindDto of (Video video) {
return new VideoFindDto(
video.getId(),
video.getFileUrl(),
video.getVideoUrl(),
video.getTitle(),
video.getDescription(),
video.getUploader().getId(),
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/j9/bestmoments/service/VideoService.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public Video upload(Member member, VideoCreateDto createDto) {
.title(createDto.title())
.description(createDto.description())
.build();
String fileName = FileNameGenerator.generateVideoFileName(video);
String fileUrl = storageService.uploadFile(createDto.video(), fileName);
video.setFileUrl(fileUrl);
String videoName = FileNameGenerator.generateVideoFileName(video);
String videoUrl = storageService.uploadFile(createDto.video(), videoName);
video.setVideoUrl(videoUrl);
videoRepository.save(video);
return video;
}
Expand Down

0 comments on commit 94e3917

Please sign in to comment.