package com.iformall.enums;

/**
 * Created by Stormeye on 2018/08/09.
 */
public enum EnumCarVendor {

    // 1-ETCP, 2-TJD
    CAR_NOTFOUND(0, "无"),
    CAR_ETCP(1, "ETCP"),
    CAR_TJD(2, "TJD"),
    CAR_DAHUA(3, "DAHUA"),
    ;

    public static EnumCarVendor getEnum(Integer code) {
        for (EnumCarVendor value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

    private Integer code;
    private String message;

    EnumCarVendor(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
