forked from Kernel360/f1-JDON-Backend
-
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.
Refactor: 불필요한 static method 수정 (Kernel360#175)
- Loading branch information
Showing
2 changed files
with
11 additions
and
9 deletions.
There are no files selected for viewing
9 changes: 6 additions & 3 deletions
9
module-api/src/main/java/kernel/jdon/faq/dto/request/CreateFaqRequest.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,17 +1,20 @@ | ||
package kernel.jdon.faq.dto.request; | ||
|
||
import kernel.jdon.faq.domain.Faq; | ||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
public class CreateFaqRequest { | ||
private String title; | ||
private String content; | ||
|
||
public static Faq toEntity(CreateFaqRequest createFaqRequest) { | ||
public Faq toEntity() { | ||
return Faq.builder() | ||
.title(createFaqRequest.title) | ||
.content(createFaqRequest.content) | ||
.title(this.title) | ||
.content(this.content) | ||
.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