package com.foreverwin.mesnac.common.enums;

public enum InspectionTypeEnum {

    S("首件检验","S"),
    H("互检检验","H"),
    Z("自检检验","Z"),
    P("专检检验","P"),
    EM("日常保养","EM"),
    OM("一级保养","OM"),
    SM("二级保养","SM"),
    DM("日点检","DM"),
    WM("周点检","WM"),
    MM("月点检","MM"),
    YM("年点检","YM"),
    T("文本","T"),
    N("数字","N"),
    B("布尔","B");

    private String code;

    private String value;

    InspectionTypeEnum(String code,String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

    public static String getValue(String code) {
        for (InspectionTypeEnum ele : values()) {
            if(ele.getCode().equals(code)) return ele.getValue();
        }
        return null;
    }
}
