package com.ssm.manage.entity;

import java.io.Serializable;
import javax.persistence.*;

@Table(name = "upload_files")
public class UploadFiles implements Serializable {
    /**
     * 文件上传ID
     */
    @Id
    private Long id;

    /**
     * 文件名称
     */
    @Column(name = "file_name")
    private String fileName;

    /**
     * 文件路径
     */
    @Column(name = "file_path")
    private String filePath;

    /**
     * 原单据ID
     */
    @Column(name = "doc_id")
    private Long docId;

    /**
     * 原单据号
     */
    @Column(name = "doc_num")
    private String docNum;

    /**
     * 原单据类别
     */
    @Column(name = "doc_type")
    private String docType;

    private static final long serialVersionUID = 1L;

    /**
     * 获取文件上传ID
     *
     * @return id - 文件上传ID
     */
    public Long getId() {
        return id;
    }

    /**
     * 设置文件上传ID
     *
     * @param id 文件上传ID
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取文件名称
     *
     * @return file_name - 文件名称
     */
    public String getFileName() {
        return fileName;
    }

    /**
     * 设置文件名称
     *
     * @param fileName 文件名称
     */
    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    /**
     * 获取文件路径
     *
     * @return file_path - 文件路径
     */
    public String getFilePath() {
        return filePath;
    }

    /**
     * 设置文件路径
     *
     * @param filePath 文件路径
     */
    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    /**
     * 获取原单据ID
     *
     * @return doc_id - 原单据ID
     */
    public Long getDocId() {
        return docId;
    }

    /**
     * 设置原单据ID
     *
     * @param docId 原单据ID
     */
    public void setDocId(Long docId) {
        this.docId = docId;
    }

    /**
     * 获取原单据号
     *
     * @return doc_num - 原单据号
     */
    public String getDocNum() {
        return docNum;
    }

    /**
     * 设置原单据号
     *
     * @param docNum 原单据号
     */
    public void setDocNum(String docNum) {
        this.docNum = docNum;
    }

    /**
     * 获取原单据类别
     *
     * @return doc_type - 原单据类别
     */
    public String getDocType() {
        return docType;
    }

    /**
     * 设置原单据类别
     *
     * @param docType 原单据类别
     */
    public void setDocType(String docType) {
        this.docType = docType;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UploadFiles other = (UploadFiles) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getFileName() == null ? other.getFileName() == null : this.getFileName().equals(other.getFileName()))
            && (this.getFilePath() == null ? other.getFilePath() == null : this.getFilePath().equals(other.getFilePath()))
            && (this.getDocId() == null ? other.getDocId() == null : this.getDocId().equals(other.getDocId()))
            && (this.getDocNum() == null ? other.getDocNum() == null : this.getDocNum().equals(other.getDocNum()))
            && (this.getDocType() == null ? other.getDocType() == null : this.getDocType().equals(other.getDocType()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getFileName() == null) ? 0 : getFileName().hashCode());
        result = prime * result + ((getFilePath() == null) ? 0 : getFilePath().hashCode());
        result = prime * result + ((getDocId() == null) ? 0 : getDocId().hashCode());
        result = prime * result + ((getDocNum() == null) ? 0 : getDocNum().hashCode());
        result = prime * result + ((getDocType() == null) ? 0 : getDocType().hashCode());
        return result;
    }

    @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(", filePath=").append(filePath);
        sb.append(", docId=").append(docId);
        sb.append(", docNum=").append(docNum);
        sb.append(", docType=").append(docType);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}