package com.yeejoin.amos.boot.module.jg.api.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum RegistrationTypeEnum {
    新设备首次启用("新设备首次启用","DJ_SY"),
    历史无证设备登记("历史无证设备登记","SP_TT");

    private String name;
    private String code;

    public static String getNameByType(String code) {
        String name = null;
        for (RegistrationTypeEnum enumOne : RegistrationTypeEnum.values()) {
            if (enumOne.getCode().equals(code)) {
                name = enumOne.getName();
                break;
            }
        }
        return name;
    }

}
