package com.dbnt.faisp.main.userInfo.repository;

import com.dbnt.faisp.main.userInfo.model.PersonnelStatus;
import org.springframework.data.jpa.repository.JpaRepository;

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

public interface PersonnelStatusRepository extends JpaRepository<PersonnelStatus, PersonnelStatus.personnelStatusId> {
  Optional<PersonnelStatus> findTop1ByYearAndOgCdOrderByVersionNoDesc(String year, String ogCd);

  List<PersonnelStatus> findByYearAndOgCdOrderByVersionNoDesc(String year, String ogCd);
}
