package ru.ulstu.file.model;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

public class FileDataDto {
    private Integer id;
    private String name;
    private String fileName;
    private String tmpFileName;

    private boolean deleted;

    public FileDataDto() {
    }

    @JsonCreator
    public FileDataDto(@JsonProperty("id") Integer id,
                       @JsonProperty("name") String name,
                       @JsonProperty("fileName") String fileName,
                       @JsonProperty("tmpFileName") String tmpFileName) {
        this.id = id;
        this.name = name;
        this.fileName = fileName;
        this.tmpFileName = tmpFileName;
    }

    public FileDataDto(FileData fileData) {
        this.id = fileData.getId();
        this.name = fileData.getName();
    }

    public FileDataDto(String fileName, String tmpFileName) {
        this.fileName = fileName;
        this.tmpFileName = tmpFileName;
    }
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getTmpFileName() {
        return tmpFileName;
    }

    public void setTmpFileName(String tmpFileName) {
        this.tmpFileName = tmpFileName;
    }

    public boolean isDeleted() {
        return deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }

}
