Interface QuestionMapper


public interface QuestionMapper
QuestionMapper는 Question 엔티티와 관련된 데이터 변환 기능을 제공.
  • Method Details

    • createQuestionRequestToQuestion

      Question createQuestionRequestToQuestion(CreateQuestionRequest createQuestionRequest, User user, Semester semester, Category category)
      CreateQuestionRequest를 Question으로 변환합니다.
      Parameters:
      createQuestionRequest - CreateQuestionRequest
      user - User
      Returns:
      Question
    • questionToQuestionResponse

      QuestionResponse questionToQuestionResponse(Question question)
      Question을 QuestionResponse로 변환합니다.
      Parameters:
      question - Question
      Returns:
      QuestionResponse
    • createQuestionField

      default QuestionField createQuestionField(Question question, Field field)
      QuestionField를 생성합니다.
      Parameters:
      question - Question
      field - Field
      Returns:
      QuestionField
    • updateQuestionRequestToQuestion

      void updateQuestionRequestToQuestion(UpdateQuestionRequest updateQuestionRequest, Question question, Semester semester, Category category)
      CreateQuestionRequest를 Question으로 업데이트합니다.
      Parameters:
      updateQuestionRequest - UpdateQuestionRequest
      question - Question
    • projectFieldToSearchFieldResponse

      SearchFieldResponse projectFieldToSearchFieldResponse(Field field)
      Field를 SearchFieldResponse로 변환합니다.
      Parameters:
      field - Field
      Returns:
      SearchFieldResponse
    • questionToSearchQuestionResponse

      SearchQuestionResponse questionToSearchQuestionResponse(Question question, List<SearchFieldResponse> fieldList, SearchUserResponse author, SearchSemesterResponse semester, SearchLikeState likeState)
      Question을 SearchQuestionResponse로 변환합니다.
      Parameters:
      question - Question
      fieldList - List
      author - SearchUserResponse
      semester - SearchSemesterResponse
      Returns:
      SearchQuestionResponse
    • userToSearchUserResponse

      default SearchUserResponse userToSearchUserResponse(User user)
      User 엔티티를 SearchUserResponse로 변환
      Parameters:
      user - 사용자 엔티티
      Returns:
      SearchUserResponse
    • toQuestionComment

      QuestionComment toQuestionComment(CreateCommentRequest createCommentRequest, User user, Question question)
      CreateCommentRequest를 QuestionComment로 변환합니다.
      Parameters:
      createCommentRequest - CreateCommentRequest
      user - User
      question - Question
      Returns:
      QuestionComment
    • toCommentResponse

      CommentResponse toCommentResponse(QuestionComment questionComment)
      QuestionComment를 CommentResponse로 변환합니다.
      Parameters:
      questionComment - QuestionComment
      Returns:
      CommentResponse
    • toQuestionReplyComment

      QuestionReplyComment toQuestionReplyComment(CreateReplyCommentRequest createReplyCommentRequest, User user, QuestionComment questionComment)
      CreateReplyCommentRequest를 QuestionReplyComment로 변환합니다.
      Parameters:
      createReplyCommentRequest - CreateReplyCommentRequest
      user - User
      questionComment - QuestionComment
      Returns:
      QuestionReplyComment
    • toReplyCommentResponse

      ReplyCommentResponse toReplyCommentResponse(QuestionReplyComment questionReplyComment)
      QuestionReplyComment를 ReplyCommentResponse로 변환합니다.
      Parameters:
      questionReplyComment - QuestionReplyComment
      Returns:
      ReplyCommentResponse
    • toCommentWithRepliesResponse

      CommentWithRepliesResponse toCommentWithRepliesResponse(QuestionComment questionComment, Boolean likeState, List<SearchReplyCommentResponse> replies)
      QuestionComment 엔티티를 CommentWithRepliesResponse로 변환
      Parameters:
      questionComment - 질문 댓글 엔티티
      likeState - 좋아요 상태
      replies - 답글
      Returns:
      CommentWithRepliesResponse
    • toSearchReplyCommentResponse

      SearchReplyCommentResponse toSearchReplyCommentResponse(QuestionReplyComment questionReplyComment, boolean likeState)
      QuestionReplyComment 엔티티를 SearchReplyCommentResponse로 변환
      Parameters:
      questionReplyComment - 질문 답글 엔티티
      likeState - 좋아요 상태
      Returns:
      SearchReplyCommentResponse
    • createQuestionCommentLike

      default QuestionCommentLike createQuestionCommentLike(User user, QuestionComment questionComment)
    • createQuestionReplyCommentLike

      default QuestionReplyCommentLike createQuestionReplyCommentLike(User user, QuestionReplyComment questionReplyComment)
      QuestionReplyCommentLike를 생성합니다.
      Parameters:
      user - User
      questionReplyComment - QuestionReplyComment
      Returns:
      QuestionReplyCommentLike
    • createQuestionLike

      default QuestionLike createQuestionLike(User user, Question question)
      QuestionLike를 생성합니다.
      Parameters:
      user - User
      question - Question
      Returns:
      QuestionLike
    • questionToSearchLikeState

      SearchLikeState questionToSearchLikeState(Boolean like)