Skip to content

Commit

Permalink
[Mission] Return ReportingEntity instead of ReportingDTO in getMissio…
Browse files Browse the repository at this point in the history
…nById
  • Loading branch information
claire2212 committed Jan 17, 2025
1 parent d1e2eb2 commit e7e33ff
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ data class VigilanceAreaEntity(
val endingCondition: EndingConditionEnum? = null,
val endingOccurrenceDate: ZonedDateTime? = null,
val endingOccurrencesNumber: Int? = null,
val images: List<ImageEntity>? = listOf(),
val frequency: FrequencyEnum? = null,
val geom: MultiPolygon? = null,
val images: List<ImageEntity>? = listOf(),
val isAtAllTimes: Boolean,
val isArchived: Boolean,
val isDeleted: Boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ package fr.gouv.cacem.monitorenv.domain.use_cases.missions.dtos
import fr.gouv.cacem.monitorenv.domain.entities.mission.MissionEntity
import fr.gouv.cacem.monitorenv.domain.entities.mission.monitorfish.MonitorFishMissionActionEntity
import fr.gouv.cacem.monitorenv.domain.entities.mission.rapportnav.RapportNavMissionActionEntity
import fr.gouv.cacem.monitorenv.domain.entities.reporting.ReportingEntity
import fr.gouv.cacem.monitorenv.domain.use_cases.reportings.dtos.ReportingDTO
import java.util.UUID
import java.util.*

data class MissionDTO(
val mission: MissionEntity,
val fishActions: List<MonitorFishMissionActionEntity>? = listOf(),
val attachedReportings: List<ReportingDTO>? = listOf(),
val attachedReportingIds: List<Int>? = listOf(),
val detachedReportings: List<ReportingDTO>? = listOf(),
val detachedReportings: List<ReportingEntity>? = listOf(),
val detachedReportingIds: List<Int>? = listOf(),
val envActionsAttachedToReportingIds: List<EnvActionAttachedToReportingIds>? = listOf(),
val hasRapportNavActions: RapportNavMissionActionEntity? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ data class MissionDataOutput(
detachedReportingIds = dto.detachedReportingIds,
detachedReportings =
dto.detachedReportings?.map {
MissionDetachedReportingDataOutput.fromReporting(it.reporting)
MissionDetachedReportingDataOutput.fromReporting(it)
},
isGeometryComputedFromControls = dto.mission.isGeometryComputedFromControls,
hasRapportNavActions =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ class MissionModel(
detachedReportings =
this.attachedReportings
?.filter { it.detachedFromMissionAtUtc != null }
?.map { it.toReportingDTO(objectMapper) }
?.map { it.toReporting() }
?: listOf(),
detachedReportingIds =
this.attachedReportings
Expand Down

0 comments on commit e7e33ff

Please sign in to comment.