package com.enums;

public enum  VipTypeEnum{
    YEARCARD(1, "年卡"),
    HELFYEARCARD(2, "半年卡"),
    QUARTERCARE(3, "季卡"),
    MOUTHCARD(4, "月卡"),
    FREECARD(5, "免费卡");
    public Integer value;
    public String name;

    VipTypeEnum(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

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

    public static VipTypeEnum getByValue(Integer value) {
        for (VipTypeEnum type : VipTypeEnum.values()) {
            if (type.value.equals(value)) {
                return type;
            }
        }
        return null;
    }
}