-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
75 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 12 additions & 2 deletions
14
src/main/java/com/mookive/mookive_backend/watched/application/mapper/WatchedMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
package com.mookive.mookive_backend.watched.application.mapper; | ||
|
||
|
||
import com.mookive.mookive_backend.movie.domain.entity.Movie; | ||
import com.mookive.mookive_backend.user.domain.entity.User; | ||
import com.mookive.mookive_backend.watched.domain.entity.Watched; | ||
import com.mookive.mookive_backend.watched.application.dto.response.WatchedResponse; | ||
|
||
public class WatchedMapper { | ||
|
||
public static WatchedResponse.WatchedCheckResponse toWatchedCheckResponse(boolean isWatched) { | ||
return new WatchedResponse.WatchedCheckResponse(isWatched); | ||
public static Watched mapToWatched(User user, Movie movie) { | ||
return Watched.builder() | ||
.user(user) | ||
.movie(movie) | ||
.build(); | ||
|
||
public static WatchedResponse.WatchedCheckResponse toWatchedCheckResponse(boolean isWatched) { | ||
return new WatchedResponse.WatchedCheckResponse(isWatched); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters