Reorder room image sequences after delete
All checks were successful
build-and-deploy / build-deploy (push) Successful in 30s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 30s
This commit is contained in:
@@ -16,6 +16,26 @@ interface RoomImageRepo : JpaRepository<RoomImage, UUID> {
|
||||
"""
|
||||
)
|
||||
fun findByRoomIdOrdered(@Param("roomId") roomId: UUID): List<RoomImage>
|
||||
|
||||
@Query(
|
||||
"""
|
||||
select ri
|
||||
from RoomImage ri
|
||||
where ri.room.id = :roomId
|
||||
order by ri.roomSortOrder asc, ri.createdAt desc
|
||||
"""
|
||||
)
|
||||
fun findByRoomIdForReorder(@Param("roomId") roomId: UUID): List<RoomImage>
|
||||
|
||||
@Query(
|
||||
"""
|
||||
select ri
|
||||
from RoomImage ri
|
||||
where ri.roomTypeCode = :roomTypeCode
|
||||
order by ri.roomTypeSortOrder asc, ri.createdAt desc
|
||||
"""
|
||||
)
|
||||
fun findByRoomTypeCodeForReorder(@Param("roomTypeCode") roomTypeCode: String): List<RoomImage>
|
||||
fun findByIdAndRoomIdAndPropertyId(id: UUID, roomId: UUID, propertyId: UUID): RoomImage?
|
||||
fun existsByRoomIdAndContentHash(roomId: UUID, contentHash: String): Boolean
|
||||
|
||||
|
||||
Reference in New Issue
Block a user