From 0d96e0dbc6f2e0ba2e6f3cca4253cd6a1b3af706 Mon Sep 17 00:00:00 2001 From: Maxime Perrault Date: Wed, 18 Sep 2024 15:22:37 +0200 Subject: [PATCH] doc: add ktdoc to reportingModelJpa and reportingModel --- .../database/model/reportings/ReportingModel.kt | 11 ++++++----- .../model/reportings/ReportingModelJpa.kt | 16 ++++++---------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/backend/src/main/kotlin/fr/gouv/cacem/monitorenv/infrastructure/database/model/reportings/ReportingModel.kt b/backend/src/main/kotlin/fr/gouv/cacem/monitorenv/infrastructure/database/model/reportings/ReportingModel.kt index 685f1c23b..8fc95a5cd 100644 --- a/backend/src/main/kotlin/fr/gouv/cacem/monitorenv/infrastructure/database/model/reportings/ReportingModel.kt +++ b/backend/src/main/kotlin/fr/gouv/cacem/monitorenv/infrastructure/database/model/reportings/ReportingModel.kt @@ -4,16 +4,17 @@ import fr.gouv.cacem.monitorenv.domain.entities.VehicleTypeEnum import fr.gouv.cacem.monitorenv.domain.entities.reporting.ReportingTypeEnum import fr.gouv.cacem.monitorenv.domain.entities.reporting.TargetDetailsEntity import fr.gouv.cacem.monitorenv.domain.entities.reporting.TargetTypeEnum -import fr.gouv.cacem.monitorenv.infrastructure.database.model.ControlPlanThemeModel -import fr.gouv.cacem.monitorenv.infrastructure.database.model.EnvActionModel -import fr.gouv.cacem.monitorenv.infrastructure.database.model.MissionModel -import fr.gouv.cacem.monitorenv.infrastructure.database.model.ReportingSourceModel -import fr.gouv.cacem.monitorenv.infrastructure.database.model.ReportingsControlPlanSubThemeModel +import fr.gouv.cacem.monitorenv.infrastructure.database.model.* import jakarta.persistence.Entity import jakarta.persistence.Table import org.locationtech.jts.geom.Geometry import java.time.Instant +/** + * + * For native queries prupose only + * For JPQL queries you should use [ReportingModelJpa] + */ @Entity @Table(name = "reportings") class ReportingModel( diff --git a/backend/src/main/kotlin/fr/gouv/cacem/monitorenv/infrastructure/database/model/reportings/ReportingModelJpa.kt b/backend/src/main/kotlin/fr/gouv/cacem/monitorenv/infrastructure/database/model/reportings/ReportingModelJpa.kt index 4658b7995..2a27c8a51 100644 --- a/backend/src/main/kotlin/fr/gouv/cacem/monitorenv/infrastructure/database/model/reportings/ReportingModelJpa.kt +++ b/backend/src/main/kotlin/fr/gouv/cacem/monitorenv/infrastructure/database/model/reportings/ReportingModelJpa.kt @@ -4,20 +4,16 @@ import fr.gouv.cacem.monitorenv.domain.entities.VehicleTypeEnum import fr.gouv.cacem.monitorenv.domain.entities.reporting.ReportingTypeEnum import fr.gouv.cacem.monitorenv.domain.entities.reporting.TargetDetailsEntity import fr.gouv.cacem.monitorenv.domain.entities.reporting.TargetTypeEnum -import fr.gouv.cacem.monitorenv.infrastructure.database.model.ControlPlanThemeModel -import fr.gouv.cacem.monitorenv.infrastructure.database.model.EnvActionModel -import fr.gouv.cacem.monitorenv.infrastructure.database.model.MissionModel -import fr.gouv.cacem.monitorenv.infrastructure.database.model.ReportingSourceModel -import fr.gouv.cacem.monitorenv.infrastructure.database.model.ReportingsControlPlanSubThemeModel -import jakarta.persistence.Entity -import jakarta.persistence.NamedAttributeNode -import jakarta.persistence.NamedEntityGraph -import jakarta.persistence.NamedSubgraph -import jakarta.persistence.Table +import fr.gouv.cacem.monitorenv.infrastructure.database.model.* +import jakarta.persistence.* import org.hibernate.annotations.Formula import org.locationtech.jts.geom.Geometry import java.time.Instant +/** + * For JPQL queries purpose only + * For native queries you should use [ReportingModel] + */ @Entity @Table(name = "reportings") @NamedEntityGraph(