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

/**
 * 取药方式
 */
public enum DeliveryMethodEnum {
    UNKNOWN("", 0),
    HomeDelivery("快递到家", 1),
    SelfPickUp("自行取药", 2);

    private final String displayName;

    private final int value;

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

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static DeliveryMethodEnum valueOf(int value) {
        switch (value) {
            case 1:
                return HomeDelivery;
            case 2:
                return SelfPickUp;
            default:
                return UNKNOWN;
        }
    }
}
