package com.ywt.mg.domain.models.enums;

/**
 * @author daiyihua
 */
public enum PaymentChannelEnum {
    WeChat("微信", 1),
    AliPay("支付宝", 2),
    Cash("现金", 3),
    MedicalCard("诊疗卡", 4),
    POS("pos机", 5),
    FREE("无须支付", 6),
    MedicalInsurance("医保", 7);

    private final String displayName;

    private final int value;

    PaymentChannelEnum(String displayName, int value) {
        this.displayName = displayName;
        this.value = value;
    }

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static String getDisplayName(int value){
        for (PaymentChannelEnum enumValue : PaymentChannelEnum.values()) {
            if (enumValue.getValue() == value){
                return enumValue.displayName;
            }
        }
        return "";
    }


}
