-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathControlAdministrativeInput2.kt
34 lines (32 loc) · 1.49 KB
/
ControlAdministrativeInput2.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package fr.gouv.dgampa.rapportnav.infrastructure.api.bff.adapters.v2
import fr.gouv.dgampa.rapportnav.domain.entities.mission.nav.control.ControlAdministrativeEntity
import fr.gouv.dgampa.rapportnav.domain.entities.mission.nav.control.ControlResult
import java.util.*
data class ControlAdministrativeInput2(
override var id: UUID? = null,
override val amountOfControls: Int? = null,
override val unitShouldConfirm: Boolean? = null,
override var unitHasConfirmed: Boolean? = null,
override var infractions: List<InfractionInput2>? = null,
override val observations: String? = null,
override val hasBeenDone: Boolean? = null,
val compliantOperatingPermit: ControlResult? = null,
val upToDateNavigationPermit: ControlResult? = null,
val compliantSecurityDocuments: ControlResult? = null,
) : BaseControlInput() {
override fun toEntity(): ControlAdministrativeEntity {
return ControlAdministrativeEntity(
id = id ?: UUID.randomUUID(),
missionId = missionId!!,
actionControlId = actionId!!,
amountOfControls = amountOfControls ?: 0,
unitShouldConfirm = unitShouldConfirm,
unitHasConfirmed = unitHasConfirmed,
compliantOperatingPermit = compliantOperatingPermit,
upToDateNavigationPermit = upToDateNavigationPermit,
compliantSecurityDocuments = compliantSecurityDocuments,
observations = observations,
hasBeenDone = hasBeenDone
)
}
}