package com.iformall.enums;

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

/**
 * 跟踪类型：0-招商任务;1-客户需求
 */
public enum EnumFollowType {
	TASK(0, "招商任务"),
	DEMAND(1, "客户需求"),
	;

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

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

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

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

	public String getInfo() {
		return info;
	}
}
