diff --git a/oparl-server/src/main/java/de/twomartens/oparlservice/entity/Organization.java b/oparl-server/src/main/java/de/twomartens/oparlservice/entity/Organization.java index 7fd724d..445441a 100644 --- a/oparl-server/src/main/java/de/twomartens/oparlservice/entity/Organization.java +++ b/oparl-server/src/main/java/de/twomartens/oparlservice/entity/Organization.java @@ -73,7 +73,7 @@ public class Organization { @Schema(description = "rough categorization of the organization", nullable = true, allowableValues = "Gremium, Partei, Fraktion, Verwaltungsbereich, externes Gremium, Institution, Sonstiges") - private final String organizationType; + private final OrganizationType organizationType; @Schema(description = "type of organization", nullable = true) private final String classification; diff --git a/oparl-server/src/main/java/de/twomartens/oparlservice/entity/OrganizationType.java b/oparl-server/src/main/java/de/twomartens/oparlservice/entity/OrganizationType.java new file mode 100644 index 0000000..3ff70ac --- /dev/null +++ b/oparl-server/src/main/java/de/twomartens/oparlservice/entity/OrganizationType.java @@ -0,0 +1,21 @@ +package de.twomartens.oparlservice.entity; + +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import lombok.ToString; + +@RequiredArgsConstructor +@Getter(onMethod_={@JsonValue}) +@ToString +public enum OrganizationType { + BODY("Gremium"), + PARTY("Partei"), + FACTION("Fraktion"), + ADMINISTRATIVE_AREA("Verwaltungsbereich"), + EXTERNAL_BODY("externes Gremium"), + INSTITUTION("Institution"), + OTHER("Sonstiges"); + + private final String value; +}