package com.fs.newAdv.enums;

import lombok.Getter;

@Getter
public enum SystemEventTypeEnum {

    GROUP_TODAY("event1", "当日加群"),
    WEI_CHAT_TODAY("event2", "当日加微"),
    TO_CLASS_AND_GROUP_TODAY("event3", "直播到课且当日加群"),
    TO_CLASS_AND_WEI_CHAT_TODAY("event4", "直播到课且当日加微"),
    BUY_ORDER("event5", "商品购买订单"),
    AUTH_TODAY_CREATE("event6", "微信授权且当日创建"),
    COMPLETE_CLASS_AND_GROUP_TODAY("event7", "直播完课且当日加群"),
    COMPLETE_CLASS_AND_WEI_CHAT_TODAY("event8", "直播完课且当日加微");

    private final String code;
    private final String description;

    SystemEventTypeEnum(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public static SystemEventTypeEnum getByCode(String code) {
        for (SystemEventTypeEnum statusEnum : values()) {
            if (statusEnum.getCode().equals(code)) {
                return statusEnum;
            }
        }
        return null;
    }
}
