package ru.kayashov.bar.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.transaction.annotation.Transactional;
import ru.kayashov.bar.model.entity.ReceiptEntity;

import java.util.List;

public interface ReceiptRepository extends JpaRepository<ReceiptEntity, Long> {

    List<ReceiptEntity> findAllByCocktailId(Long id);

    @Transactional
    void deleteByCocktailId(Long id);
}