package io.gmss.fiscad.repositories.infocad.parametre;

import io.gmss.fiscad.entities.infocad.parametre.ModeAcquisition;
import io.gmss.fiscad.paylaods.response.ModesAcquisitionTypePersonneSyncResponse;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface ModeAcquisitionRepository extends JpaRepository<ModeAcquisition, Long> {
    @Query(value = "select ma.id, ma.libelle,mat.type_personne_id as typePersonneId  " +
            " from mode_acquisition ma " +
            " inner join mode_acquisition_type_personne mat on mat.mode_acquisition_id=ma.id " +
            " where ma.deleted is false ", nativeQuery = true)
    List<ModesAcquisitionTypePersonneSyncResponse> getModeAcquisitionTypePersonne();
}
