generated from 2martens/template-service
41 lines
1.5 KiB
Java
41 lines
1.5 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;
|
|
|
|
@SuperBuilder
|
|
@Getter
|
|
@ToString
|
|
@EqualsAndHashCode(callSuper = true)
|
|
@AllArgsConstructor(access = AccessLevel.PRIVATE)
|
|
@NoArgsConstructor(force = true, access = AccessLevel.PRIVATE)
|
|
@Schema(allOf = CommonFields.class)
|
|
public class Membership extends CommonFields {
|
|
@Schema(description = "URL to the person related to this membership", nullable = true)
|
|
private final String person;
|
|
|
|
@Schema(description = "URL to the organization related to this membership", nullable = true)
|
|
private final String organization;
|
|
|
|
@Schema(description = "role of the person for the organization", nullable = true)
|
|
private final String role;
|
|
|
|
@Schema(description = "True if the person has a voting right in the organization")
|
|
private final boolean votingRight;
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
|
@Schema(description = "first day of the membership", nullable = true)
|
|
private final LocalDate startDate;
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
|
@Schema(description = "last day of the membership", nullable = true)
|
|
private final LocalDate endDate;
|
|
|
|
@Schema(description = "URL to the organization for which the person is member in the organization", nullable = true)
|
|
private final String onBehalfOf;
|
|
}
|