package com.ywt.mg.domain.entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

@Table(name = "download_record")
@Entity
public class DownloadRecord implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @Column(name = "id", insertable = false, nullable = false)
    private Integer id;

    /**
     * 名称（前端路径）
     */
    @Column(name = "name")
    private String name;

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

    /**
     * 药房id
     */
    @Column(name = "pharmacy_id")
    private Integer pharmacyId = 0;

    /**
     * 药房名称
     */
    @Column(name = "pharmacy_name")
    private String pharmacyName;

    /**
     * 医药id
     */
    @Column(name = "hospital_id")
    private Integer hospitalId = 0;

    /**
     * 医药名称
     */
    @Column(name = "hospital_name")
    private String hospitalName;

    /**
     * 对应ywt_center库的mg_admin表ID
     */
    @Column(name = "admin_id")
    private Integer adminId = 0;

    /**
     * 对应ywt_center库的mg_admin表account
     */
    @Column(name = "admin_name")
    private String adminName = "";

    /**
     * 对应oss地址，加密
     */
    @Column(name = "url")
    private String url;

    /**
     * 是否删除
     */
    @Column(name = "deleted", nullable = false)
    private Boolean deleted;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 文件生成时间
     */
    @Column(name = "finish_time")
    private Date finishTime;

    /**
     * 接口响应时间
     */
    @Column(name = "difftime")
    private Integer difftime;

    /**
     * 所有参数的md5，防止短时间内的重复点击
     */
    @Column(name = "param_md5")
    private String paramMd5;

    /**
     * 接口地址（带域名）
     */
    @Column(name = "param_url")
    private String paramUrl;

    /**
     * 0-下载中，1-下载成功，2-下载失败
     */
    @Column(name = "status")
    private Integer status = 0;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    private Date updateTime;

    /**
     * 所有参数的json
     */
    @Column(name = "param_json")
    private String paramJson;

    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;
    }

    /**
     * 药房id
     */
    public Integer getPharmacyId() {
        return pharmacyId;
    }

    /**
     * 药房id
     */
    public void setPharmacyId(Integer pharmacyId) {
        this.pharmacyId = pharmacyId;
    }

    /**
     * 药房名称
     */
    public String getPharmacyName() {
        return pharmacyName;
    }

    /**
     * 药房名称
     */
    public void setPharmacyName(String pharmacyName) {
        this.pharmacyName = pharmacyName;
    }

    /**
     * 医药id
     */
    public Integer getHospitalId() {
        return hospitalId;
    }

    /**
     * 医药id
     */
    public void setHospitalId(Integer hospitalId) {
        this.hospitalId = hospitalId;
    }

    /**
     * 医药名称
     */
    public String getHospitalName() {
        return hospitalName;
    }

    /**
     * 医药名称
     */
    public void setHospitalName(String hospitalName) {
        this.hospitalName = hospitalName;
    }

    /**
     * 对应ywt_center库的mg_admin表ID
     */
    public Integer getAdminId() {
        return adminId;
    }

    /**
     * 对应ywt_center库的mg_admin表ID
     */
    public void setAdminId(Integer adminId) {
        this.adminId = adminId;
    }

    /**
     * 对应ywt_center库的mg_admin表account
     */
    public String getAdminName() {
        return adminName;
    }

    /**
     * 对应ywt_center库的mg_admin表account
     */
    public void setAdminName(String adminName) {
        this.adminName = adminName;
    }

    /**
     * 对应oss地址，加密
     */
    public String getUrl() {
        return url;
    }

    /**
     * 对应oss地址，加密
     */
    public void setUrl(String url) {
        this.url = url;
    }

    /**
     * 是否删除
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * 是否删除
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    /**
     * 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 文件生成时间
     */
    public Date getFinishTime() {
        return finishTime;
    }

    /**
     * 文件生成时间
     */
    public void setFinishTime(Date finishTime) {
        this.finishTime = finishTime;
    }

    /**
     * 接口响应时间
     */
    public Integer getDifftime() {
        return difftime;
    }

    /**
     * 接口响应时间
     */
    public void setDifftime(Integer difftime) {
        this.difftime = difftime;
    }

    /**
     * 所有参数的md5，防止短时间内的重复点击
     */
    public String getParamMd5() {
        return paramMd5;
    }

    /**
     * 所有参数的md5，防止短时间内的重复点击
     */
    public void setParamMd5(String paramMd5) {
        this.paramMd5 = paramMd5;
    }

    /**
     * 接口地址（带域名）
     */
    public String getParamUrl() {
        return paramUrl;
    }

    /**
     * 接口地址（带域名）
     */
    public void setParamUrl(String paramUrl) {
        this.paramUrl = paramUrl;
    }

    /**
     * 0-下载中，1-下载成功，2-下载失败
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 0-下载中，1-下载成功，2-下载失败
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 更新时间
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 更新时间
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 所有参数的json
     */
    public String getParamJson() {
        return paramJson;
    }

    /**
     * 所有参数的json
     */
    public void setParamJson(String paramJson) {
        this.paramJson = paramJson;
    }

    public String toString() {
        return "DownloadRecord{id=" + id +
                ", name=" + name +
                ", pharmacyId=" + pharmacyId +
                ", pharmacyName=" + pharmacyName +
                ", hospitalId=" + hospitalId +
                ", hospitalName=" + hospitalName +
                ", adminId=" + adminId +
                ", adminName=" + adminName +
                ", url=" + url +
                ", createTime=" + createTime +
                ", finishTime=" + finishTime +
                ", difftime=" + difftime +
                ", paramMd5=" + paramMd5 +
                ", paramUrl=" + paramUrl +
                ", status=" + status +
                ", updateTime=" + updateTime +
                ", paramJson=" + paramJson +
                "}";
    }
}