package com.sckw.core.model.enums;

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

public enum CompanyStatusEnum {

    COMPANY_STATUS_ONE("01", "生产"),
    COMPANY_STATUS_TWO("02", "建设"),
    COMPANY_STATUS_THREE("03", "停产"),
    COMPANY_STATUS_FOUR("04", "停建"),
    ;
    private final String code;
    private final String name;

    CompanyStatusEnum(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 (CompanyStatusEnum em : CompanyStatusEnum.values()) {
            if (em.getCode().equals(code)) {
                return em.getNames();
            }
        }
        return null;
    }
}
