From a1812a60c8ead1a45b3bfb80b80745c6dd2dba49 Mon Sep 17 00:00:00 2001 From: jysperm Date: Fri, 12 Sep 2014 05:07:14 +0800 Subject: [PATCH] notification model --- INSTALL.md | 6 +++--- core/model/notification.coffee | 10 ++++++++++ core/notification.coffee | 1 + 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 core/model/notification.coffee diff --git a/INSTALL.md b/INSTALL.md index 2d9813e..4ea3295 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -18,8 +18,8 @@ vi /etc/hosts apt-get install mongodb=1:2.4.9-1ubuntu2 - apt-get install nodejs git nginx postfix redis-server ntp supervisor - apt-get install python g++ make screen git wget zip unzip iftop vim curl htop iptraf nethogs + apt-get install nodejs git nginx redis-server ntp supervisor + apt-get install python g++ make screen wget zip unzip iftop vim curl htop iptraf nethogs npm install coffee-script -g @@ -154,7 +154,7 @@ ### Runtime # Shell - apt-get install libcurl4-openssl-dev axel unrar-free emacs subversion subversion-tools tmux mercurial + apt-get install libcurl4-openssl-dev axel unrar-free emacs subversion subversion-tools tmux mercurial postfix # Golang apt-get install golang golang-go.tools diff --git a/core/model/notification.coffee b/core/model/notification.coffee new file mode 100644 index 0000000..f8bbfc7 --- /dev/null +++ b/core/model/notification.coffee @@ -0,0 +1,10 @@ +module.exports = exports = app.db.collection 'notifications' + +sample = + account_id: ObjectID() + created_at: Date() + level: 'notice/event/log' + type: 'payment_success' + meta: + amount: 10 + diff --git a/core/notification.coffee b/core/notification.coffee index e69de29..e60f118 100644 --- a/core/notification.coffee +++ b/core/notification.coffee @@ -0,0 +1 @@ +exports.createNotice = (account, level, notice, callback) ->