All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.spring.boxes.dollar.enums.OrderModeEnum Maven / Gradle / Ivy

package com.spring.boxes.dollar.enums;

import java.util.List;

import com.google.common.collect.Lists;
import com.spring.boxes.dollar.support.EnumType;
import com.spring.boxes.dollar.support.EnumWrap;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@AllArgsConstructor
public enum OrderModeEnum implements EnumType {

    EXPRESS(1, "配送"),
    ONESELF(2, "自取");

    private final int value;
    private final String label;

    @Override
    public String getLabel() {
        return this.label;
    }

    @Override
    public String getName() {
        return this.name();
    }

    @Override
    public Integer getValue() {
        return this.value;
    }

    @NoArgsConstructor
    public static class Opt extends EnumWrap {

        public List valueList() {
            return Lists.newArrayList(OrderModeEnum.values());
        }

        public static Opt INSTANCE() {
            return SingleHold.opt;
        }

        private static class SingleHold {
            public static Opt opt = new Opt();

            private SingleHold() {
            }
        }
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy