package org.codiki.core.repositories;

import java.util.Optional;

import org.codiki.core.entities.persistence.Version;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface VersionRepository extends CrudRepository<Version, Long> {
	@Query("SELECT v FROM Version v ORDER BY v.number DESC")
	Iterable<Version> findAllOrderByNumber();
	
	Optional<Version> findByNumber(String pNumber);
}
