Files
old-amras-zadatak1/api/models/userModel.js

17 lines
327 B
JavaScript
Raw Permalink Normal View History

'use strict';
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
2018-02-18 13:36:42 +01:00
var userSchema = new Schema({
2018-02-17 18:00:22 +01:00
// TODO additional fields may be added
2018-02-18 13:36:42 +01:00
username: String,
email: String,
Created_date: {
type: Date,
default: Date.now
}
});
2018-02-18 13:36:42 +01:00
module.exports = mongoose.model('User', userSchema);