1
0
mirror of https://github.com/Foltik/Shimapan synced 2024-11-14 08:49:51 -05:00
shimapan/app/models/User.js
2017-10-18 13:31:08 -04:00

24 lines
495 B
JavaScript

var mongoose = require('mongoose');
var passportLocalMongoose = require('passport-local-mongoose');
var UserSchema = mongoose.Schema({
username: {
type: String,
unique: true,
required: true
},
scope: [String],
uploadCount: {
type: Number,
default: 0
},
uploadSize: {
type: Number,
default: 0
},
date: Date
});
UserSchema.plugin(passportLocalMongoose);
module.exports = mongoose.model('User', UserSchema);