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