package cc.smtweb.system.bpm.web.common;

import cc.smtweb.framework.core.common.IntEnum;
import cc.smtweb.framework.core.common.StrEnum;

/**
 * Created by Akmm at 2022/3/23 9:39
 * 系统的一些枚举变量
 */
public interface BpmEnum {

    // 权限类型
    class MenuRightType extends StrEnum {
        public static MenuFuncRight instance = new MenuFuncRight();
        public static StrEnumBean DATA = instance.addEnum("data", "数据权限");
        public static StrEnumBean FUNC = instance.addEnum("func", "功能权限");
        public static StrEnumBean FIELD = instance.addEnum("field", "字段权限");
    }

    class MenuType extends IntEnum {
        public static MenuType instance = new MenuType();
        public static IntEnumBean DESIGN = instance.addEnum(0, "设计器页面");
        public static IntEnumBean CUSTOM = instance.addEnum(1, "自定义页面");
        public static IntEnumBean LINK = instance.addEnum(2, "外部链接");
    }

    // 功能权限枚举
    class MenuFuncRight extends StrEnum {
        public static MenuFuncRight instance = new MenuFuncRight();
        public static StrEnumBean READ = instance.addEnum("read", "查看");
        public static StrEnumBean WRITE = instance.addEnum("write", "修改");
        public static StrEnumBean EXPORT = instance.addEnum("export", "导出");
        public static StrEnumBean AUDIT = instance.addEnum("audit", "审核");
    }

    class UserStatu extends IntEnum {
        public static UserStatu instance = new UserStatu();
        public static IntEnumBean NOACT = instance.addEnum(0, "未激活");
        public static IntEnumBean NORMAL = instance.addEnum(1, "已激活");
        public static IntEnumBean LOCK = instance.addEnum(2, "已锁定");
        public static IntEnumBean STOP = instance.addEnum(9, "已停用");
    }

    class DataRightType extends StrEnum {
        public static DataRightType instance = new DataRightType();
        public static StrEnumBean PARTY = instance.addEnum("party", "机构权限");
        public static StrEnumBean DEPT = instance.addEnum("dept", "部门权限");
    }
}
