package com.zm.order.tool.server.model;

import com.alibaba.fastjson.JSON;

import java.util.Objects;

/**
 * @author 陈标
 * @Description
 * @Date 2020/7/21 0021 14:06
 */
public class SimpleStatus {

    private Integer bizType;

    /**
     * 单据类型
     */
    private Integer docType;
    /**
     * 之前状态
     */
    private Integer beforeStatus;

    /**
     * 操作
     */
    private String operation;

    /**
     * 之后状态
     */
    private Integer afterStatus;

    public Integer getBizType() {
        return bizType;
    }

    public void setBizType(Integer bizType) {
        this.bizType = bizType;
    }

    public Integer getDocType() {
        return docType;
    }

    public void setDocType(Integer docType) {
        this.docType = docType;
    }

    public Integer getBeforeStatus() {
        return beforeStatus;
    }

    public void setBeforeStatus(Integer beforeStatus) {
        this.beforeStatus = beforeStatus;
    }

    public String getOperation() {
        return operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    public Integer getAfterStatus() {
        return afterStatus;
    }

    public void setAfterStatus(Integer afterStatus) {
        this.afterStatus = afterStatus;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        SimpleStatus that = (SimpleStatus) o;
        return Objects.equals(bizType, that.bizType) &&
                Objects.equals(docType, that.docType) &&
                Objects.equals(beforeStatus, that.beforeStatus) &&
                Objects.equals(operation, that.operation) &&
                Objects.equals(afterStatus, that.afterStatus);
    }

    @Override
    public int hashCode() {
        return Objects.hash(bizType, docType, beforeStatus, operation, afterStatus);
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
