mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-03-29 16:48:02 +08:00
30 lines
505 B
CoffeeScript
30 lines
505 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', 'ticket_create', 'ticket_reply']
|
|
|
|
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
|