package com.bootdo.data.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * ca证书产生详情
 */
public class CaDetail implements Serializable {
    private Integer id;

    /**
     * 密钥对 私钥密钥
     */
    private String keyPairPrivate;

    /**
     * 密钥对 公钥密钥
     */
    private String keyPairPublic;

    /**
     * 证书生成时 请求内容报文
     */
    private String requestContent;

    /**
     * 证书生成时 请求响应内容报文
     */
    private String responseContent;

    /**
     * 创建时间
     */
    private Date crateTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 备注
     */
    private String remark;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getKeyPairPrivate() {
        return keyPairPrivate;
    }

    public void setKeyPairPrivate(String keyPairPrivate) {
        this.keyPairPrivate = keyPairPrivate;
    }

    public String getKeyPairPublic() {
        return keyPairPublic;
    }

    public void setKeyPairPublic(String keyPairPublic) {
        this.keyPairPublic = keyPairPublic;
    }

    public String getRequestContent() {
        return requestContent;
    }

    public void setRequestContent(String requestContent) {
        this.requestContent = requestContent;
    }

    public String getResponseContent() {
        return responseContent;
    }

    public void setResponseContent(String responseContent) {
        this.responseContent = responseContent;
    }

    public Date getCrateTime() {
        return crateTime;
    }

    public void setCrateTime(Date crateTime) {
        this.crateTime = crateTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

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

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @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(", keyPairPrivate=").append(keyPairPrivate);
        sb.append(", keyPairPublic=").append(keyPairPublic);
        sb.append(", requestContent=").append(requestContent);
        sb.append(", responseContent=").append(responseContent);
        sb.append(", crateTime=").append(crateTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", remark=").append(remark);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CaDetail other = (CaDetail) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getKeyPairPrivate() == null ? other.getKeyPairPrivate() == null : this.getKeyPairPrivate().equals(other.getKeyPairPrivate()))
                && (this.getKeyPairPublic() == null ? other.getKeyPairPublic() == null : this.getKeyPairPublic().equals(other.getKeyPairPublic()))
                && (this.getRequestContent() == null ? other.getRequestContent() == null : this.getRequestContent().equals(other.getRequestContent()))
                && (this.getResponseContent() == null ? other.getResponseContent() == null : this.getResponseContent().equals(other.getResponseContent()))
                && (this.getCrateTime() == null ? other.getCrateTime() == null : this.getCrateTime().equals(other.getCrateTime()))
                && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
                && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getKeyPairPrivate() == null) ? 0 : getKeyPairPrivate().hashCode());
        result = prime * result + ((getKeyPairPublic() == null) ? 0 : getKeyPairPublic().hashCode());
        result = prime * result + ((getRequestContent() == null) ? 0 : getRequestContent().hashCode());
        result = prime * result + ((getResponseContent() == null) ? 0 : getResponseContent().hashCode());
        result = prime * result + ((getCrateTime() == null) ? 0 : getCrateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        return result;
    }
}