package com.yeejoin.amos.boot.module.hygf.api.Enum;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @description:
 * @author: tw
 * @createDate: 2024/3/12
 */
@Getter
@AllArgsConstructor
public enum MaintenanceWorkersEnum {


    电工("电工", "DG");
    /**
     * 名称，描述
     */
    private String name;
    /**
     * 编码
     */
    private String code;

    public static MaintenanceWorkersEnum getNodeByCode(String code) {
        MaintenanceWorkersEnum dealerReviewEnum = null;
        for(MaintenanceWorkersEnum type: MaintenanceWorkersEnum.values()) {
            if (type.getCode().equals(code)) {
                dealerReviewEnum = type;
                break;
            }
        }
        return dealerReviewEnum;
    }

}
