- Initial commit... A DB, some routes, and basic authentication routines...

This commit is contained in:
2019-07-04 16:19:30 -04:00
commit d9a2d33913
32 changed files with 3465 additions and 0 deletions

49
models/install.js Normal file
View File

@@ -0,0 +1,49 @@
const mongoose = require('mongoose');
const timestamps = require('mongoose-timestamp');
const InstallSchema = new mongoose.Schema(
{
timeZone: {
type: String,
required: true,
trim: true,
},
deviceType: {
type: String,
required: true,
trim: true,
enum: [ 'android', 'ios', 'web' ],
},
badge: {
type: Number,
default: 0,
},
installationId: {
type: String,
required: true,
unique: true,
},
email: {
type: String,
required: true,
trim: true,
},
appIdentifier: {
type: String,
required: true,
trim: true,
},
localeIdentifier: {
type: String,
required: true,
trim: true,
},
},
{ minimize: false },
);
InstallSchema.plugin(timestamps);
const Install = mongoose.model('Install', InstallSchema);
module.exports = Install;