我设计的模式有助于轻松添加、移动和重命名节点和条目
# **enode** a hierarchical directory in redis
# A folder/node structure where nodes can have sub-nodes and entries.
# Entries can have tags.
#
# Each entry gets an enodeid and an entryid
# enodeid - The id of the directory that contains the entry
# entryid - The id of this entry within this enode/directory
#
# The data schema is as follows
# enodeid:kids - Sorted set containing the kids for each directory
# The topmost node is a string "root" and not a number
# The sort score is actually the enodeid of the corresponding kid
# so if /a has an enodeid of 2 and is a kid of root the entry is
# root:kids [2, "a"]
# If a directory /a/b exists and has an enodeid of 4 than
# 2:kids = [4, "b"] - here 2 is the enodeid of '/a'
#
# enodeid:meta - Hash entry containing the name and parent of an enodeid
# 2:meta = {name: "a", parentid: "root"}
# 4:meta = {name: "b", parentid: 2}
#
# enode.next.id - Unique enode id's
#
# entry.next.id - Unique entry id's
#
# enodeid:entries - Sorted set containing the entries in a directory
# The sort score is the sequence number of the entry withi the directory
# moveEntry moves the entry up/down within this
#
# enodeid.entry.num - Unique entry id's for a given enodeid
#
# enodeid:tags - Sorted list of tags
# Score is tagcount, memeber is tag
#
# enodeid:axs - List of usernames that have access to this folder