package com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier;

import java.time.OffsetDateTime;
import java.util.HashSet;
import java.util.Set;

import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.DownloadFileType;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Dossier {

    private String id;
    private String name;
    private OffsetDateTime date;
    private String description;
    private String ownerId;
    private Set<String> memberIds = new HashSet<>();
    private Set<String> approverIds = new HashSet<>();
    private Set<DownloadFileType> downloadFileTypes = new HashSet<>();
    private Set<String> reportTemplateIds = new HashSet<>();
    private Long watermarkId;
    private Long previewWatermarkId;
    private OffsetDateTime softDeletedTime;
    private OffsetDateTime hardDeletedTime;
    private OffsetDateTime startDate;
    private OffsetDateTime dueDate;
    private OffsetDateTime archivedTime;
    private OffsetDateTime lastUpdated;
    private String dossierTemplateId;
    private String dossierStatusId;
    private DossierVisibility visibility;
    private DossierAttributes dossierAttributes;

    // TODO: The following getters and setter ensure backwards compatibility. Remove them as soon as UI does not use them anymore


    @Deprecated
    public String getDossierId() {

        return id;
    }


    @Deprecated
    public String getDossierName() {

        return name;
    }


    @Deprecated
    public void setDossierName(String name) {

        this.name = name;
    }

}
