Add global image tags and tag assignment
All checks were successful
build-and-deploy / build-deploy (push) Successful in 33s

This commit is contained in:
androidlover5842
2026-01-27 18:50:51 +05:30
parent 03b02a08ca
commit eaee838ca3
7 changed files with 220 additions and 10 deletions

View File

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

View File

@@ -0,0 +1,12 @@
package com.android.trisolarisserver.repo
import com.android.trisolarisserver.models.room.RoomImageTag
import org.springframework.data.jpa.repository.JpaRepository
import java.util.UUID
interface RoomImageTagRepo : JpaRepository<RoomImageTag, UUID> {
fun findAllByOrderByName(): List<RoomImageTag>
fun findByIdIn(ids: Set<UUID>): List<RoomImageTag>
fun existsByName(name: String): Boolean
fun existsByNameAndIdNot(name: String, id: UUID): Boolean
}