package com.sybotan.android.demo.bean;

import com.framework.mvvm.model.db.entity.RelConfigEntity;

import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;
import java.util.Objects;

/**
 * Created by lihao.
 * Date: 2021/10/18
 */
public class RelConfigEntityPackClass {
    public RelConfigEntity entity;
    public String fromName;
    public String toName;
    public ArrayList<TargetRelType> targetTypes = new ArrayList<>();

    public boolean sameRelConfig(RelConfigEntity cfg) {
        return Objects.equals(entity.getGraphCode(), cfg.getGraphCode()) && Objects.equals(entity.getRelCode(), cfg.getRelCode());
    }

    public static class TargetRelType {
        public boolean canFrom ;
        public boolean canTo;
        public boolean connect;
        public String srcCode;
        public String graphCode;
        public String relCode;
        public String targetCode;
        public String direction;
    }
}
