package com.jsowell.common.enums.ykc;

/**
 * order_pay_record表pay_mode字段
 * 支付方式（1-本金余额支付；2-赠送余额支付；3-白名单支付；4-微信支付；5-支付宝支付）
 * 后端数据库
 */
public enum OrderPayRecordEnum {
	PRINCIPAL_BALANCE_PAYMENT("1", "本金余额支付"),
	GIFT_BALANCE_PAYMENT("2", "赠送余额支付"),
	WHITELIST_PAYMENT("3", "白名单支付"),
	WECHATPAY_PAYMENT("4", "微信支付"),
	ALIPAY_PAYMENT("5", "支付宝支付"),
	;

	private String value;
	private String label;

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public static String getPayModeDescription(String value) {
		for (OrderPayRecordEnum orderPayModeEnum : OrderPayRecordEnum.values()) {
			if (orderPayModeEnum.getValue().equals(value)) {
				return orderPayModeEnum.getLabel();
			}
		}
		return "";
	}

	OrderPayRecordEnum(String value, String label) {
		this.value = value;
		this.label = label;
	}
}
