From 84e3b9f11f6d3eec4c84e45d5ca8c36a3ccfdd53 Mon Sep 17 00:00:00 2001 From: "antonio.torre" Date: Tue, 14 Jan 2025 14:50:07 +0100 Subject: [PATCH] tmp --- .../model/taxonomy/TaxonomyOrganizationTypeDTO.java | 2 ++ .../taxonomy/TaxonomyOrganizationTypeRepository.java | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 src/main/java/it/gov/pagopa/pu/organization/repository/taxonomy/TaxonomyOrganizationTypeRepository.java diff --git a/src/main/java/it/gov/pagopa/pu/organization/model/taxonomy/TaxonomyOrganizationTypeDTO.java b/src/main/java/it/gov/pagopa/pu/organization/model/taxonomy/TaxonomyOrganizationTypeDTO.java index 316ab95..d46eaf9 100644 --- a/src/main/java/it/gov/pagopa/pu/organization/model/taxonomy/TaxonomyOrganizationTypeDTO.java +++ b/src/main/java/it/gov/pagopa/pu/organization/model/taxonomy/TaxonomyOrganizationTypeDTO.java @@ -5,9 +5,11 @@ import jakarta.persistence.Table; import lombok.AllArgsConstructor; import lombok.Data; +import lombok.NoArgsConstructor; @Data @AllArgsConstructor +@NoArgsConstructor @Entity @Table(name = "taxonomy") public class TaxonomyOrganizationTypeDTO { diff --git a/src/main/java/it/gov/pagopa/pu/organization/repository/taxonomy/TaxonomyOrganizationTypeRepository.java b/src/main/java/it/gov/pagopa/pu/organization/repository/taxonomy/TaxonomyOrganizationTypeRepository.java new file mode 100644 index 0000000..fb998ba --- /dev/null +++ b/src/main/java/it/gov/pagopa/pu/organization/repository/taxonomy/TaxonomyOrganizationTypeRepository.java @@ -0,0 +1,12 @@ +package it.gov.pagopa.pu.organization.repository.taxonomy; + +import it.gov.pagopa.pu.organization.model.taxonomy.TaxonomyOrganizationTypeDTO; +import org.springframework.data.repository.Repository; +import org.springframework.data.rest.core.annotation.RepositoryRestResource; + +import java.util.List; + +@RepositoryRestResource(path = "taxonomies-organization-types") +public interface TaxonomyOrganizationTypeRepository extends Repository { + List findDistinctOrganizationTypeByOrderByOrganizationTypeAsc(); +}