UNPKG

generator-modern-node

Version:
32 lines (26 loc) 414 B
'use strict'; const mongoose = require('mongoose'); const Schema = mongoose.Schema; // Create Schema const UserSchema = new Schema({ username: { type: String, }, password: { type: String, }, changeLog: { type: Object, default: { log: [ ], }, }}, { toObject: { virtuals: true, }, toJSON: { virtuals: true, }, }); mongoose.model('users', UserSchema);