package com.ywt.domain.models.enums;

/**
 * 取货方式：0-自取，1邮寄
 */
public enum GetChannelEnum {
    INVITE("自取", 0),
    MAIL("邮寄", 1);

    private final String displayName;

    private final int value;

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

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }


    public static GetChannelEnum valueOf(int value) {
        for (GetChannelEnum torderTypeEnum : GetChannelEnum.values()) {
            if (torderTypeEnum.getValue() == value) {
                return torderTypeEnum;
            }
        }
        return INVITE;
    }
}
