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

/**
 * Created by hua on 2021/3/22.
 */
public enum SyncTaskTypeEnum {
    QYWX_CONTACT(1, "后门同步企业微信架构"),
    FRIEND_SINGLE(4, "单个成员刷新好友"),
    FRIEND_STORE(5, "刷新门店好友"),
    MEMBER_TAG(6, "企业微信标签刷新"),
    FRIEND_WX_ENTEPRISE(10, "企业好友初始化");
    private int type;
    private String taskName;

    SyncTaskTypeEnum(int type, String taskName) {
        this.type = type;
        this.taskName = taskName;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public static String getTaskName(int taskType) {
        SyncTaskTypeEnum[] values = SyncTaskTypeEnum.values();
        for (SyncTaskTypeEnum value : values) {
            if (value.getType() == taskType) {
                return value.getTaskName();
            }
        }
        return null;
    }
}
