Prevent deleting amenities used by room types
All checks were successful
build-and-deploy / build-deploy (push) Successful in 27s

This commit is contained in:
androidlover5842
2026-01-27 04:47:24 +05:30
parent 4fdfc84811
commit fb1c0caed7
2 changed files with 6 additions and 0 deletions

View File

@@ -13,4 +13,5 @@ interface RoomTypeRepo : JpaRepository<RoomType, UUID> {
fun findByPropertyIdOrderByCode(propertyId: UUID): List<RoomType>
fun existsByPropertyIdAndCode(propertyId: UUID, code: String): Boolean
fun existsByPropertyIdAndCodeAndIdNot(propertyId: UUID, code: String, id: UUID): Boolean
fun existsByAmenitiesId(id: UUID): Boolean
}