package com.inspect.algmodel;

import com.inspect.base.core.web.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import java.util.Objects;

@Setter
@Getter
public class AlgModelMsgDomain extends BaseEntity {
    private String token;
    private int code;
    private String timestamp;
    private int count;
    private Object data;
    private String message;
    private String progress;
    private String result;
    private String sectionId;
    private String stationId;
    private String algorithmManufacturer;
    private String version;

    @Override
    public boolean equals(Object object) {
        if (this == object) return true;
        if (object == null || getClass() != object.getClass()) return false;
        AlgModelMsgDomain that = (AlgModelMsgDomain) object;
        return code == that.code && count == that.count && Objects.equals(token, that.token) && Objects.equals(timestamp, that.timestamp) && Objects.equals(data, that.data) && Objects.equals(message, that.message) && Objects.equals(progress, that.progress) && Objects.equals(result, that.result) && Objects.equals(sectionId, that.sectionId) && Objects.equals(stationId, that.stationId) && Objects.equals(algorithmManufacturer, that.algorithmManufacturer) && Objects.equals(version, that.version);
    }

    @Override
    public int hashCode() {
        return Objects.hash(token, code, timestamp, count, data, message, progress, result, sectionId, stationId, algorithmManufacturer, version);
    }

    @Override
    public String toString() {
        return "AlgModelMsgDomain{" +
                "token='" + token + '\'' +
                ", code=" + code +
                ", timestamp='" + timestamp + '\'' +
                ", count=" + count +
                ", data=" + data +
                ", message='" + message + '\'' +
                ", progress='" + progress + '\'' +
                ", result='" + result + '\'' +
                ", sectionId='" + sectionId + '\'' +
                ", stationId='" + stationId + '\'' +
                ", algorithmManufacturer='" + algorithmManufacturer + '\'' +
                ", version='" + version + '\'' +
                '}';
    }
}
