
package com.tmerclub.cloud.multishop.constant;

/**
 * @Author lth
 * @Date 2021/6/16 9:14
 */
public enum IsDefault {
    /**
     * 是默认
     */
    YES(1),
    /**
     * 不是默认
     */
    NO(0);

    private final Integer num;

    public Integer value() {
        return num;
    }

    IsDefault(Integer num) {
        this.num = num;
    }

    public static IsDefault instance(Integer value) {
        IsDefault[] enums = values();
        for (IsDefault statusEnum : enums) {
            if (statusEnum.value().equals(value)) {
                return statusEnum;
            }
        }
        return null;
    }
}
