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 MaintenanceTypeEnum {

    经销商质保运维("经销商质保运维", "JXSZBYW"),
    社会人员运维("社会人员运维", "SHRYYW");
    /**
     * 名称，描述
     */
    private String name;
    /**
     * 编码
     */
    private String code;

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

}
