From f62fa7f3bff82eb005b9976ebf649383aa43befa Mon Sep 17 00:00:00 2001 From: kristenhaerum Date: Tue, 24 Oct 2023 13:44:55 +0200 Subject: [PATCH] Lagt til converter for LocalDate + LocalDateTime --- .../dolly/domain/resultset/aareg/RsAareg.java | 6 +++++- .../resultset/aareg/RsAnsettelsesPeriode.java | 5 +++++ .../resultset/aareg/RsArbeidsavtale.java | 6 ++++++ .../domain/resultset/aareg/RsPeriodeAareg.java | 5 +++++ .../resultset/aareg/RsPeriodeAmelding.java | 5 +++++ .../resultset/arenaforvalter/Arenadata.java | 5 +++++ .../resultset/arenaforvalter/RsArenaAap.java | 5 +++++ .../arenaforvalter/RsArenaAap115.java | 7 +++++++ .../arenaforvalter/RsArenaDagpenger.java | 4 ++++ .../domain/resultset/breg/RsBregdata.java | 4 ++++ .../domain/resultset/histark/RsHistark.java | 6 ++++++ .../inntektsmeldingstub/RsInntektsmelding.java | 12 ++++++++++++ .../inntektstub/RsInntektsinformasjon.java | 8 ++++++++ .../domain/resultset/inst/RsInstdata.java | 7 +++++++ .../krrstub/RsDigitalKontaktdata.java | 4 ++++ .../dolly/domain/resultset/medl/RsMedl.java | 5 +++++ .../resultset/skjerming/RsSkjerming.java | 5 +++++ .../resultset/sykemelding/RsSykemelding.java | 8 ++++++++ .../tpsmessagingservice/RsTpsMessaging.java | 5 +++++ .../resultset/udistub/model/RsUdiPerson.java | 4 ++++ libs/data-transfer-objects/build.gradle | 1 + .../v1/ArbeidsplassenCVDTO.java | 18 ++++++++++++++++++ .../v1/BankkontonrNorskDTO.java | 4 ++++ .../v1/BankkontonrUtlandDTO.java | 4 ++++ .../libs/dto/pdlforvalter/v1/AdresseDTO.java | 5 +++++ .../pdlforvalter/v1/BestillingRequestDTO.java | 5 +++++ .../dto/pdlforvalter/v1/DeltBostedDTO.java | 5 +++++ .../dto/pdlforvalter/v1/DoedfoedtBarnDTO.java | 4 ++++ .../libs/dto/pdlforvalter/v1/DoedsfallDTO.java | 4 ++++ .../dto/pdlforvalter/v1/FalskIdentitetDTO.java | 5 +++++ .../libs/dto/pdlforvalter/v1/FoedselDTO.java | 4 ++++ .../v1/FolkeregisterPersonstatusDTO.java | 5 +++++ .../v1/FolkeregistermetadataDTO.java | 5 +++++ .../dto/pdlforvalter/v1/ForeldreansvarDTO.java | 5 +++++ .../dto/pdlforvalter/v1/FullPersonDTO.java | 5 +++++ .../libs/dto/pdlforvalter/v1/FullmaktDTO.java | 5 +++++ .../dto/pdlforvalter/v1/IdentRequestDTO.java | 5 +++++ .../dto/pdlforvalter/v1/InnflyttingDTO.java | 4 ++++ .../v1/KontaktinformasjonForDoedsboDTO.java | 5 +++++ .../libs/dto/pdlforvalter/v1/NavnDTO.java | 4 ++++ .../libs/dto/pdlforvalter/v1/OppholdDTO.java | 5 +++++ .../dto/pdlforvalter/v1/PersonRequestDTO.java | 5 +++++ .../pdlforvalter/v1/SikkerhetstiltakDTO.java | 5 +++++ .../dto/pdlforvalter/v1/SivilstandDTO.java | 5 +++++ .../pdlforvalter/v1/StatsborgerskapDTO.java | 6 ++++++ .../dto/pdlforvalter/v1/UtflyttingDTO.java | 4 ++++ .../libs/dto/pdlforvalter/v1/VergemaalDTO.java | 5 +++++ 47 files changed, 252 insertions(+), 1 deletion(-) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsAareg.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsAareg.java index 227f76f004b..8447b237863 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsAareg.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsAareg.java @@ -6,6 +6,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.YearMonth; import java.util.ArrayList; @@ -43,7 +46,8 @@ public class RsAareg { private RsAktoer arbeidsgiver; - @Schema(description = "Angir periode oppdateringen gjelder fra") + @Schema(description = "Angir periode oppdateringen gjelder fra", type = "string", pattern="^\\d{4}-\\d{2}$") + @Field(type = FieldType.Date, format = DateFormat.year_month, pattern = "uuuu-MM") private YearMonth navArbeidsforholdPeriode; @Schema(description = "Angir om posten er oppdatering") diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsAnsettelsesPeriode.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsAnsettelsesPeriode.java index b0c00e36c6e..68bb551db20 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsAnsettelsesPeriode.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsAnsettelsesPeriode.java @@ -6,6 +6,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -19,10 +22,12 @@ public class RsAnsettelsesPeriode { @Schema(description = "Dato fra-og-med", type = "LocalDateTime", requiredMode = Schema.RequiredMode.REQUIRED) + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime fom; @Schema(description = "Dato til-og-med", type = "LocalDateTime") + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime tom; @Schema(description = "Årsak for avsluttet ansettelsesperiode (kodeverk: SluttÅrsakAareg)", diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsArbeidsavtale.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsArbeidsavtale.java index bc044d81167..831d0dc732b 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsArbeidsavtale.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsArbeidsavtale.java @@ -6,6 +6,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -28,8 +31,10 @@ public class RsArbeidsavtale { private String avloenningstype; @Schema(type = "LocalDateTime") + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime endringsdatoStillingsprosent; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime sisteLoennsendringsdato; private Double stillingsprosent; @@ -44,5 +49,6 @@ public class RsArbeidsavtale { private String ansettelsesform; @Schema(type = "LocalDateTime") + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime endringsdatoLoenn; } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsPeriodeAareg.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsPeriodeAareg.java index 6351caa4d64..339775144a2 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsPeriodeAareg.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsPeriodeAareg.java @@ -6,6 +6,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -19,9 +22,11 @@ public class RsPeriodeAareg { @Schema(description = "Dato fra-og-med", type = "LocalDateTime", requiredMode = Schema.RequiredMode.REQUIRED) + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime fom; @Schema(description = "Dato til-og-med", type = "LocalDateTime") + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime tom; } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsPeriodeAmelding.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsPeriodeAmelding.java index 26f3381e334..0370221008d 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsPeriodeAmelding.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsPeriodeAmelding.java @@ -6,6 +6,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; import java.util.ArrayList; @@ -23,10 +26,12 @@ public class RsPeriodeAmelding { @Schema(description = "Dato fra-og-med", type = "LocalDateTime", requiredMode = Schema.RequiredMode.REQUIRED) + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime fom; @Schema(description = "Dato til-og-med", type = "LocalDateTime") + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime tom; @Schema(description = "Samlet liste over periode", diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/arenaforvalter/Arenadata.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/arenaforvalter/Arenadata.java index 27501c46d00..713db17cc84 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/arenaforvalter/Arenadata.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/arenaforvalter/Arenadata.java @@ -5,6 +5,9 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; import java.util.ArrayList; @@ -19,6 +22,7 @@ public class Arenadata { @Schema + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime aktiveringDato; @Schema @@ -31,6 +35,7 @@ public class Arenadata { private Boolean automatiskInnsendingAvMeldekort; @Schema(type = "LocalDateTime") + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime inaktiveringDato; @Schema(description = "Om rettigheten aap115 skal aktiveres på personen") diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/arenaforvalter/RsArenaAap.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/arenaforvalter/RsArenaAap.java index 11e9a9fc665..3e1a45b0913 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/arenaforvalter/RsArenaAap.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/arenaforvalter/RsArenaAap.java @@ -7,6 +7,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; import java.util.ArrayList; @@ -25,6 +28,7 @@ public class RsArenaAap extends ArenaPeriode{ public enum VedtakType {O, E, G, S} private String aktivitetsfase; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime datoMottatt; @Schema(description = "O = ny rettighet, S = sletting") private VedtakType vedtaktype; @@ -32,6 +36,7 @@ public enum VedtakType {O, E, G, S} private MedlemFolketrygden medlemFolketrygden; private List andreOkonomYtelserListe; private List institusjonsopphold; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime justertFra; private List vilkaar; private String utfall; diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/arenaforvalter/RsArenaAap115.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/arenaforvalter/RsArenaAap115.java index d1551fd4178..68b9cbe56f9 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/arenaforvalter/RsArenaAap115.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/arenaforvalter/RsArenaAap115.java @@ -5,6 +5,9 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; import java.util.ArrayList; @@ -21,8 +24,11 @@ public class RsArenaAap115 { public enum VedtaksType {O, S} + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime fraDato; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime tilDato; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime datoMottatt; @Schema(description = "Gyldige verdier: O (ny), S (stans)") @@ -56,6 +62,7 @@ public static class MedisinskOpplysning { private String klassifisering; private String diagnose; private String kilde; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime kildeDato; } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/arenaforvalter/RsArenaDagpenger.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/arenaforvalter/RsArenaDagpenger.java index 869d6c1a695..03173f858e0 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/arenaforvalter/RsArenaDagpenger.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/arenaforvalter/RsArenaDagpenger.java @@ -6,6 +6,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -22,5 +25,6 @@ public class RsArenaDagpenger extends ArenaPeriode { private String rettighetKode; @Schema(type = "LocalDateTime") + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime mottattDato; } \ No newline at end of file diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/breg/RsBregdata.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/breg/RsBregdata.java index 69070a66ddb..06488efe3f9 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/breg/RsBregdata.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/breg/RsBregdata.java @@ -6,6 +6,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; import java.util.ArrayList; @@ -55,6 +58,7 @@ public static class RolleTo { private AdresseTo postAdresse; @Schema(defaultValue = "dagens dato") + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime registreringsdato; @Schema diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/histark/RsHistark.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/histark/RsHistark.java index b7cba3b3963..67be357d25c 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/histark/RsHistark.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/histark/RsHistark.java @@ -8,6 +8,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDate; import java.time.LocalDateTime; @@ -49,6 +52,7 @@ public static class RsHistarkDokument { private String skannested; @Schema(description = "Når saksmappen ble skannet") + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime skanningsTidspunkt; @Schema(description = "Temakoder som forsendelsen tilhører, for eksempel “DAG” (Dagpenger)") private List temakoder; @@ -60,9 +64,11 @@ public static class RsHistarkDokument { private String enhetsnummer; @Schema(description = "Startåret for saksmappen") + @Field(type = FieldType.Date, format = DateFormat.basic_date, pattern = "uuuu-MM-dd") private LocalDate startAar; @Schema(description = "Sluttåret for saksmappen") + @Field(type = FieldType.Date, format = DateFormat.basic_date, pattern = "uuuu-MM-dd") private LocalDate sluttAar; @Schema(description = "Selve PDF dokumentet. Ved fysisk dokument brukes bytearray.") diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/inntektsmeldingstub/RsInntektsmelding.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/inntektsmeldingstub/RsInntektsmelding.java index a636cbbd26b..7f1b84503d7 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/inntektsmeldingstub/RsInntektsmelding.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/inntektsmeldingstub/RsInntektsmelding.java @@ -5,6 +5,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDate; import java.time.LocalDateTime; @@ -60,6 +63,7 @@ public static class Inntektsmelding { private List opphoerAvNaturalytelseListe; private List pleiepengerPerioder; private RsRefusjon refusjon; + @Field(type = FieldType.Date, format = DateFormat.basic_date, pattern = "uuuu-MM-dd") private LocalDate startdatoForeldrepengeperiode; private RsSykepengerIArbeidsgiverperioden sykepengerIArbeidsgiverperioden; private YtelseType ytelse; @@ -86,6 +90,7 @@ public static class RsRefusjon { private List endringIRefusjonListe; private Double refusjonsbeloepPrMnd; + @Field(type = FieldType.Date, format = DateFormat.basic_date, pattern = "uuuu-MM-dd") private LocalDate refusjonsopphoersdato; } @@ -96,6 +101,7 @@ public static class RsRefusjon { @JsonInclude(JsonInclude.Include.NON_NULL) public static class RsEndringIRefusjon { + @Field(type = FieldType.Date, format = DateFormat.basic_date, pattern = "uuuu-MM-dd") private LocalDate endringsdato; private Double refusjonsbeloepPrMnd; } @@ -108,6 +114,7 @@ public static class RsEndringIRefusjon { public static class RsNaturalYtelseDetaljer { private Double beloepPrMnd; + @Field(type = FieldType.Date, format = DateFormat.basic_date, pattern = "uuuu-MM-dd") private LocalDate fom; private NaturalytelseType naturalytelseType; } @@ -131,6 +138,7 @@ public static class RsOmsorgspenger { @JsonInclude(JsonInclude.Include.NON_NULL) public static class RsDelvisFravaer { + @Field(type = FieldType.Date, format = DateFormat.basic_date, pattern = "uuuu-MM-dd") private LocalDate dato; private Double timer; } @@ -142,6 +150,7 @@ public static class RsDelvisFravaer { @JsonInclude(JsonInclude.Include.NON_NULL) public static class RsAvsendersystem { + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime innsendingstidspunkt; private String systemnavn; private String systemversjon; @@ -190,6 +199,7 @@ public static class RsArbeidsforhold { private String arbeidsforholdId; private List avtaltFerieListe; private RsAltinnInntekt beregnetInntekt; + @Field(type = FieldType.Date, format = DateFormat.basic_date, pattern = "uuuu-MM-dd") private LocalDate foersteFravaersdag; private List graderingIForeldrepengerListe; private List utsettelseAvForeldrepengerListe; @@ -234,7 +244,9 @@ public static class RsAltinnInntekt { @JsonInclude(JsonInclude.Include.NON_NULL) public static class RsPeriode { + @Field(type = FieldType.Date, format = DateFormat.basic_date, pattern = "uuuu-MM-dd") private LocalDate fom; + @Field(type = FieldType.Date, format = DateFormat.basic_date, pattern = "uuuu-MM-dd") private LocalDate tom; } } \ No newline at end of file diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/inntektstub/RsInntektsinformasjon.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/inntektstub/RsInntektsinformasjon.java index 32c5cc30196..32a7dde9d64 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/inntektstub/RsInntektsinformasjon.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/inntektstub/RsInntektsinformasjon.java @@ -7,6 +7,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; import java.util.ArrayList; @@ -51,6 +54,7 @@ public class RsInntektsinformasjon { private List historikk; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime rapporteringsdato; private Integer versjon; @@ -125,10 +129,12 @@ public static class Arbeidsforhold { @Schema(type = "LocalDateTime", example = "yyyy-MM-dd") + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime startdato; @Schema(type = "LocalDateTime", example = "yyyy-MM-dd") + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime sluttdato; private Double antallTimerPerUkeSomEnFullStillingTilsvarer; @@ -146,10 +152,12 @@ public static class Arbeidsforhold { @Schema(type = "LocalDateTime", example = "yyyy-MM-dd") + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime sisteLoennsendringsdato; @Schema(type = "LocalDateTime", example = "yyyy-MM-dd") + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime sisteDatoForStillingsprosentendring; } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/inst/RsInstdata.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/inst/RsInstdata.java index 33725afecfb..d5cb0e75058 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/inst/RsInstdata.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/inst/RsInstdata.java @@ -6,6 +6,9 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -24,18 +27,22 @@ public class RsInstdata { @Schema( type = "LocalDateTime", description = "Dato for begynnelsen av oppholdet") + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime startdato; @Schema(type = "LocalDateTime", description = "Dato oppholdet er forventet å være avsluttet") + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime forventetSluttdato; @Schema(type = "LocalDateTime", description = "Dato oppholdet var avsluttet") + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime faktiskSluttdato; @Schema(type = "LocalDateTime", description = "Nytt Api har kun denne for slutt av opphold") + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime sluttdato; @Schema(description = "Kodeverdi for oppholdskategori. " diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/krrstub/RsDigitalKontaktdata.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/krrstub/RsDigitalKontaktdata.java index 7e901b2de60..b3f813fe599 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/krrstub/RsDigitalKontaktdata.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/krrstub/RsDigitalKontaktdata.java @@ -4,6 +4,9 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -13,6 +16,7 @@ @AllArgsConstructor public class RsDigitalKontaktdata { + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime gyldigFra; private boolean reservert; private String mobil; diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/medl/RsMedl.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/medl/RsMedl.java index d5b4477eb60..2fd5abfa1f5 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/medl/RsMedl.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/medl/RsMedl.java @@ -6,6 +6,9 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDate; @@ -18,8 +21,10 @@ public class RsMedl { @Schema(description = "Startdatoen for perioden til medlemskapsunntaket, på ISO-8601 format.") + @Field(type = FieldType.Date, format = DateFormat.basic_date, pattern = "uuuu-MM-dd") private LocalDate fraOgMed; @Schema(description = "Sluttdatoen for perioden til medlemskapsunntaket, på ISO-8601 format.") + @Field(type = FieldType.Date, format = DateFormat.basic_date, pattern = "uuuu-MM-dd") private LocalDate tilOgMed; @Schema(description = "Grunnlaget for dette medlemskapsunntaket.\n" + diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/skjerming/RsSkjerming.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/skjerming/RsSkjerming.java index a845e4aaa67..7cefe177e02 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/skjerming/RsSkjerming.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/skjerming/RsSkjerming.java @@ -6,6 +6,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -17,6 +20,8 @@ @JsonInclude(JsonInclude.Include.NON_NULL) public class RsSkjerming { + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime egenAnsattDatoFom; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime egenAnsattDatoTom; } \ No newline at end of file diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/sykemelding/RsSykemelding.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/sykemelding/RsSykemelding.java index b268e7736b2..430979e7f77 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/sykemelding/RsSykemelding.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/sykemelding/RsSykemelding.java @@ -7,6 +7,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDate; import java.time.LocalDateTime; @@ -37,6 +40,7 @@ public static class RsSyntSykemelding { private String arbeidsforholdId; private String orgnummer; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime startDato; } @@ -58,6 +62,7 @@ public static class RsDetaljertSykemelding { private Pasient pasient; private List perioder; private Organisasjon sender; + @Field(type = FieldType.Date, format = DateFormat.basic_date, pattern = "uuuu-MM-dd") private LocalDate startDato; private Boolean umiddelbarBistand; @@ -159,6 +164,7 @@ public static class Pasient { private Adresse adresse; private String etternavn; + @Field(type = FieldType.Date, format = DateFormat.basic_date, pattern = "uuuu-MM-dd") private LocalDate foedselsdato; private String fornavn; private String ident; @@ -176,7 +182,9 @@ public static class Pasient { public static class Periode { private DollyAktivitet aktivitet; + @Field(type = FieldType.Date, format = DateFormat.basic_date, pattern = "uuuu-MM-dd") private LocalDate fom; + @Field(type = FieldType.Date, format = DateFormat.basic_date, pattern = "uuuu-MM-dd") private LocalDate tom; } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/tpsmessagingservice/RsTpsMessaging.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/tpsmessagingservice/RsTpsMessaging.java index 466539a6dcd..9db4a3343e6 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/tpsmessagingservice/RsTpsMessaging.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/tpsmessagingservice/RsTpsMessaging.java @@ -8,6 +8,9 @@ import lombok.Setter; import no.nav.testnav.libs.dto.kontoregisterservice.v1.BankkontonrNorskDTO; import no.nav.testnav.libs.dto.kontoregisterservice.v1.BankkontonrUtlandDTO; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDate; @@ -20,7 +23,9 @@ public class RsTpsMessaging { private String spraakKode; + @Field(type = FieldType.Date, format = DateFormat.basic_date, pattern = "uuuu-MM-dd") private LocalDate egenAnsattDatoFom; + @Field(type = FieldType.Date, format = DateFormat.basic_date, pattern = "uuuu-MM-dd") private LocalDate egenAnsattDatoTom; private BankkontonrUtlandDTO utenlandskBankkonto; private BankkontonrNorskDTO norskBankkonto; diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/udistub/model/RsUdiPerson.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/udistub/model/RsUdiPerson.java index 709e094edda..8bc248039ac 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/udistub/model/RsUdiPerson.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/udistub/model/RsUdiPerson.java @@ -7,6 +7,9 @@ import lombok.NoArgsConstructor; import no.nav.dolly.domain.resultset.udistub.model.arbeidsadgang.RsUdiArbeidsadgang; import no.nav.dolly.domain.resultset.udistub.model.opphold.RsUdiOppholdStatus; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -23,5 +26,6 @@ public class RsUdiPerson { private Boolean harOppholdsTillatelse; private Boolean flyktning; private String soeknadOmBeskyttelseUnderBehandling; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime soknadDato; } diff --git a/libs/data-transfer-objects/build.gradle b/libs/data-transfer-objects/build.gradle index b4869a7a393..595ae4c8277 100644 --- a/libs/data-transfer-objects/build.gradle +++ b/libs/data-transfer-objects/build.gradle @@ -61,6 +61,7 @@ dependencies { implementation 'org.apache.commons:commons-lang3' implementation 'org.springframework:spring-web' + implementation 'org.opensearch.client:spring-data-opensearch:1.2.0' implementation 'no.nav.tjenestespesifikasjoner:nav-altinn-inntektsmelding:1.2019.08.16-13.46-35cbdfd492d4' diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/arbeidsplassencv/v1/ArbeidsplassenCVDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/arbeidsplassencv/v1/ArbeidsplassenCVDTO.java index 0f792ffc804..ce8cdc10e3c 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/arbeidsplassencv/v1/ArbeidsplassenCVDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/arbeidsplassencv/v1/ArbeidsplassenCVDTO.java @@ -6,6 +6,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; import java.util.ArrayList; @@ -36,6 +39,7 @@ public class ArbeidsplassenCVDTO { private String sammendrag; private Jobboensker jobboensker; private Boolean sistEndretAvNav; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime sistEndret; public List getArbeidserfaring() { @@ -121,7 +125,9 @@ public static class Arbeidserfaring extends CVFelles { private String conceptId; private String location; private String description; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime fromDate; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime toDate; private Boolean ongoing; private String styrkkode; @@ -140,7 +146,9 @@ public static class Utdanning extends CVFelles { private String nuskode; private Boolean hasAuthorization; private Yrkesskole vocationalCollege; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime startDate; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime endDate; private String description; private Boolean ongoing; @@ -165,7 +173,9 @@ public static class AnnenGodkjenning extends CVFelles { private String alternativeName; private String conceptId; private String issuer; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime fromDate; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime toDate; } @@ -177,7 +187,9 @@ public static class AnnenGodkjenning extends CVFelles { public static class Foererkort extends CVFelles { private String type; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime acquiredDate; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime expiryDate; } @@ -190,7 +202,9 @@ public static class AnnenErfaring extends CVFelles { private String description; private String role; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime fromDate; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime toDate; private Boolean ongoing; } @@ -206,6 +220,7 @@ public static class Kurs extends CVFelles { private String issuer; private Long duration; private Tidsenhet durationUnit; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime date; } @@ -247,7 +262,9 @@ public static class OffentligeGodkjenning extends CVFelles { private String title; private String conceptId; private String issuer; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime fromDate; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime toDate; } @@ -385,6 +402,7 @@ public static class Location { @NoArgsConstructor public abstract static class CVFelles { private String uuid; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime updatedAt; } } diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/kontoregisterservice/v1/BankkontonrNorskDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/kontoregisterservice/v1/BankkontonrNorskDTO.java index e4104cb4294..05121d0bd55 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/kontoregisterservice/v1/BankkontonrNorskDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/kontoregisterservice/v1/BankkontonrNorskDTO.java @@ -6,6 +6,9 @@ import lombok.Data; import lombok.NoArgsConstructor; import lombok.With; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -19,6 +22,7 @@ public class BankkontonrNorskDTO { private String kontonummer; @Schema(description = "Datofeltet benyttes til lesning kun") + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime kontoRegdato; private Boolean tilfeldigKontonummer; diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/kontoregisterservice/v1/BankkontonrUtlandDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/kontoregisterservice/v1/BankkontonrUtlandDTO.java index d485d9cb9d3..cc617cb27ca 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/kontoregisterservice/v1/BankkontonrUtlandDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/kontoregisterservice/v1/BankkontonrUtlandDTO.java @@ -5,6 +5,9 @@ import lombok.Data; import lombok.NoArgsConstructor; import lombok.With; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -26,5 +29,6 @@ public class BankkontonrUtlandDTO { private String landkode; private Boolean tilfeldigKontonummer; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime kontoRegdato; } diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/AdresseDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/AdresseDTO.java index 8f0f840e5cf..731b36d79a3 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/AdresseDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/AdresseDTO.java @@ -9,6 +9,9 @@ import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; import no.nav.testnav.libs.dto.pdlforvalter.v1.deserialization.OppholdAnnetStedEnumDeserializer; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.io.Serializable; import java.time.LocalDateTime; @@ -21,7 +24,9 @@ public abstract class AdresseDTO extends DbVersjonDTO { private String adresseIdentifikatorFraMatrikkelen; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime gyldigFraOgMed; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime gyldigTilOgMed; @Schema(description = "For å sette coAdresseNavn, benytt opprettCoAdresseNavn") diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/BestillingRequestDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/BestillingRequestDTO.java index 109a674838e..4ffa08bd9c8 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/BestillingRequestDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/BestillingRequestDTO.java @@ -5,6 +5,9 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -18,7 +21,9 @@ public class BestillingRequestDTO { private Identtype identtype; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime foedtEtter; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime foedtFoer; private Integer alder; diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/DeltBostedDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/DeltBostedDTO.java index 356f3a7583a..89bc6fb1005 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/DeltBostedDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/DeltBostedDTO.java @@ -6,6 +6,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -18,7 +21,9 @@ public class DeltBostedDTO extends DbVersjonDTO { private String adresseIdentifikatorFraMatrikkelen; private String coAdressenavn; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime sluttdatoForKontrakt; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime startdatoForKontrakt; private VegadresseDTO vegadresse; private UkjentBostedDTO ukjentBosted; diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/DoedfoedtBarnDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/DoedfoedtBarnDTO.java index fa1e470a404..4e47abe23e7 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/DoedfoedtBarnDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/DoedfoedtBarnDTO.java @@ -5,6 +5,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -15,5 +18,6 @@ @AllArgsConstructor public class DoedfoedtBarnDTO extends DbVersjonDTO { + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime dato; } \ No newline at end of file diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/DoedsfallDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/DoedsfallDTO.java index 786a8cdfcb7..9ed1bbb979f 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/DoedsfallDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/DoedsfallDTO.java @@ -5,6 +5,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -15,5 +18,6 @@ @AllArgsConstructor public class DoedsfallDTO extends DbVersjonDTO { + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime doedsdato; } diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FalskIdentitetDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FalskIdentitetDTO.java index e4fec9ef4ee..fee08485d1a 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FalskIdentitetDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FalskIdentitetDTO.java @@ -8,6 +8,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.io.Serializable; import java.time.LocalDateTime; @@ -30,7 +33,9 @@ public class FalskIdentitetDTO extends DbVersjonDTO { "nyFalskIdentitet er satt vil ny person oppreettes og bli satt til rettIdentitetVedIdentifikasjonsnummer.") private Boolean erFalsk; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime gyldigFraOgMed; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime gyldigTilOgMed; private PersonRequestDTO nyFalskIdentitetPerson; diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FoedselDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FoedselDTO.java index 70080fac05c..ec268436cfc 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FoedselDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FoedselDTO.java @@ -5,6 +5,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -19,5 +22,6 @@ public class FoedselDTO extends DbVersjonDTO { private String foedeland; private String foedested; private Integer foedselsaar; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime foedselsdato; } diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FolkeregisterPersonstatusDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FolkeregisterPersonstatusDTO.java index 9abe0f8c268..8595033e51d 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FolkeregisterPersonstatusDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FolkeregisterPersonstatusDTO.java @@ -5,6 +5,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -28,6 +31,8 @@ public enum FolkeregisterPersonstatus { } private FolkeregisterPersonstatus status; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime gyldigFraOgMed; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime gyldigTilOgMed; } diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FolkeregistermetadataDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FolkeregistermetadataDTO.java index 2232b0852bf..f0374d20d60 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FolkeregistermetadataDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FolkeregistermetadataDTO.java @@ -4,6 +4,9 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.io.Serializable; import java.time.LocalDateTime; @@ -16,6 +19,8 @@ public class FolkeregistermetadataDTO implements Serializable { private LocalDateTime ajourholdstidspunkt; private Boolean gjeldende; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime gyldighetstidspunkt; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime opphoerstidspunkt; } \ No newline at end of file diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/ForeldreansvarDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/ForeldreansvarDTO.java index 4556a4c3f6d..aed2dafc1b7 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/ForeldreansvarDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/ForeldreansvarDTO.java @@ -6,6 +6,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -23,7 +26,9 @@ public class ForeldreansvarDTO extends DbVersjonDTO { private String ansvarlig; private PersonRequestDTO nyAnsvarlig; private RelatertBiPersonDTO ansvarligUtenIdentifikator; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime gyldigFraOgMed; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime gyldigTilOgMed; private Boolean eksisterendePerson; diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FullPersonDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FullPersonDTO.java index 7a2b9c200b4..553d73e1097 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FullPersonDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FullPersonDTO.java @@ -4,6 +4,9 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; import java.util.ArrayList; @@ -21,6 +24,7 @@ public class FullPersonDTO { private PersonDTO person; private List relasjoner; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime sistOppdatert; public List getRelasjoner() { @@ -38,6 +42,7 @@ public static class RelasjonDTO { private Long id; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime sistOppdatert; private RelasjonType relasjonType; private PersonDTO relatertPerson; diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FullmaktDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FullmaktDTO.java index 99149f91370..f9a54c4a03d 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FullmaktDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/FullmaktDTO.java @@ -6,6 +6,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; import java.util.List; @@ -22,7 +25,9 @@ public class FullmaktDTO extends DbVersjonDTO { private PersonRequestDTO nyFullmektig; private String motpartsPersonident; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime gyldigFraOgMed; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime gyldigTilOgMed; private List omraader; diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/IdentRequestDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/IdentRequestDTO.java index 38f71efe50f..6537e3af4e7 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/IdentRequestDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/IdentRequestDTO.java @@ -7,6 +7,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.io.Serializable; import java.time.LocalDateTime; @@ -21,7 +24,9 @@ public class IdentRequestDTO extends DbVersjonDTO { // All fields are optional private Identtype identtype; private KjoennDTO.Kjoenn kjoenn; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime foedtEtter; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime foedtFoer; private Integer alder; private Boolean syntetisk; diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/InnflyttingDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/InnflyttingDTO.java index 32038722f66..2ff039c61ee 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/InnflyttingDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/InnflyttingDTO.java @@ -5,6 +5,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -17,5 +20,6 @@ public class InnflyttingDTO extends DbVersjonDTO { private String fraflyttingsland; private String fraflyttingsstedIUtlandet; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime innflyttingsdato; } \ No newline at end of file diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/KontaktinformasjonForDoedsboDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/KontaktinformasjonForDoedsboDTO.java index 280afa2b064..590c2459951 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/KontaktinformasjonForDoedsboDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/KontaktinformasjonForDoedsboDTO.java @@ -8,6 +8,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.io.Serializable; import java.time.LocalDateTime; @@ -29,6 +32,7 @@ public class KontaktinformasjonForDoedsboDTO extends DbVersjonDTO { @Schema( type = "LocalDateTime", description = "Dato for utstedelse") + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime attestutstedelsesdato; private KontaktinformasjonForDoedsboAdresse adresse; @@ -78,6 +82,7 @@ public static class KontaktpersonDTO implements Serializable { private String identifikasjonsnummer; private PersonRequestDTO nyKontaktperson; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime foedselsdato; private PersonNavnDTO navn; diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/NavnDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/NavnDTO.java index 0da9c15e1d8..eea90a4cd0c 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/NavnDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/NavnDTO.java @@ -5,6 +5,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -20,5 +23,6 @@ public class NavnDTO extends DbVersjonDTO { private String mellomnavn; private Boolean hasMellomnavn; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime gyldigFraOgMed; } diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/OppholdDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/OppholdDTO.java index b2f3ea4a551..9d5de512fa4 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/OppholdDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/OppholdDTO.java @@ -5,6 +5,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -15,7 +18,9 @@ @AllArgsConstructor public class OppholdDTO extends DbVersjonDTO { + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime oppholdFra; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime oppholdTil; private OppholdType type; public enum OppholdType {MIDLERTIDIG, PERMANENT, OPPLYSNING_MANGLER} diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/PersonRequestDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/PersonRequestDTO.java index a4ffd0f522d..f6078d09cb2 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/PersonRequestDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/PersonRequestDTO.java @@ -4,6 +4,9 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.io.Serializable; import java.time.LocalDateTime; @@ -17,7 +20,9 @@ public class PersonRequestDTO implements Serializable { // All fields are optional private Identtype identtype; private KjoennDTO.Kjoenn kjoenn; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime foedtEtter; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime foedtFoer; private Integer alder; private Boolean syntetisk; diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/SikkerhetstiltakDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/SikkerhetstiltakDTO.java index 67de152710e..a6556d08608 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/SikkerhetstiltakDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/SikkerhetstiltakDTO.java @@ -7,6 +7,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.io.Serializable; import java.time.LocalDateTime; @@ -24,8 +27,10 @@ public class SikkerhetstiltakDTO extends DbVersjonDTO { private String beskrivelse; private Kontaktperson kontaktperson; @Schema + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime gyldigFraOgMed; @Schema + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime gyldigTilOgMed; public enum Tiltakstype {FYUS, TFUS, FTUS, DIUS, TOAN} diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/SivilstandDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/SivilstandDTO.java index 1bfae39c062..b6181d20358 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/SivilstandDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/SivilstandDTO.java @@ -6,6 +6,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -33,8 +36,10 @@ public enum Sivilstand { SAMBOER } + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime bekreftelsesdato; private String relatertVedSivilstand; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime sivilstandsdato; private Sivilstand type; diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/StatsborgerskapDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/StatsborgerskapDTO.java index c7ad3c3eb49..4e47a9201af 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/StatsborgerskapDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/StatsborgerskapDTO.java @@ -5,6 +5,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -16,7 +19,10 @@ public class StatsborgerskapDTO extends DbVersjonDTO { private String landkode; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime gyldigFraOgMed; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime gyldigTilOgMed; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime bekreftelsesdato; } \ No newline at end of file diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/UtflyttingDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/UtflyttingDTO.java index a32e549f550..6fda1245122 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/UtflyttingDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/UtflyttingDTO.java @@ -6,6 +6,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -20,6 +23,7 @@ public class UtflyttingDTO extends DbVersjonDTO { private String tilflyttingsland; private String tilflyttingsstedIUtlandet; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime utflyttingsdato; @JsonIgnore diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/VergemaalDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/VergemaalDTO.java index 4eaa94c0fdd..2ea5be39ac4 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/VergemaalDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/VergemaalDTO.java @@ -6,6 +6,9 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; import java.time.LocalDateTime; @@ -20,7 +23,9 @@ public class VergemaalDTO extends DbVersjonDTO { private VergemaalEmbete vergemaalEmbete; private VergemaalSakstype sakType; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime gyldigFraOgMed; + @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second, pattern = "uuuu-MM-dd'T'HH:mm:ss") private LocalDateTime gyldigTilOgMed; private PersonRequestDTO nyVergeIdent;