Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UserRepository.kt 함수 수정 / AuctionItem.kt에 endTime 추가 #68

Merged
merged 2 commits into from
Jan 23, 2025
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
@@ -1,5 +1,7 @@
package com.toyProject7.karrot.auction.controller

import java.time.Instant

data class AuctionItem(
val id: Long,
val title: String,
Expand All @@ -9,6 +11,7 @@ data class AuctionItem(
val location: String,
val imagePresignedUrl: String,
val likeCount: Int,
val endTime: Instant,
) {
companion object {
fun fromAuction(auction: Auction): AuctionItem {
Expand All @@ -21,6 +24,7 @@ data class AuctionItem(
location = auction.seller.location,
imagePresignedUrl = if (auction.imagePresignedUrl.isEmpty()) "" else auction.imagePresignedUrl.first(),
likeCount = auction.likeCount,
endTime = auction.endTime,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@ interface UserRepository : JpaRepository<UserEntity, String> {
fun existsByNickname(nickname: String): Boolean

@Query("SELECT n FROM NormalUser n WHERE n.userId = :userId")
fun existsByUserId(userId: String): Boolean
fun existsByUserId(
@Param("userId") userId: String,
): Boolean
}
Loading