-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from miinyeong/main
Fix: answer create API 수정
- Loading branch information
Showing
3 changed files
with
71 additions
and
17 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
32 changes: 32 additions & 0 deletions
32
src/main/java/com/onestep/server/entity/answer/AnswerGroupQuestionDTO.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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.onestep.server.entity.answer; | ||
|
||
import com.onestep.server.entity.Answer; | ||
import com.onestep.server.entity.GroupQuestion; | ||
import com.onestep.server.entity.Question; | ||
import com.onestep.server.entity.User; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
import java.util.Date; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
public class AnswerGroupQuestionDTO { | ||
|
||
private String answer_txt; | ||
private User user; | ||
private Date answer_date; | ||
private GroupQuestion groupQuestion; | ||
|
||
public Answer toEntity(){ | ||
return Answer.builder() | ||
.answer_id(null) | ||
.user(user) | ||
.answer_txt(answer_txt) | ||
.write_date(answer_date) | ||
.groupQuestion(groupQuestion) | ||
.build(); | ||
} | ||
} |
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