package org.springblade.common.enums;


import lombok.Getter;

@Getter
public enum RemitTypeEnum {

	OFFLINE("线下打款", 0),
	ALI_PAY("支付宝打款", 1);

	private String name;
	private Integer value;

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

	public static String getEnumName(Integer value) {
		for (RemitTypeEnum remitTypeEnum : RemitTypeEnum.values()) {
			if (remitTypeEnum.value.equals(value)) {
				return remitTypeEnum.getName();
			}
		}
		return "未知";
	}

	public static RemitTypeEnum getRemitTypeEnum(Integer value) {
		for (RemitTypeEnum remitTypeEnum : RemitTypeEnum.values()) {
			if (remitTypeEnum.value.equals(value)) {
				return remitTypeEnum;
			}
		}
		return null;
	}

}
