package com.tmerclub.cloud.common.constant;

/**
 * 影印件类型
 *
 * @author lanhai
 */
public enum PicType {

    /**
     * 营业执照
     */
    BUSINESS_LICENSE(1, "营业执照"),

    /**
     * 身份证正面（人像面）
     */
    FRONT_OF_ID_CARD(8, "身份证正面（人像面）"),

    /**
     * 身份证反面（国徽面）
     */
    REVERSE_SIDE_OF_ID_CARD(9, "身份证反面（国徽面）");

    private final Integer code;
    private final String str;

    public Integer getCode() {
        return code;
    }

    public String getStr() {
        return str;
    }

    PicType(Integer code, String str) {
        this.code = code;
        this.str = str;
    }

    public static String getPicTypeName(Integer code) {
        PicType[] enums = values();
        for (PicType statusEnum : enums) {
            if (statusEnum.getCode().equals(code)) {
                return statusEnum.getStr();
            }
        }
        return null;
    }
}
