package com.skr.mdm.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum AppPushTypeEnum {

    /**
     * 即时推送
     */
    IMMEDIATELY_PUSH(1, "即时推送"),
    /**
     * 定时推送
     */
    TIMING_PUSH(2, "定时推送"),
    /**
     * 按需推送
     */
    NEEDED_PUSH(3, "按需推送"),
    /**
     * 强制推送
     */
    FORCE_PUSH(4, "强制推送");

    private final Integer pushType;

    private final String description;

    public static String getDescription(Integer pushType) {
        for (AppPushTypeEnum appPushTypeEnum : values()) {
            if (pushType.equals(appPushTypeEnum.getPushType())) {
                return appPushTypeEnum.getDescription();
            }
        }
        return null;
    }

}
