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

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

import java.io.Serializable;

/**
 * @ClassName: FileDTO
 * @Description: 文件
 * @Author: WangGeng
 * @Date: 2019/3/10 10:47 PM
 * @Version: 1.0
 **/
@ApiModel
public class FileDTO implements Serializable {

    private static final long serialVersionUID = 3765953896919360869L;
    @ApiModelProperty(name = "fileId", value = "文件ID")
    private String fileId;
    @ApiModelProperty(name = "fileName", value = "文件名称")
    private String fileName;
    @ApiModelProperty(name = "fileUrl", value = "文件链接")
    private String fileUrl;
    @ApiModelProperty(name = "fileType", value = "文件类型")
    private String fileType;
    @ApiModelProperty(name = "fileSize", value = "文件大小")
    private Long fileSize;

    public String getFileId() {
        return fileId == null ? "" : fileId.trim();
    }

    public void setFileId(String fileId) {
        this.fileId = fileId;
    }

    public String getFileName() {
        return fileName == null ? "" : fileName.trim();
    }

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

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

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

    public String getFileType() {
        return fileType == null ? "" : fileType.trim();
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    public Long getFileSize() {
        return fileSize;
    }

    public void setFileSize(Long fileSize) {
        this.fileSize = fileSize;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"fileId\":")
                .append("\"").append(fileId).append("\"");
        sb.append(",\"fileName\":")
                .append("\"").append(fileName).append("\"");
        sb.append(",\"fileUrl\":")
                .append("\"").append(fileUrl).append("\"");
        sb.append(",\"fileType\":")
                .append("\"").append(fileType).append("\"");
        sb.append(",\"fileSize\":")
                .append("\"").append(fileSize).append("\"");
        sb.append('}');
        return sb.toString();
    }
}
