-
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.
Browse files
Browse the repository at this point in the history
목표 기반 피드 추가
- Loading branch information
Showing
15 changed files
with
164 additions
and
111 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
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
17 changes: 17 additions & 0 deletions
17
...cation/api/src/main/kotlin/io/raemian/api/goal/controller/response/GoalExploreResponse.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,17 @@ | ||
package io.raemian.api.goal.controller.response | ||
|
||
import io.raemian.api.goal.domain.GoalExploreDTO | ||
|
||
data class GoalExploreResponse( | ||
val goals: List<GoalExploreDTO>, | ||
val cursor: GoalExploreCursor, | ||
) { | ||
|
||
constructor(goals: List<GoalExploreDTO>) : this( | ||
goals = goals, | ||
cursor = GoalExploreCursor(goals.lastOrNull()?.goal?.id ?: Long.MIN_VALUE), | ||
) | ||
data class GoalExploreCursor( | ||
val next: Long, | ||
) | ||
} |
17 changes: 17 additions & 0 deletions
17
backend/application/api/src/main/kotlin/io/raemian/api/goal/domain/GoalCountSubset.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,17 @@ | ||
package io.raemian.api.goal.domain | ||
|
||
import io.raemian.storage.db.core.model.GoalExploreQueryResult | ||
|
||
data class GoalCountSubset( | ||
val reaction: Long, | ||
val comment: Long, | ||
val task: Long, | ||
val goal: Long, | ||
) { | ||
constructor(result: GoalExploreQueryResult) : this( | ||
reaction = 0, | ||
comment = 0, | ||
task = 0, | ||
goal = result.goalCount, | ||
) | ||
} |
16 changes: 16 additions & 0 deletions
16
backend/application/api/src/main/kotlin/io/raemian/api/goal/domain/GoalExploreDTO.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,16 @@ | ||
package io.raemian.api.goal.domain | ||
|
||
import io.raemian.api.user.domain.UserSubset | ||
import io.raemian.storage.db.core.model.GoalExploreQueryResult | ||
|
||
data class GoalExploreDTO( | ||
val user: UserSubset, | ||
val goal: GoalSubset, | ||
val count: GoalCountSubset, | ||
) { | ||
constructor(result: GoalExploreQueryResult) : this( | ||
goal = GoalSubset(result), | ||
user = UserSubset(result), | ||
count = GoalCountSubset(result), | ||
) | ||
} |
22 changes: 22 additions & 0 deletions
22
backend/application/api/src/main/kotlin/io/raemian/api/goal/domain/GoalSubset.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,22 @@ | ||
package io.raemian.api.goal.domain | ||
|
||
import io.raemian.storage.db.core.model.GoalExploreQueryResult | ||
import java.time.LocalDate | ||
|
||
data class GoalSubset( | ||
val id: Long, | ||
val title: String, | ||
val description: String, | ||
val deadline: LocalDate, | ||
val sticker: String, | ||
val tag: String, | ||
) { | ||
constructor(result: GoalExploreQueryResult) : this( | ||
id = result.goalId, | ||
title = result.title, | ||
description = result.description, | ||
deadline = result.deadline, | ||
sticker = result.stickerUrl, | ||
tag = result.tagContent, | ||
) | ||
} |
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
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
17 changes: 0 additions & 17 deletions
17
backend/application/api/src/main/kotlin/io/raemian/api/lifemap/domain/ExploreDTO.kt
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
backend/application/api/src/main/kotlin/io/raemian/api/lifemap/domain/ExploreResponse.kt
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
backend/application/api/src/main/kotlin/io/raemian/api/lifemap/domain/ExploreResponses.kt
This file was deleted.
Oops, something went wrong.
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
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
21 changes: 21 additions & 0 deletions
21
...e/db-core/src/main/kotlin/io/raemian/storage/db/core/goal/model/GoalExploreQueryResult.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,21 @@ | ||
package io.raemian.storage.db.core.model | ||
|
||
import java.time.LocalDate | ||
import java.time.LocalDateTime | ||
|
||
data class GoalExploreQueryResult( | ||
val goalId: Long, | ||
val title: String, | ||
val description: String, | ||
val deadline: LocalDate, | ||
val stickerUrl: String, | ||
val tagContent: String, | ||
val createdAt: LocalDateTime, | ||
val lifeMapId: Long, | ||
val goalCount: Long, | ||
val historyCount: Long, | ||
val viewCount: Long, | ||
val userId: Long, | ||
val nickname: String, | ||
val userImage: String, | ||
) |
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