package de.oaa.xxx.social.repository;

import de.oaa.xxx.social.entity.KommentarEntity;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.UUID;

public interface KommentarRepository extends JpaRepository<KommentarEntity, UUID> {

    List<KommentarEntity> findByTargetTypeAndTargetIdOrderByCreatedAtAsc(String targetType, UUID targetId);

    long countByTargetTypeAndTargetId(String targetType, UUID targetId);

    void deleteByAuthorId(UUID authorId);
}
