package es.uv.dagarcos.master.repository;

import es.uv.dagarcos.master.domain.Shard;
import es.uv.dagarcos.master.domain.ShardWorldSnapshot;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface ShardWorldSnapshotRepository extends JpaRepository<ShardWorldSnapshot, Long> {

    List<ShardWorldSnapshot> findByShardOrderBySnapshotAtDesc(Shard shard);

    List<ShardWorldSnapshot> findByShardExternalIdOrderBySnapshotAtAsc(String shardId);

    List<ShardWorldSnapshot> findByShardOrderBySnapshotAtAsc(Shard shard);

}