001package org.gbif.api.model.collections.descriptors; 002 003import java.util.Date; 004 005import java.util.Set; 006 007import lombok.AllArgsConstructor; 008import lombok.Builder; 009import lombok.Data; 010 011import java.util.List; 012import java.util.UUID; 013 014import lombok.NoArgsConstructor; 015 016import org.gbif.api.model.collections.suggestions.Status; 017import org.gbif.api.model.collections.suggestions.Type; 018import org.gbif.api.model.common.export.ExportFormat; 019import org.gbif.api.vocabulary.Country; 020 021/** 022 * Domain model representing a change suggestion for a descriptor. 023 */ 024@Data 025@Builder 026@AllArgsConstructor 027@NoArgsConstructor 028public class DescriptorChangeSuggestion { 029 /** 030 * Auto-generated key from the database sequence. 031 */ 032 private long key; 033 034 /** 035 * Collection identifier to which this change suggestion applies. 036 */ 037 private UUID collectionKey; 038 039 /** 040 * Descriptor Group identifier to which this change suggestion applies. 041 */ 042 private Long descriptorGroupKey; 043 044 /** 045 * Format of the Descriptor Group 046 */ 047 private ExportFormat format; 048 049 /** 050 * The type of change: CREATE, UPDATE, or DELETE. 051 */ 052 private Type type; 053 054 /** 055 * Title of the Descriptor Group 056 */ 057 private String title; 058 059 /** 060 * Description of the Descriptor Group 061 */ 062 private String description; 063 064 /** 065 * Tags of the Descriptor Group 066 */ 067 private Set<String> tags; 068 069 /** 070 * The current status: PENDING, APPROVED, or DISCARDED. 071 */ 072 private Status status; 073 074 /** 075 * Timestamp when the suggestion was proposed. 076 */ 077 private Date proposed; 078 079 /** 080 * Username of the proposer. 081 */ 082 private String proposedBy; 083 084 /** 085 * Email address of the proposer. 086 */ 087 private String proposerEmail; 088 089 /** 090 * Timestamp when the suggestion was applied. 091 */ 092 private Date applied; 093 094 /** 095 * Username who applied the suggestion. 096 */ 097 private String appliedBy; 098 099 /** 100 * Timestamp when the suggestion was discarded. 101 */ 102 private Date discarded; 103 104 /** 105 * Username who discarded the suggestion. 106 */ 107 private String discardedBy; 108 109 /** 110 * Path to the suggested file stored on disk. 111 */ 112 private String suggestedFile; 113 114 /** 115 * Optional comments. 116 */ 117 private List<String> comments; 118 119 /** 120 * Country of the related collection 121 */ 122 private Country country; 123 124 /** 125 * Timestamp when the suggestion was last modified. 126 */ 127 private Date modified; 128 129 /** 130 * Username who last modified the suggestion. 131 */ 132 private String modifiedBy; 133} 134