package com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository;

import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.sailor.SailorVersion;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

public interface SailorVersionRepository extends JpaRepository<SailorVersion, SailorVersion.SailorVersionId> {
    Optional<SailorVersion> findTopBySailorKeyOrderByVersionNoDesc(Integer sailorKey);
    List<SailorVersion> findBySailorKey(Integer sailorKey);

    SailorVersion findByVersionNoAndSailorKey(Integer versionNo, Integer sailorKey);
}
