From 501cda24ded6ef0acb3db356d9f13139705ed899 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Mon, 27 May 2013 11:29:26 -0400 Subject: [PATCH] schema.js --- src/schema.js | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 src/schema.js diff --git a/src/schema.js b/src/schema.js new file mode 100644 index 0000000000..664707a57d --- /dev/null +++ b/src/schema.js @@ -0,0 +1,63 @@ +(function(Schema) { + + + Schema.global = function() { + return { + + /* strings */ + next_topic_id: 'next_topic_id' + + } + }; + + Schema.topics = function(tid) { + return { + + /* strings */ + title: 'tid:' + tid + ':title', + locked: 'tid:' + tid + ':locked', + category_name: 'tid:' + tid + ':category_name', + category_slug: 'tid:' + tid + ':category_slug', + deleted: 'tid:' + tid + ':deleted', + pinned: 'tid:' + tid + ':pinned', + uid: 'tid:' + tid + ':uid', + timestamp: 'tid:' + tid + ':timestamp', + slug: 'tid:' + tid + ':slug', + postcount: 'tid:' + tid + ':postcount', + cid: 'tid:' + tid + ':cid', + + /* sets */ + tid: 'topics:tid', + read_by_uid: 'tid:' + tid + ':read_by_uid', + + /* sorted sets */ + recent: 'topics:recent', + + /* lists */ + posts: 'tid:' + tid + ':posts', + queued_tids: 'topics:queued:tid', + + + slug: function(slug) { + return { + tid: 'topic:slug:' + slug + ':tid' + } + } + + } + }; + + Schema.categories = function(cid) { + + }; + + Schema.users = function(uid) { + + }; + + Schema.posts = function(pid) { + + }; + + +}(module.exports)); \ No newline at end of file