package com.jayfella.website.database.repository.page;

import com.jayfella.website.core.page.ReviewState;
import com.jayfella.website.database.entity.page.stages.PageAmendment;
import com.jayfella.website.database.entity.user.User;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Optional;

public interface PageAmendmentRepository extends JpaRepository<PageAmendment, String> {

    Iterable<PageAmendment> findByOwner(User user);
    Iterable<PageAmendment> findByReviewStateOrReviewState(ReviewState reviewState1, ReviewState reviewState2);

    Optional<PageAmendment> findByParentPageId(String parentAssetId);

}
