package de.ph87.isabell_und_timo.picture;

import jakarta.annotation.Nullable;
import lombok.Data;
import lombok.NonNull;

import java.time.ZonedDateTime;

@Data
public class PictureDto {

  @NonNull
  public final String uuid;

  @Nullable
  public final ZonedDateTime originalDate;

  @NonNull
  public final ZonedDateTime uploadDate;

  public final boolean visible;

  public PictureDto(@NonNull final Picture picture) {
    this.uuid = picture.getUuid();
    this.originalDate = picture.getOriginalDate();
    this.uploadDate = picture.getUploadDate();
    this.visible = picture.isVisible();
  }

}
