package ink.wgink.module.file.pojo.dtos;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: FileDTO
 * @Description: 文件
 * @Author: WangGeng
 * @Date: 2020/9/12 17:28
 * @Version: 1.0
 **/
@ApiModel
public class FileInfoDTO extends FileDTO {

    @ApiModelProperty(name = "filePath", value = "文件全路径")
    private String filePath;
    @ApiModelProperty(name = "fileUrl", value = "文件链接")
    private String fileUrl;
    @ApiModelProperty(name = "fileSummary", value = "文件说明")
    private String fileSummary;
    @ApiModelProperty(name = "isBack", value = "是否备份")
    private Integer isBack;
    @ApiModelProperty(name = "creator", value = "创建人")
    private String creator;
    @ApiModelProperty(name = "gmtCreate", value = "创建时间")
    private String gmtCreate;
    @ApiModelProperty(name = "downloadCount", value = "下载次数")
    private Integer downloadCount;

    public String getFilePath() {
        return filePath == null ? "" : filePath.trim();
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    @Override
    public String getFileUrl() {
        return fileUrl == null ? "" : fileUrl.trim();
    }

    @Override
    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }

    public String getFileSummary() {
        return fileSummary == null ? "" : fileSummary.trim();
    }

    public void setFileSummary(String fileSummary) {
        this.fileSummary = fileSummary;
    }

    public Integer getIsBack() {
        return isBack;
    }

    public void setIsBack(Integer isBack) {
        this.isBack = isBack;
    }

    public String getCreator() {
        return creator == null ? "" : creator.trim();
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public String getGmtCreate() {
        return gmtCreate == null ? "" : gmtCreate.trim();
    }

    public void setGmtCreate(String gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Integer getDownloadCount() {
        return downloadCount == null ? 0 : downloadCount;
    }

    public void setDownloadCount(Integer downloadCount) {
        this.downloadCount = downloadCount;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"filePath\":\"")
                .append(filePath).append('\"');
        sb.append(",\"fileUrl\":\"")
                .append(fileUrl).append('\"');
        sb.append(",\"fileSummary\":\"")
                .append(fileSummary).append('\"');
        sb.append(",\"isBack\":")
                .append(isBack);
        sb.append(",\"creator\":\"")
                .append(creator).append('\"');
        sb.append(",\"gmtCreate\":\"")
                .append(gmtCreate).append('\"');
        sb.append(",\"downloadCount\":")
                .append(downloadCount);
        sb.append('}');
        return sb.toString();
    }
}
