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

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

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

public interface ViolationVersionRepository extends JpaRepository<ViolationVersion, ViolationVersion.ViolationVersionId> {
  Optional<ViolationVersion> findTop1ByFbKeyOrderByVersionNoDesc(Integer fbKey);

  List<ViolationVersion> findByFbKeyAndVersionNoOrderByViolationKeyAsc(Integer fbKey, Integer versionNo);
}
