Skip to content

Commit

Permalink
Merge pull request #68 from wafflestudio/feat/chat
Browse files Browse the repository at this point in the history
UserRepository.kt 함수 수정 / AuctionItem.kt에 endTime 추가
  • Loading branch information
alpakar02 authored Jan 23, 2025
2 parents baaf1fa + 974514b commit eb71caa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
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
}

0 comments on commit eb71caa

Please sign in to comment.