package com.steerinfo.ftp.uploadfile.model;

import com.steerinfo.framework.model.IBasePO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.web.multipart.MultipartFile;

import java.util.Date;

@ApiModel(value="文件上传")
public class UploadFile implements IBasePO<String> {
    /**
     * 主键ID(ID,VARCHAR,100)
     */
    @ApiModelProperty(value="主键ID",required=true)
    private String id;

    /**
     * 上传人(FILE_NAME,VARCHAR,100)
     */
    @ApiModelProperty(value="文件名称",required=true)
    private String fileName;

    /**
     * 上传路径(FILE_URL,VARCHAR,200)
     */
    @ApiModelProperty(value="上传路径",required=true)
    private String fileUrl;

    /**
     * 所属类别(TYPE,VARCHAR,50)
     */
    @ApiModelProperty(value="所属类别",required=false)
    private String type;

    /**
     * 所属类别(TYPE,VARCHAR,200)
     */
    @ApiModelProperty(value="文件分类",required=false)
    private String fileType;

    /**
     * 上传时间(UPLOAD_TIME,TIMESTAMP,7)
     */
    @ApiModelProperty(value="上传时间",required=false)
    private Date uploadTime;

    /**
     * 上传人(CREATE_MAN,VARCHAR,20)
     */
    @ApiModelProperty(value="上传人",required=false)
    private String createMan;

    /**
     * 创建人(CREATE_TIME,TIMESTAMP,7)
     */
    @ApiModelProperty(value="创建人",required=false)
    private Date createTime;

    /**
     * 修改人(UPDATE_MAN,VARCHAR,20)
     */
    @ApiModelProperty(value="修改人",required=false)
    private String updateMan;

    /**
     * 修改时间(UPDATE_TIME,TIMESTAMP,7)
     */
    @ApiModelProperty(value="修改时间",required=false)
    private Date updateTime;

    private transient MultipartFile multipartFile;

    public MultipartFile getMultipartFile() {
        return multipartFile;
    }

    public void setMultipartFile(MultipartFile multipartFile) {
        this.multipartFile = multipartFile;
    }

    private static final long serialVersionUID = 1L;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName == null ? null : fileName.trim();
    }

    public String getFileUrl() {
        return fileUrl;
    }

    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl == null ? null : fileUrl.trim();
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type == null ? null : type.trim();
    }

    public String getFileType() { return fileType; }

    public void setFileType(String fileType) { this.fileType = fileType == null ? null : fileType.trim(); }

    public Date getUploadTime() {
        return uploadTime;
    }

    public void setUploadTime(Date uploadTime) {
        this.uploadTime = uploadTime;
    }

    public String getCreateMan() {
        return createMan;
    }

    public void setCreateMan(String createMan) {
        this.createMan = createMan == null ? null : createMan.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getUpdateMan() {
        return updateMan;
    }

    public void setUpdateMan(String updateMan) {
        this.updateMan = updateMan == null ? null : updateMan.trim();
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", fileName=").append(fileName);
        sb.append(", fileUrl=").append(fileUrl);
        sb.append(", type=").append(type);
        sb.append(", fileType=").append(fileType);
        sb.append(", uploadTime=").append(uploadTime);
        sb.append(", createMam=").append(createMan);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateMan=").append(updateMan);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}