Skip to content

Commit

Permalink
Merge pull request #127 from dongkyun0713/dongkyun
Browse files Browse the repository at this point in the history
매칭게시글 조회 시 유저 아이디 조회 가능
  • Loading branch information
dongkyun0713 authored Feb 28, 2024
2 parents 783f1dd + 31b206d commit 6e64933
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
public class MatchingPostResponseDto {

private Long matchingPostId;
private Long matchingPostAuthorId;
private String authorNickName;
private String profile;
private String category;
Expand All @@ -29,6 +30,7 @@ public static MatchingPostResponseDto of(
MatchingPost matchingPost) {
return new MatchingPostResponseDto(
matchingPost.getMatchingPostId(),
matchingPost.getUser().getId(),
matchingPost.getUser().getNickname(),
matchingPost.getUser().getProfile(),
String.valueOf(matchingPost.getCategory()),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
package com.example.titto_backend.matchingBoard.dto.response.matchingPostReviewResponse;

import com.example.titto_backend.matchingBoard.domain.review.MatchingPostReview;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class MatchingPostReviewResponseDto {

private Long reviewAuthorId;
private Long reviewId;
private String reviewAuthor;
private String profile;
Expand All @@ -22,6 +21,7 @@ public class MatchingPostReviewResponseDto {
private Integer level;

public MatchingPostReviewResponseDto(MatchingPostReview matchingPostReview) {
this.reviewAuthorId = matchingPostReview.getReviewAuthor().getId();
this.reviewId = matchingPostReview.getReview_id();
this.reviewAuthor = matchingPostReview.getReviewAuthor().getNickname();
this.profile = matchingPostReview.getReviewAuthor().getProfile();
Expand Down

0 comments on commit 6e64933

Please sign in to comment.