- 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

29
models/common/phone.js Normal file
View File

@@ -0,0 +1,29 @@
const mongoose = require('mongoose');
const mongooseStringQuery = require('mongoose-string-query');
const mongooseTimestamps = require('mongoose-timestamp');
const PhoneSchema = new mongoose.Schema(
{
countryCode: {
type: String,
required: true,
default: '1',
},
number: {
type: String,
required: true,
},
label: {
type: String,
required: true,
enum: [ 'home', 'mobile' ],
},
},
{ minimize: false },
);
PhoneSchema.plugin(mongooseStringQuery);
PhoneSchema.plugin(mongooseTimestamps);
module.exports = PhoneSchema;