package com.securityc4po.api.pentest

import org.springframework.data.mongodb.repository.Query
import org.springframework.data.mongodb.repository.ReactiveMongoRepository
import org.springframework.stereotype.Repository
import reactor.core.publisher.Flux

@Repository
interface PentestRepository : ReactiveMongoRepository<PentestEntity, String> {

    @Query("{'data.projectId': ?0, 'data.category': ?1}")
    fun findPentestByProjectIdAndCategory(projectId: String, category: PentestCategory): Flux<PentestEntity>

}