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; private Boolean isLatexAttach; public FileDataDto() { } @JsonCreator public FileDataDto(@JsonProperty("id") Integer id, @JsonProperty("name") String name, @JsonProperty("isLatexAttach") Boolean isLatexAttach, @JsonProperty("fileName") String fileName, @JsonProperty("tmpFileName") String tmpFileName) { this.id = id; this.name = name; this.fileName = fileName; this.tmpFileName = tmpFileName; this.isLatexAttach = isLatexAttach; } public FileDataDto(FileData fileData) { this.id = fileData.getId(); this.name = fileData.getName(); this.isLatexAttach = fileData.isLatexAttach(); } 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; } public Boolean isLatexAttach() { return isLatexAttach; } public Boolean getIsLatexAttach() { return isLatexAttach; } public void setLatexAttach(Boolean latexAttach) { isLatexAttach = latexAttach; } public void setIsLatexAttach(Boolean latexAttach) { isLatexAttach = latexAttach; } }