Files
RootPanel/core/model/Notification.coffee
2014-10-27 01:56:45 +08:00

30 lines
472 B
CoffeeScript

{_, ObjectId, mongoose} = app.libs
Notification = mongoose.Schema
account_id:
type: ObjectId
ref: 'Account'
group_name:
type: String
type:
required: true
type: String
enum: ['payment_success']
level:
required: true
type: String
enum: ['notice', 'event', 'log']
created_at:
type: Date
default: Date.now
payload:
type: Object
_.extend app.models,
Notification: mongoose.model 'Notification', Notification