Skip to content

Commit

Permalink
ADD: Domain Object for riskoscenario
Browse files Browse the repository at this point in the history
Co-authored-by: Jeremiah Uy <[email protected]>
Co-authored-by: PaulMartinKokseter <[email protected]>>
  • Loading branch information
3 people committed Nov 21, 2024
1 parent 135aa4a commit 67b0183
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
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();

}
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;

}

0 comments on commit 67b0183

Please sign in to comment.