package com.persagy.dmp.rwd.basic.constant;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.EnumUtil;
import lombok.Getter;

import java.util.List;

/**
 * 对象类型
 * @author Charlie Yu
 * @date 2021-06-25
 */
@Getter
public enum DigitalRelCode {
    /** 对象类型 */
    BD_2_FL("Bd2Fl", "建筑下的楼层","building","floor"),
    BD_2_SH("Bd2Sh", "建筑下的竖井","building","shaft"),
    BD_2_SP("Bd2Sp", "建筑下的业务空间","building","space"),
    FL_2_SP("Fl2Sp", "楼层下的业务空间","floor","space"),
    SH_2_SP("Sh2Sp", "竖井下的业务空间","shaft","space"),
    SY_2_BD("Sy2Bd", "系统所在建筑","system","building"),
    SY_2_FL("Sy2Fl", "系统所在楼层","system","floor"),
    SY_2_SH("Sy2Sh", "系统所在竖井","system","shaft"),
    SY_2_SP("Sy2Sp", "系统所在空间","system","space"),
    EQ_2_BD("Eq2Bd", "设备所在建筑","equipment","building"),
    EQ_2_FL("Eq2Fl", "设备所在楼层","equipment","floor"),
    EQ_2_SH("Eq2Sh", "设备所在竖井","equipment","shaft"),
    EQ_2_SP("Eq2Sp", "设备所在空间","equipment","space"),
    SY_2_EQ("Sy2Eq", "系统下的设备","system","equipment"),
    EQ_2_EC("Eq2Ec", "设备下的部件","equipment","component");

    private String index;
    private String name;
    private String fromType;
    private String toType;

    DigitalRelCode(String index, String name,String fromType,String toType) {
        this.index = index;
        this.name = name;
        this.fromType = fromType;
        this.toType = toType;
    }
    /**
     * 获取枚举对象列表
     * @return : java.util.List<com.persagy.dmp.rwd.basic.constant.DigitalRelCode>
     * @author : lijie
     * Update By 2022/1/10 12:58
     */
    public static List<DigitalRelCode> getDigitalRelCodeList(){
        return CollUtil.newArrayList(EnumUtil.getEnumMap(DigitalRelCode.class).values());
    }

}
