package com.sybotan.android.demo.bean;

import android.os.Parcel;
import android.os.Parcelable;

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

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Objects;

/**
 * Created by lihao.
 * Date: 2021/10/18
 */
public class RelConfigEntityPackClass implements Serializable {
    public RelConfigEntity entity;
    public String fromName;
    public String toName;

    public RelConfigEntityPackClass() {
    }

    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 implements Serializable {
        public boolean canFrom;
        public boolean canTo;
        public boolean connect;
        public String srcCode;
        public String graphCode;
        public String relCode;
        public String targetCode;
        public String direction;

        public TargetRelType() {
        }


    }


}
