diff --git a/apps/backend/src/main/java/no/nav/data/pvk/pvkdokument/domain/OpplysningtypeData.java b/apps/backend/src/main/java/no/nav/data/pvk/pvkdokument/domain/OpplysningtypeData.java new file mode 100644 index 000000000..014edb966 --- /dev/null +++ b/apps/backend/src/main/java/no/nav/data/pvk/pvkdokument/domain/OpplysningtypeData.java @@ -0,0 +1,6 @@ +package no.nav.data.pvk.pvkdokument.domain; + +public class OpplysningtypeData { + private String opplysningtypeId; + private String antallBruker; +} diff --git a/apps/backend/src/main/java/no/nav/data/pvk/pvkdokument/domain/PvkDokument.java b/apps/backend/src/main/java/no/nav/data/pvk/pvkdokument/domain/PvkDokument.java new file mode 100644 index 000000000..2b9bae461 --- /dev/null +++ b/apps/backend/src/main/java/no/nav/data/pvk/pvkdokument/domain/PvkDokument.java @@ -0,0 +1,46 @@ +package no.nav.data.pvk.pvkdokument.domain; + +import io.hypersistence.utils.hibernate.type.json.JsonBinaryType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +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 +@Table(name = "PVK_DOKUMENT") +public class PvkDokument extends Auditable { + + @Id + @Builder.Default + @Column(name = "ID") + private UUID id = UUID.randomUUID(); + + @Column(name = "ETTERLEVELSE_DOKUMENTASJON_ID", nullable = false) + private String etterlevelseDokumentId; + + @Builder.Default + @Column(name = "STATUS") + private PvkDokumentStatus status = PvkDokumentStatus.AKTIV; + + @Type(value = JsonBinaryType.class) + @Column(name = "DATA", nullable = false) + @Builder.Default + private PvkDokumentData pvkDokumentData = new PvkDokumentData(); + + +} diff --git a/apps/backend/src/main/java/no/nav/data/pvk/pvkdokument/domain/PvkDokumentData.java b/apps/backend/src/main/java/no/nav/data/pvk/pvkdokument/domain/PvkDokumentData.java new file mode 100644 index 000000000..d76bb961b --- /dev/null +++ b/apps/backend/src/main/java/no/nav/data/pvk/pvkdokument/domain/PvkDokumentData.java @@ -0,0 +1,35 @@ +package no.nav.data.pvk.pvkdokument.domain; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.util.List; + +@Data +@Builder +@EqualsAndHashCode +@NoArgsConstructor +@AllArgsConstructor +public class PvkDokumentData { + + private List ytterligereEgenskaper; + private Boolean skalUtforePvk; + private String PvkVurderingsBegrunnelse; + + private Boolean stemmerOpplysningstypene; + private List opplysningtypeData; + private String tilgangsBeskrivelseForOpplysningstyper; + private String lagringsBeskrivelseForOpplysningstyper; + + private Boolean stemmerPersonkategorier; + private Boolean harInvolvertRepresentant; + private String representantInvolveringsBeskrivelse; + + private Boolean stemmerDatabehandlere; + private Boolean harDatabehandlerRepresentantInvolvering; + private String dataBehandlerRepresentantInvolveringBeskrivelse; + +} diff --git a/apps/backend/src/main/java/no/nav/data/pvk/pvkdokument/domain/PvkDokumentStatus.java b/apps/backend/src/main/java/no/nav/data/pvk/pvkdokument/domain/PvkDokumentStatus.java new file mode 100644 index 000000000..592f2c581 --- /dev/null +++ b/apps/backend/src/main/java/no/nav/data/pvk/pvkdokument/domain/PvkDokumentStatus.java @@ -0,0 +1,6 @@ +package no.nav.data.pvk.pvkdokument.domain; + +public enum PvkDokumentStatus { + AKTIV, + INAKTIV +} diff --git a/apps/backend/src/main/java/no/nav/data/pvk/pvkdokument/domain/YtterligereEgenskaper.java b/apps/backend/src/main/java/no/nav/data/pvk/pvkdokument/domain/YtterligereEgenskaper.java new file mode 100644 index 000000000..e7b998812 --- /dev/null +++ b/apps/backend/src/main/java/no/nav/data/pvk/pvkdokument/domain/YtterligereEgenskaper.java @@ -0,0 +1,9 @@ +package no.nav.data.pvk.pvkdokument.domain; + +public enum YtterligereEgenskaper { + SYSTEMATISK_OVERVÅKNING, + PERSONOPPLYSNINGER_BEHANDLES, + SAMMENSTILLING_AV_DATASETT, + BRUK_AV_NY_TEKNOLOGI, + TJENESTE_TILGANG, +}