package com.xinelu.common.enums;

import lombok.Getter;

/**
 * @Description 电话重拨次数
 * @Author zh
 * @Date 2024-07-29
 */
@Getter
public enum PhoneRedialTimesEnum {

    /**
     * 重拨一次
     */
    REDIAL_ONCE("REDIAL_ONCE", 1),

    /**
     * 重拨二次
     */
    REDIAL_TWICE("REDIAL_TWICE", 2),

    /**
     * 不重播
     */
    NOT_REPLAY("NOT_REPLAY", 0),
    ;

    final private String info;

	final private Integer value;

	PhoneRedialTimesEnum(String info, Integer value) {
		this.info = info;
		this.value = value;
	}

	public String getInfo() {
		return info;
	}

	public Integer getValue() {
		return value;
	}

	public static PhoneRedialTimesEnum getValueByInfo(String info) {
		for (PhoneRedialTimesEnum phoneRedialTimesEnum : PhoneRedialTimesEnum.values()) {
			if (info.equals(phoneRedialTimesEnum.getInfo())) {
				return phoneRedialTimesEnum;
			}
		}
		return PhoneRedialTimesEnum.NOT_REPLAY;
	}
}
