diff --git a/apps/backend/src/main/java/no/nav/data/pvk/risikoscenario/domain/Riskoscenario.java b/apps/backend/src/main/java/no/nav/data/pvk/risikoscenario/domain/Riskoscenario.java new file mode 100644 index 000000000..32b66cce5 --- /dev/null +++ b/apps/backend/src/main/java/no/nav/data/pvk/risikoscenario/domain/Riskoscenario.java @@ -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(); + +} diff --git a/apps/backend/src/main/java/no/nav/data/pvk/risikoscenario/domain/RiskoscenarioData.java b/apps/backend/src/main/java/no/nav/data/pvk/risikoscenario/domain/RiskoscenarioData.java new file mode 100644 index 000000000..cdbe1d5c7 --- /dev/null +++ b/apps/backend/src/main/java/no/nav/data/pvk/risikoscenario/domain/RiskoscenarioData.java @@ -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 relvanteKravNummerList; + +}