-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADD: Domain Object for riskoscenario
Co-authored-by: Jeremiah Uy <[email protected]> Co-authored-by: PaulMartinKokseter <[email protected]>>
- Loading branch information
1 parent
135aa4a
commit 67b0183
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
apps/backend/src/main/java/no/nav/data/pvk/risikoscenario/domain/Riskoscenario.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package no.nav.data.pvk.risikoscenario.domain; | ||
|
||
import io.hypersistence.utils.hibernate.type.json.JsonBinaryType; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Id; | ||
import lombok.*; | ||
import no.nav.data.common.auditing.domain.Auditable; | ||
import org.hibernate.annotations.Type; | ||
|
||
import java.util.UUID; | ||
|
||
@Entity | ||
@Data | ||
@Builder | ||
@EqualsAndHashCode(callSuper = true) | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class Riskoscenario extends Auditable { | ||
|
||
@Id | ||
@Builder.Default | ||
private UUID id = UUID.randomUUID(); | ||
|
||
private String pvkDokumentId; | ||
|
||
@Type(value = JsonBinaryType.class) | ||
@Builder.Default | ||
private RiskoscenarioData riskoscenarioData = new RiskoscenarioData(); | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
apps/backend/src/main/java/no/nav/data/pvk/risikoscenario/domain/RiskoscenarioData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package no.nav.data.pvk.risikoscenario.domain; | ||
|
||
|
||
import lombok.*; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@Builder | ||
@EqualsAndHashCode | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class RiskoscenarioData { | ||
private String navn; | ||
private String beskrivelse; | ||
private Integer sannsynlighetsNivaa; | ||
private String sannsynlighetsNivaaBegrunnelse; | ||
private Integer konsekvensNivaa; | ||
private String konsekvensNivaaBegrunnelse; | ||
private List<Integer> relvanteKravNummerList; | ||
|
||
} |