package com.yeejoin.equipmanage.common.enums;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

/**
 * @author
 * @title: EquipQrcodeColorEnum
 * <pre>
 * @description: TODO
 * </pre>
 * @date 2020/12/12 14:23
 */
@Getter
@AllArgsConstructor
public enum EquipQrcodeColorEnum {

    GREEN("0","绿色", "#00E12E"),
    YELLOW("1","黄色", "#FFA500"),
    RED("2","红色", "#EF2805");

    private String code;

    private String describe;

    private String color;

    public static EquipQrcodeColorEnum getEnumByKey(String key) {
        EquipQrcodeColorEnum colorEnum = null;
        for (EquipQrcodeColorEnum u : EquipQrcodeColorEnum.values()) {
            if (u.getCode().equals(key)) {
                colorEnum = u;
                break;
            }
        }
        return colorEnum;
    }

}
