package com.iformall.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 消息标签：0-创建任务;1-创建客户;2-一个月内没完成任务;3-一周没有跟进客户
 */
public enum EnumInvestMessageTag {
	TASK_CREATE(0, "创建任务"),
	CUSTOMER_CREATE(1, "创建客户"),
	TASK_MONTH(2, "一个月内没完成任务"),
	CUSTOMER_WEEK(3, "一周没有跟进客户"),
	;

	public static EnumInvestMessageTag getEnum(Integer code) {
		for (EnumInvestMessageTag value : values()) {
			if (value.getCode().equals(code)) {
				return value;
			}
		}
		return null;
	}

	@EnumValue
	private final Integer code;
	private final String info;

	EnumInvestMessageTag(Integer code, String info) {
		this.code = code;
		this.info = info;
	}

	@JsonValue
	public Integer getCode() {
		return code;
	}

	public String getInfo() {
		return info;
	}
}
