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

26 lines
453 B
CoffeeScript

{_, ObjectId, mongoose} = app.libs
SecurityLog = mongoose.Schema
account_id:
required: true
type: ObjectId
ref: 'Account'
type:
required: true
type: String
enum: ['revoke_token', 'update_password', 'update_email', 'update_preferences']
created_at:
type: Date
default: Date.now
payload:
type: Object
token:
type: Object
_.extend app.models,
SecurityLog: mongoose.model 'SecurityLog', SecurityLog