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

public enum PharmacyPaymentChannelEnum {

    WeChat("微信", 1),
    AliPay("支付宝", 2),
    Cash("现金", 3),          //现场支付
    MedicalCard("诊疗卡", 4),
    POS("pos机", 5),
    FREE("无须支付", 6),
    MedicalInsurance("医保", 7),
    ICBC("工行", 8),
    UNKNOWN("", 0);

    private final String displayName;

    private final int value;

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

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static PharmacyPaymentChannelEnum valueOf(int value) {
        for (PharmacyPaymentChannelEnum item : PharmacyPaymentChannelEnum.values()) {
            if (item.getValue() == value) {
                return item;
            }
        }
        return UNKNOWN;
    }
}
