package com.philisense.www.enums;

public enum VcodeType {
    IMAGE_CODE("imageCode", "图形验证码"),
    SMS_CODE("smsCode", "短信验证码"),
    EMAIL_CODE("emailCode", "邮件验证码"),
    PUZZLE_CAPTCHA("puzzleCaptcha", "滑块验证码"),
    WORD_COMB("wordComb", "文字点选验证码");

    private String name;
    private String desc;

    VcodeType(String name, String desc) {
        this.name = name;
        this.desc = desc;
    }

    public static VcodeType get(String name) {
        for (VcodeType type: VcodeType.values()) {
            if (type.getName().equals(name)) return type;
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
