-
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.
- Loading branch information
Showing
4 changed files
with
39 additions
and
0 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
7 changes: 7 additions & 0 deletions
7
src/main/kotlin/com/onboard/server/domain/feedback/controller/dto/FeedbackElement.kt
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,7 @@ | ||
package com.onboard.server.domain.feedback.controller.dto | ||
|
||
data class FeedbackElement( | ||
val path: String, | ||
val title: String, | ||
val content: String, | ||
) |
19 changes: 19 additions & 0 deletions
19
src/main/kotlin/com/onboard/server/domain/feedback/controller/dto/GetAllFeedbacksResponse.kt
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,19 @@ | ||
package com.onboard.server.domain.feedback.controller.dto | ||
|
||
import com.onboard.server.domain.feedback.domain.Feedback | ||
|
||
data class GetAllFeedbacksResponse( | ||
val feedbacks: List<FeedbackElement>, | ||
) { | ||
companion object { | ||
fun from(feedbacks: List<Feedback>) = GetAllFeedbacksResponse( | ||
feedbacks.map { | ||
FeedbackElement( | ||
path = it.path, | ||
title = it.title, | ||
content = it.content, | ||
) | ||
} | ||
) | ||
} | ||
} |
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