package com.zfire.jiasm.syncdata.constant;

import lombok.Getter;

@Getter
public enum TaskConfigEnum {
    // 家盛茂
    TRUE("TRUE","执行"),

    // 工单系统数据库
    FALSE("FALSE","不执行"),

    ;

    /**
     * 编码
     */
    private final String code;

    /**
     * 介绍
     */
    private final String text;

    TaskConfigEnum(String code, String text) {
        this.code = code;
        this.text = text;
    }

    /**
     * 通过code获取枚举
     * @param code 编码
     * @return DatabaseEnum
     */
    public static TaskConfigEnum getEnumByCode(String code) {
        TaskConfigEnum result = null;
        for (TaskConfigEnum item : values()) {
            if (code==item.getCode()) {
                result = item;
                break;
            }
        }
        return result;
    }
}
