Browse Source

Added MeetingState to symbolize limited options

master
Jim Martens 10 months ago
parent
commit
02efc1b76a
  1. 2
      oparl-server/src/main/java/de/twomartens/oparlservice/entity/Meeting.java
  2. 17
      oparl-server/src/main/java/de/twomartens/oparlservice/entity/MeetingState.java

2
oparl-server/src/main/java/de/twomartens/oparlservice/entity/Meeting.java

@ -50,7 +50,7 @@ public class Meeting {
private final String name;
@Schema(description = "current status of the meeting", allowableValues = "terminiert, eingeladen, durchgeführt", nullable = true)
private final String meetingState;
private final MeetingState meetingState;
@Schema(description = "True if this meeting was cancelled")
private final boolean cancelled;

17
oparl-server/src/main/java/de/twomartens/oparlservice/entity/MeetingState.java

@ -0,0 +1,17 @@
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 MeetingState {
SCHEDULED("terminiert"),
INVITED("eingeladen"),
FINISHED("durchgeführt");
private final String value;
}
Loading…
Cancel
Save