package com.ruoyi.xq.enums.syspush;

import lombok.Getter;

@Getter
public enum SystemPushSendTimeTypeEnum {
    // 发送类型:0=手动发送,1=定时发送
    HAND_SEND(0,"手动发送"),
    SCHEDULED_SEND(1,"定时发送"),

    ;
    private final Integer code;
    private final String text;

    SystemPushSendTimeTypeEnum(Integer code, String text) {
        this.code = code;
        this.text = text;
    }

    public static SystemPushSendTimeTypeEnum getByCode(Integer sendTimeType) {
        SystemPushSendTimeTypeEnum[] values = SystemPushSendTimeTypeEnum.values();
        for (SystemPushSendTimeTypeEnum value : values) {
            if(value.getCode().equals(sendTimeType)){
                return value;
            }
        }
        return null;
    }
}
