package com.tzld.piaoquan.api.common.enums.contentplatform;

import lombok.Getter;

@Getter
public enum ContentPlatformGzhPlanTypeEnum {
    AUTO_REPLY(0, "自动回复"),
    FWH_PUSH(1, "服务号推送"),
    GZH_PUSH(2, "公众号推送"),

    other(999, "其他");

    // 0-自动回复、1-服务号推送
    private final int val;
    private final String description;

    ContentPlatformGzhPlanTypeEnum(int val, String description) {
        this.val = val;
        this.description = description;
    }

    public static ContentPlatformGzhPlanTypeEnum from(int val) {
        for (ContentPlatformGzhPlanTypeEnum typeEnum : ContentPlatformGzhPlanTypeEnum.values()) {
            if (typeEnum.getVal() == val) {
                return typeEnum;
            }
        }
        return other;
    }


}
