package com.ywt.domain.models.enums;

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

    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 PaymentChannelEnum valueOf(int value) {
        switch (value) {
            case 1:
                return WeChat;
            case 2:
                return AliPay;
            case 3:
                return Cash;
            case 4:
                return MedicalCard;
            case 5:
                return POS;
            case 6:
                return FREE;
            case 7:
                return MedicalInsurance;
            default:
                return UNKNOWN;
        }
    }
}
