package com.gic.haoban.manage.api.enums.content;

import java.util.Arrays;
import java.util.List;

/**
 * @Author MUSI
 * @Date 2023/3/19 10:06 PM
 * @Description
 * @Version
 * 客户触达渠道类型
 **/
public enum TriggerCustomerChannelType {

    PYQ(1, "朋友圈"),
    CUSTOMER_GROUP(2, "客户群"),
    DIALOG_BOX(3, "对话框"),
    CONTENT_COPY(4, "复制文案"),
    CONTENT_DOWNLOAD(5, "下载素材"),
    @Deprecated
    RECOMMEND(6, "发送给潜客")
    ;

    /**
     * 展示文案的渠道类型
     * @return
     */
    public static List<Integer> showDescChannel(){
        return Arrays.asList(PYQ.code, CUSTOMER_GROUP.code, DIALOG_BOX.code,RECOMMEND.code);
    }

    public static TriggerCustomerChannelType getInstance(Integer code) {
        for (TriggerCustomerChannelType customerChannelType : values()) {
            if (customerChannelType.code.equals(code)) {
                return customerChannelType;
            }
        }
        return null;
    }

    TriggerCustomerChannelType(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    private Integer code;
    private String desc;

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
