Add duplicate image check and delete endpoint
All checks were successful
build-and-deploy / build-deploy (push) Successful in 28s

This commit is contained in:
androidlover5842
2026-01-27 16:50:56 +05:30
parent 5bfbd295c9
commit cb1b65937e
3 changed files with 45 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ interface RoomImageRepo : JpaRepository<RoomImage, UUID> {
)
fun findByRoomIdOrdered(@Param("roomId") roomId: UUID): List<RoomImage>
fun findByIdAndRoomIdAndPropertyId(id: UUID, roomId: UUID, propertyId: UUID): RoomImage?
fun existsByRoomIdAndContentHash(roomId: UUID, contentHash: String): Boolean
@Query("select coalesce(max(ri.roomSortOrder), 0) from RoomImage ri where ri.room.id = :roomId")
fun findMaxRoomSortOrder(@Param("roomId") roomId: UUID): Int