package org.springblade.common.enums;

import lombok.Getter;

/**
 * 到账类型枚举类
 */
@Getter
public enum SettleTypeEnum {
	SELF_SUPPORT("及时到账", 0),
	NONE_SELF_SUPPORT("确认收货后到账", 1);
	private String name;
	private Integer value;

	SettleTypeEnum(String name, Integer value) {
		this.name = name;
		this.value = value;
	}

	public static String getNameByValue(Integer value) {
		for (SettleTypeEnum settleTypeEnum : SettleTypeEnum.values()) {
			if (settleTypeEnum.value.equals(value)) {
				return settleTypeEnum.getName();
			}
		}
		return "";
	}
}
