package cn.axzo.msg.center.service.enums;

import cn.axzo.im.center.common.enums.AppTypeEnum;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;

import javax.annotation.Nullable;

/**
 * 推送终端枚举
 *
 * @author cold_blade
 * @version 1.0
 * @date 2023/10/11
 */
@Getter
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public enum PushTerminalEnum {

    /**
     * B-安心筑企业版
     */
    B_ENTERPRISE_APP("B-安心筑企业版"),
    /**
     * C-安心筑工人版
     */
    C_WORKER_APP("C-安心筑工人版"),
    ;

    private final String desc;

    @Nullable
    public AppTypeEnum toAppType() {
        if (this == B_ENTERPRISE_APP)
            return AppTypeEnum.CMP;
        else if (this == C_WORKER_APP)
            return AppTypeEnum.CM;
        else
            return null;
    }

}