Skip to content

Commit

Permalink
Merge pull request #430 from MTES-MCT/feature/421-backend-mission-act…
Browse files Browse the repository at this point in the history
…ion-table-repository

Feature/421 backend mission action table repository
  • Loading branch information
xtiannyeto authored Nov 18, 2024
2 parents 3692e04 + d79df09 commit d690b9e
Show file tree
Hide file tree
Showing 68 changed files with 4,188 additions and 357 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ data class EnvActionControlEntity(
override val isSafetyEquipmentAndStandardsComplianceControl: Boolean? = null,
override val isSeafarersControl: Boolean? = null,
override val openBy: String? = null,
val observations: String? = null,
val observationsByUnit: String? = null,
val actionNumberOfControls: Int? = null,
val actionTargetType: ActionTargetTypeEnum? = null,
val vehicleType: VehicleTypeEnum? = null,
val infractions: List<InfractionEntity>? = listOf(),
override val observations: String? = null,
override val observationsByUnit: String? = null,
override val actionNumberOfControls: Int? = null,
override val actionTargetType: ActionTargetTypeEnum? = null,
override val vehicleType: VehicleTypeEnum? = null,
override val infractions: List<InfractionEntity>? = listOf(),
) : EnvActionEntity(
id = id,
actionType = ActionTypeEnum.CONTROL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,11 @@ abstract class EnvActionEntity(
open val isSafetyEquipmentAndStandardsComplianceControl: Boolean? = null,
open val isSeafarersControl: Boolean? = null,
open val openBy: String? = null,
open val observations: String? = null,
open val observationsByUnit: String? = null,
open val actionNumberOfControls: Int? = null,
open val actionTargetType: ActionTargetTypeEnum? = null,
open val vehicleType: VehicleTypeEnum? = null,
open val infractions: List<InfractionEntity>? = listOf(),
open val coverMissionZone: Boolean? = null
)
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ data class EnvActionNoteEntity(
override val id: UUID,
override val actionStartDateTimeUtc: Instant? = null,
override val actionEndDateTimeUtc: Instant? = null,
val observations: String? = null
override val observations: String? = null
) : EnvActionEntity(
actionType = ActionTypeEnum.NOTE,
id = id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ data class EnvActionSurveillanceEntity(
override val completion: ActionCompletionEnum? = null,
override val controlPlans: List<EnvActionControlPlanEntity>? = listOf(),
override val openBy: String? = null,
val observations: String? = null,
val observationsByUnit: String? = null,
val coverMissionZone: Boolean? = null,
override val observations: String? = null,
override val observationsByUnit: String? = null,
override val coverMissionZone: Boolean? = null,
) : EnvActionEntity(
actionType = ActionTypeEnum.SURVEILLANCE,
id = id,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package fr.gouv.dgampa.rapportnav.domain.entities.mission.nav.control.v2

import fr.gouv.dgampa.rapportnav.domain.entities.mission.nav.control.ControlAdministrativeEntity
import fr.gouv.dgampa.rapportnav.domain.entities.mission.nav.control.ControlGensDeMerEntity
import fr.gouv.dgampa.rapportnav.domain.entities.mission.nav.control.ControlNavigationEntity
import fr.gouv.dgampa.rapportnav.domain.entities.mission.nav.control.ControlSecurityEntity

data class ActionControlEntity(
var controlAdministrative: ControlAdministrativeEntity? = null,
var controlGensDeMer: ControlGensDeMerEntity? = null,
var controlSecurity: ControlSecurityEntity? = null,
var controlNavigation: ControlNavigationEntity? = null
) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package fr.gouv.dgampa.rapportnav.domain.entities.mission.v2

import fr.gouv.dgampa.rapportnav.domain.entities.mission.CompletenessForStatsEntity
import fr.gouv.dgampa.rapportnav.domain.entities.mission.env.MissionSourceEnum
import fr.gouv.dgampa.rapportnav.domain.entities.mission.nav.action.ActionType
import fr.gouv.dgampa.rapportnav.domain.entities.mission.nav.control.*
import fr.gouv.dgampa.rapportnav.domain.entities.mission.nav.status.ActionStatusType
import java.time.Instant

interface BaseMissionActionEntity {
val missionId: Int
val actionType: ActionType
val isCompleteForStats: Boolean?
val source: MissionSourceEnum
var startDateTimeUtc: Instant?
var endDateTimeUtc: Instant?
val completenessForStats: CompletenessForStatsEntity?
val sourcesOfMissingDataForStats: List<MissionSourceEnum>?
var controlSecurity: ControlSecurityEntity?
var controlGensDeMer: ControlGensDeMerEntity?
var controlNavigation: ControlNavigationEntity?
var controlAdministrative: ControlAdministrativeEntity?
var summaryTags: List<String>?
var status: ActionStatusType?
var controlsToComplete: List<ControlType>?
val isAdministrativeControl: Boolean?
val isComplianceWithWaterRegulationsControl: Boolean?
val isSafetyEquipmentAndStandardsComplianceControl: Boolean?
val isSeafarersControl: Boolean?

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package fr.gouv.dgampa.rapportnav.domain.entities.mission.v2

import fr.gouv.dgampa.rapportnav.domain.entities.mission.env.ActionCompletionEnum
import fr.gouv.dgampa.rapportnav.domain.entities.mission.env.envActions.*
import fr.gouv.dgampa.rapportnav.domain.entities.mission.nav.control.ControlType
import fr.gouv.dgampa.rapportnav.infrastructure.api.bff.model.action.FormattedEnvActionControlPlan
import org.locationtech.jts.geom.Geometry
import java.util.*

interface BaseMissionEnvAction {
val id: UUID
val missionId: Int
val envActionType: ActionTypeEnum
val completedBy: String?
val completion: ActionCompletionEnum?
val controlPlans: List<EnvActionControlPlanEntity>?
val geom: Geometry?
val facade: String?
val department: String?
val openBy: String?
val observations: String?
val observationsByUnit: String?
val actionNumberOfControls: Int?
val actionTargetType: ActionTargetTypeEnum?
val vehicleType: VehicleTypeEnum?
val envInfractions: List<InfractionEntity>?
val navInfractions: List<fr.gouv.dgampa.rapportnav.domain.entities.mission.nav.infraction.InfractionEntity>?
val coverMissionZone: Boolean?
val formattedControlPlans: List<FormattedEnvActionControlPlan>?
val availableControlTypesForInfraction: List<ControlType>?
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package fr.gouv.dgampa.rapportnav.domain.entities.mission.v2

import com.neovisionaries.i18n.CountryCode
import fr.gouv.dgampa.rapportnav.domain.entities.mission.fish.ControlUnit
import fr.gouv.dgampa.rapportnav.domain.entities.mission.fish.fishActions.*
import java.time.Instant

interface BaseMissionFishAction {
val id: Int?
val missionId: Int
val vesselId: Int?
val vesselName: String?
val internalReferenceNumber: String?
val externalReferenceNumber: String?
val ircs: String?
val flagState: CountryCode
val districtCode: String?
val faoAreas: List<String>
val fishActionType: MissionActionType
val actionDatetimeUtc: Instant
val actionEndDatetimeUtc: Instant?
val emitsVms: ControlCheck?
val emitsAis: ControlCheck?
val flightGoals: List<FlightGoal>
val logbookMatchesActivity: ControlCheck?
val licencesMatchActivity: ControlCheck?
val speciesWeightControlled: Boolean?
val speciesSizeControlled: Boolean?
val separateStowageOfPreservedSpecies: ControlCheck?
val logbookInfractions: List<LogbookInfraction>
val licencesAndLogbookObservations: String?
val gearInfractions: List<GearInfraction>
val speciesInfractions: List<SpeciesInfraction>
val speciesObservations: String?
val seizureAndDiversion: Boolean?
val otherInfractions: List<OtherInfraction>
val numberOfVesselsFlownOver: Int?
val unitWithoutOmegaGauge: Boolean?
val controlQualityComments: String?
val feedbackSheetRequired: Boolean?
val userTrigram: String
val segments: List<FleetSegment>
val facade: String?
val longitude: Double?
val latitude: Double?
val portLocode: String?
// This field is only used when fetching missions
var portName: String?
val vesselTargeted: ControlCheck?
val seizureAndDiversionComments: String?
val otherComments: String?
val gearOnboard: List<GearControl>
val speciesOnboard: List<SpeciesControl>
val isFromPoseidon: Boolean
/**
* This field is only used by the `GetVesselControls` use-case.
* /!\ Do not use it to get `controlUnits` as the field will be empty be default.
*/
var controlUnits: List<ControlUnit>
val isDeleted: Boolean
val hasSomeGearsSeized: Boolean
val hasSomeSpeciesSeized: Boolean
val completedBy: String?
val completion: Completion
var observationsByUnit: String?
var speciesQuantitySeized: Int ?
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package fr.gouv.dgampa.rapportnav.domain.entities.mission.v2

import fr.gouv.dgampa.rapportnav.domain.entities.mission.env.MissionSourceEnum
import fr.gouv.dgampa.rapportnav.domain.entities.mission.env.envActions.VesselSizeEnum
import fr.gouv.dgampa.rapportnav.domain.entities.mission.env.envActions.VesselTypeEnum
import fr.gouv.dgampa.rapportnav.domain.entities.mission.nav.action.ActionType
import fr.gouv.dgampa.rapportnav.domain.entities.mission.nav.control.ControlMethod
import fr.gouv.dgampa.rapportnav.domain.entities.mission.nav.status.ActionStatusReason
import java.time.Instant
import java.util.*

interface BaseMissionNavAction {
var id: UUID
var missionId: Int
var actionType: ActionType
var isCompleteForStats: Boolean?
val sourcesOfMissingDataForStats: List<MissionSourceEnum>?
var startDateTimeUtc: Instant?
var endDateTimeUtc: Instant?
var observations: String?
var latitude: Double?
var longitude: Double?
var detectedPollution: Boolean?
var pollutionObservedByAuthorizedAgent: Boolean?
var diversionCarriedOut: Boolean?
var isSimpleBrewingOperationDone: Boolean?
var isAntiPolDeviceDeployed: Boolean?
var controlMethod: ControlMethod?
var vesselIdentifier: String?
var vesselType: VesselTypeEnum?
var vesselSize: VesselSizeEnum?
var identityControlledPerson: String?
var nbOfInterceptedVessels: Int?
var nbOfInterceptedMigrants: Int?
var nbOfSuspectedSmugglers: Int?
var isVesselRescue: Boolean?
var isPersonRescue: Boolean?
var isVesselNoticed: Boolean?
var isVesselTowed: Boolean?
var isInSRRorFollowedByCROSSMRCC: Boolean?
var numberPersonsRescued: Int?
var numberOfDeaths: Int?
var operationFollowsDEFREP: Boolean?
var locationDescription: String?
var isMigrationRescue: Boolean?
var nbOfVesselsTrackedWithoutIntervention: Int?
var nbAssistedVesselsReturningToShore: Int?
var reason: ActionStatusReason?
}
Loading

0 comments on commit d690b9e

Please sign in to comment.