package com.pannk.mms.common.base;

/**
 * Created by wolf on 20-11-2.
 */
public class Constant {
    public static final String NAME_SPACE = "mms";
    public static final String KEY_JOIN_CHAR = ":";
    public static final String USER_CACHE = NAME_SPACE + KEY_JOIN_CHAR + "user_cache" + KEY_JOIN_CHAR;
    public static final String PERMS_CAHCE = NAME_SPACE + KEY_JOIN_CHAR + "perms_cache" + KEY_JOIN_CHAR;
    public static final String CODE = "code";
    public static final String MESSAGE = "msg";
    public static final String SUCCESS = "success";
    public static final String ERROR = "error";
    public static final String DATA = "data";
    public static final Long SUPER_ADMIN = 1L;
    public static final long EXPIRE = 30 * 24 * 60 * 60;
    public static final long DEFAULT_CUR_PAGE = 1;
    public static final long DEFAULT_PAGE_SIZE = 10;
    public static final String PAGE = "page";
    public static final String LIMIT = "limit";
    public static final String ORDER_FIELD = "sidx";
    public static final String ORDER = "order";
    public static final String ASC = "ASC";
    public static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
    public static final String SIMPLE_DATE_FORMAT = "yyyy-MM-dd";
    public static final String INIT_PASSWORD = "123456";

    /**
     * 菜单类型
     */
    public enum MenuType {
        /**
         * 目录
         */
        CATALOG(0),
        /**
         * 菜单
         */
        MENU(1),
        /**
         * 按钮
         */
        BUTTON(2);
        private int value;

        MenuType(int value) {
            this.value = value;
        }

        public int getValue() {
            return value;
        }

    }
}
