Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ data class AuthorResponse @QueryProjection constructor(

@Schema(description = "온보딩 완료 여부", example = "true")
val isCompletedOnboarding: Boolean,

@Schema(description = "프로필 이미지 URL", example = "https://path/to/image.png")
val profileImageUrl: String? = null,
) {
@Schema(description = "동네인증 완료 여부", example = "true")
var isVerified: Boolean = false
Expand All @@ -195,6 +198,7 @@ data class AuthorResponse @QueryProjection constructor(
nickname = user.nickname,
realname = user.realname,
isCompletedOnboarding = user.isCompletedOnboarding,
profileImageUrl = user.profileImageUrl,
).apply { this.isVerified = isVerified }
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ class ArticleRepositoryCustomImpl(
article.authUser.id,
article.authUser.nickname,
article.authUser.realname,
article.authUser.isCompletedOnboarding
article.authUser.isCompletedOnboarding,
article.authUser.profileImageUrl
)
)
).from(article)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class CommentRepositoryCustomImpl(
author.nickname,
author.realname,
author.isCompletedOnboarding,
author.profileImageUrl
),
comment.likeCount,
parentComment.id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import jakarta.persistence.JoinColumn
import jakarta.persistence.ManyToOne
import jakarta.persistence.OneToMany
import jakarta.persistence.Table
import kotlin.random.Random

@Entity
@Table(name = "`users`")
Expand Down Expand Up @@ -58,6 +59,8 @@ class UserEntity(
val cheeringList: List<Cheering> = emptyList(),

var fcmToken: String? = null,

var profileImageUrl: String? = null,
) : PrimaryKeyEntity() {
companion object {
fun of(
Expand All @@ -80,6 +83,10 @@ class UserEntity(
) {
this.realname = realname
this.nickname = nickname
this.profileImageUrl = "https://daepiro-dev.s3.ap-northeast-2.amazonaws.com/article/profile/" + (Random.nextInt(
1,
8
)) + ".png"
}

fun initFcmToken(fcmToken: String?) {
Expand Down
Loading