Delete room images when deleting room
All checks were successful
build-and-deploy / build-deploy (push) Successful in 32s

This commit is contained in:
androidlover5842
2026-01-27 17:18:19 +05:30
parent c369996132
commit 4c21830eb0
2 changed files with 46 additions and 0 deletions

View File

@@ -75,4 +75,11 @@ interface RoomStayRepo : JpaRepository<RoomStay, UUID> {
order by r.roomNumber
""")
fun findActiveByPropertyIdWithDetails(@Param("propertyId") propertyId: UUID): List<RoomStay>
@Query("""
select case when count(rs) > 0 then true else false end
from RoomStay rs
where rs.room.id = :roomId
""")
fun existsByRoomId(@Param("roomId") roomId: UUID): Boolean
}