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

public enum PrescriptionInfoStatusEnum {

    WaitForPayment("待支付", 1),
    Dispatching("配送中", 2),
    Finished("已完成", 3),
    HaveARefund("已退费", 4),
    EXPIRED("已过期", 5),
    UNKNOW("",0);

    private final String displayName;

    private final int value;

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

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static PrescriptionInfoStatusEnum valueOf (int value){
        switch (value) {
            case 1 :
                return WaitForPayment;
            case 2:
                return Dispatching;
            case 3:
                return Finished;
            case 4:
                return HaveARefund;
            case 5:
                return EXPIRED;
            default:
                return UNKNOW;
        }
    }
}
