package io.gmss.fiscad.repositories.decoupage;

import io.gmss.fiscad.entities.decoupage.Departement;
import io.gmss.fiscad.paylaods.response.DepartementSyncResponse;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;


public interface DepartementRepository extends JpaRepository<Departement, Long> {

    @Query(value = "select id, code, nom from departement" +
            " where departement.deleted is false ", nativeQuery = true)
    List<DepartementSyncResponse> getDepartementResponse();

}
