package com.iformall.enums;


/**
 * @author gongbiao
 */

public enum EnumPapersType {

    ID(1, "身份证"),
    MILITARY(2, "军官证"),
    STUDENt(3, "学生证"),
    DRIVE(4, "驾驶证"),
    PASSPORT(5,"护照")
    ;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
