-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96a6e08
commit 5c8ae65
Showing
2 changed files
with
37 additions
and
6 deletions.
There are no files selected for viewing
37 changes: 36 additions & 1 deletion
37
src/main/java/com/example/reddiserver/dto/chatgpt/response/ChatGptPromptResponseDto.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,11 +1,46 @@ | ||
package com.example.reddiserver.dto.chatgpt.response; | ||
|
||
import com.example.reddiserver.entity.Prompt; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
import java.util.LinkedHashMap; | ||
import java.util.Map; | ||
|
||
@Builder | ||
@Getter | ||
public class ChatGptPromptResponseDto { | ||
private ChatGptPrompt prompt; | ||
private ChatGptCreationResultDto result; | ||
private Map<String, String> result; | ||
|
||
public static ChatGptPromptResponseDto of(Prompt prompt, ChatGptPrompt chatGptPrompt) { | ||
Map<String, String> result = new LinkedHashMap<>(); | ||
|
||
if (prompt.getName() != null) { | ||
result.put("네이밍", prompt.getName()); | ||
} | ||
if (prompt.getReason() != null) { | ||
result.put("네이밍 이유", prompt.getReason()); | ||
} | ||
if (prompt.getSlogan() != null) { | ||
result.put("슬로건", prompt.getSlogan()); | ||
} | ||
if (prompt.getVision() != null) { | ||
result.put("비전 미션", prompt.getVision()); | ||
} | ||
if (prompt.getEssence() != null) { | ||
result.put("브랜드 에센스", prompt.getEssence()); | ||
} | ||
if (prompt.getKeyword() != null) { | ||
result.put("키워드", prompt.getKeyword()); | ||
} | ||
if (prompt.getManifesto() != null) { | ||
result.put("메니페스토", prompt.getManifesto()); | ||
} | ||
|
||
return ChatGptPromptResponseDto.builder() | ||
.prompt(chatGptPrompt) | ||
.result(result) | ||
.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