Added remaining entities

This commit is contained in:
Jim Martens 2020-07-10 20:37:36 +02:00
parent 4db3b13082
commit 37ee7bff7a
2 changed files with 98 additions and 0 deletions

View File

@ -0,0 +1,34 @@
package de.twomartens.oparlservice.entity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.SuperBuilder;
import java.util.List;
@SuperBuilder
@Getter
@ToString
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@NoArgsConstructor(force = true, access = AccessLevel.PRIVATE)
@Schema(allOf = CommonFields.class)
public class Consultation extends CommonFields {
@Schema(description = "URL to the paper related to this consultation", nullable = true)
private final String paper;
@Schema(description = "URL to the agenda item related to this consultation", nullable = true)
private final String agendaItem;
@Schema(description = "URL to the meeting related to this consultation", nullable = true)
private final String meeting;
@Schema(description = "List of URLs to organizations that participate in this consultation", nullable = true)
private final List<String> organization;
@Schema(description = "True if a decision will be or has been reached in this consultation")
private final boolean authoritative;
@Schema(description = "role or function of this consultation", example = "Anhörung, Entscheidung, usw", nullable = true)
private final String role;
}

View File

@ -0,0 +1,64 @@
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.util.List;
@SuperBuilder
@Getter
@ToString
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@NoArgsConstructor(force = true, access = AccessLevel.PRIVATE)
@Schema(allOf = CommonFields.class)
public class Paper extends CommonFields {
@Schema(description = "URL to the body this paper belongs to", nullable = true)
private final String body;
@Schema(description = "name of this paper", nullable = true)
private final String name;
@Schema(description = "official identifier to uniquely identify this paper", nullable = true)
private final String reference;
@JsonFormat(shape = JsonFormat.Shape.STRING)
@Schema(description = "date which is used, for example, as a reference for deadlines", nullable = true)
private final LocalDate date;
@Schema(description = "type of this paper", nullable = true, example = "Beantwortung einer Anfrage")
private final String paperType;
@Schema(description = "List of URLs to related papers", nullable = true)
private final List<String> relatedPaper;
@Schema(description = "List of URLs to superordinate papers", nullable = true)
private final List<String> superordinatedPaper;
@Schema(description = "List of URLs to subordinate papers", nullable = true)
private final List<String> subordinatedPapers;
@Schema(description = "main file for this paper", nullable = true)
private final File mainFile;
@Schema(description = "additional files for this paper with exception of mainFile", nullable = true)
private final List<File> auxiliaryFile;
@Schema(description = "List of locations related to this paper", nullable = true)
private final List<Location> location;
@Schema(description = "List of URLs to authors of this paper", nullable = true)
private final List<String> originatorPerson;
@Schema(description = "List of URLs to organizations that authored this paper", nullable = true)
private final List<String> originatorOrganization;
@Schema(description = "List of URLs to organizations responsible for content of or response to this paper", nullable = true)
private final List<String> underDirectionOf;
@Schema(description = "List of consultations for this paper", nullable = true)
private final List<Consultation> consultation;
}