loopback/lib/models/installation.js

27 lines
803 B
JavaScript
Raw Normal View History

2013-07-01 22:53:10 +00:00
// See Device registration
var InstallationSchema = {
2013-07-08 23:59:11 +00:00
id: {
type: String,
required: true,
id: 1
},
2013-07-09 22:06:42 +00:00
appId: String, // Application id
appVersion: String, // Application version
userId: String, // User id
deviceToken: String, // Device token
deviceType: String, // Device type, such as apns
2013-07-08 23:59:11 +00:00
subscriptions: [String],
2013-07-09 22:06:42 +00:00
status: {type: String, default: 'active'}, // Status of the application, production/sandbox/disabled
// Timestamps
created: {type: Date, default: Date},
modified: {type: Date, default: Date}
};
2013-07-09 22:06:42 +00:00
module.exports = function(dataSource) {
2013-07-16 18:52:21 +00:00
dataSource = dataSource || new require('loopback-data').ModelBuilder();
2013-07-09 22:06:42 +00:00
var Installation = dataSource.define('Installation', InstallationSchema);
return Installation;
}