package at.procon.dip.domain.time.repository;

import at.procon.dip.domain.time.entity.TimeSourceSystem;
import at.procon.dip.domain.time.entity.TimeSyncRun;
import at.procon.dip.domain.time.entity.TimeSyncRunStatus;
import java.util.List;
import java.util.UUID;
import org.springframework.data.jpa.repository.JpaRepository;

public interface TimeSyncRunRepository extends JpaRepository<TimeSyncRun, UUID> {

    List<TimeSyncRun> findTop20BySourceSystemOrderByStartedAtDesc(TimeSourceSystem sourceSystem);

    List<TimeSyncRun> findBySourceSystemAndStatus(TimeSourceSystem sourceSystem, TimeSyncRunStatus status);
}
