File tree Expand file tree Collapse file tree
src/main/java/flipnote/reaction Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66import flipnote .reaction .bookmark .entity .Bookmark ;
77
88public record BookmarkResponse (
9- String targetType ,
10- Long targetId ,
11- Long targetGroupId ,
9+ BookmarkTargetResponse target ,
1210 LocalDateTime bookmarkedAt
1311) {
1412 public static BookmarkResponse from (Bookmark bookmark , CardSetSummary summary ) {
1513 return new BookmarkResponse (
16- bookmark .getTargetType ().name (),
17- bookmark .getTargetId (),
18- summary != null ? summary .getGroupId () : null ,
14+ new BookmarkTargetResponse (
15+ bookmark .getTargetType ().name (),
16+ bookmark .getTargetId (),
17+ summary != null ? summary .getGroupId () : null ,
18+ summary != null ? summary .getName () : null
19+ ),
1920 bookmark .getCreatedAt ()
2021 );
2122 }
Original file line number Diff line number Diff line change 1+ package flipnote .reaction .bookmark .model .response ;
2+
3+ public record BookmarkTargetResponse (
4+ String type ,
5+ Long id ,
6+ Long groupId ,
7+ String name
8+ ) {
9+ }
Original file line number Diff line number Diff line change 66import flipnote .reaction .like .entity .Like ;
77
88public record LikeResponse (
9- String targetType ,
10- Long targetId ,
11- Long targetGroupId ,
9+ LikeTargetResponse target ,
1210 LocalDateTime likedAt
1311) {
1412 public static LikeResponse from (Like like , CardSetSummary summary ) {
1513 return new LikeResponse (
16- like .getTargetType ().name (),
17- like .getTargetId (),
18- summary != null ? summary .getGroupId () : null ,
14+ new LikeTargetResponse (
15+ like .getTargetType ().name (),
16+ like .getTargetId (),
17+ summary != null ? summary .getGroupId () : null ,
18+ summary != null ? summary .getName () : null
19+ ),
1920 like .getCreatedAt ()
2021 );
2122 }
Original file line number Diff line number Diff line change 1+ package flipnote .reaction .like .model .response ;
2+
3+ public record LikeTargetResponse (
4+ String type ,
5+ Long id ,
6+ Long groupId ,
7+ String name
8+ ) {
9+ }
You can’t perform that action at this time.
0 commit comments