oparl-service/oparl-server/src/main/java/de/twomartens/oparlservice/entity/LegislativeTerm.java

34 lines
1.1 KiB
Java

package de.twomartens.oparlservice.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.SuperBuilder;
import java.time.LocalDate;
import java.time.ZonedDateTime;
@SuperBuilder
@Getter
@ToString
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@NoArgsConstructor(force = true, access = AccessLevel.PRIVATE)
@Schema(allOf = CommonFields.class)
public class LegislativeTerm extends CommonFields {
@Schema(description = "URL to body this legislative term belongs to", nullable = true)
private final String body;
@Schema(description = "User friendly name of legislative term", nullable = true)
private final String name;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
@Schema(description = "First day of legislative term", nullable = true)
private final LocalDate startDate;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
@Schema(description = "Last day of legislative term", nullable = true)
private final LocalDate endDate;
}