package com.sckw.core.model.enums;

/**
 * @author lfdc
 * @description
 * @date 2023-11-05 15:11:30
 */

public enum CompanyTypeEnum {

    COMPANY_TYPE_ONE("01", "露天煤矿"),
    COMPANY_TYPE_TWO("02", "露天金属矿山"),
    COMPANY_TYPE_THREE("03", "露天非金属矿山"),
    COMPANY_TYPE_FOUR("04", "其他矿山"),
    ;
    private final String code;
    private final String name;

    CompanyTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getNames() {
        return name;
    }



    public static String getName(String code) {
        for (CompanyTypeEnum em : CompanyTypeEnum.values()) {
            if (em.getCode().equals(code)) {
                return em.getNames();
            }
        }
        return null;
    }
}
