package com.engine.organization.entity.searchtree;

import com.api.hrm.bean.TreeNode;
import lombok.Data;

import java.util.Objects;

/**
 * @description:
 * @author:dxfeng
 * @createTime: 2022/05/26
 * @version: 1.0
 */
@Data
public class SearchTree extends TreeNode {
    private String companyid;
    private String isVirtual;
    private String psubcompanyid;
    private String displayType;
    private boolean isCanceled;
    private String requestParams;
    private String parentComp;
    private Integer orderNum;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        SearchTree that = (SearchTree) o;
        return isCanceled == that.isCanceled && Objects.equals(this.getId(), that.getId()) &&Objects.equals(companyid, that.companyid) && Objects.equals(isVirtual, that.isVirtual) && Objects.equals(psubcompanyid, that.psubcompanyid) && Objects.equals(displayType, that.displayType) && Objects.equals(requestParams, that.requestParams) && Objects.equals(parentComp, that.parentComp) && Objects.equals(orderNum, that.orderNum);
    }

    @Override
    public int hashCode() {
        return Objects.hash(this.getId(),companyid, isVirtual, psubcompanyid, displayType, isCanceled, requestParams, parentComp, orderNum);
    }
}