package com.ruoyi.common.enums;

public enum LotteryTypeEnum {
    PARTICIPATE_IN(1, "参加"),
    SHARE(2, "分享"),
    ASSIST(3, "好友助力"),
    POINTS_REDEMPTION(4, "积分兑换"),
    MONTHLY(5, "月卡会员"),
    QUARTER(6, "季度会员"),
    ANNUAL(7, "年度会员");

    private Integer code;
    private String desc;

    LotteryTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static LotteryTypeEnum match(int code) {
        LotteryTypeEnum result = null;
        for (LotteryTypeEnum s : values()) {
            if (s.getCode() == code) {
                result = s;
                break;
            }
        }
        return result;
    }
}
