<commit_before>'use strict';

//users router

var express = require('express');
var restify = require('express-restify-mongoose');
var router = express.Router();
//var user = require('../domain/user');

var mongoose = require('../utils/mongoConnection');

var Schema = mongoose.Schema;

var User = new Schema({
    //user schema
    //id: { type: String, required: true },
    username: { type: String, required: true },
    password: { type: String, required: true },
    email: { type: String, required: true }
});

var UserModel = mongoose.model('User', User);

restify.serve(router, UserModel);

module.exports = router;
<commit_msg>update user schema: include plans and activities<commit_after>'use strict';

//users router

var express = require('express');
var restify = require('express-restify-mongoose');
var router = express.Router();
//var user = require('../domain/user');

var mongoose = require('../utils/mongoConnection');

var Schema = mongoose.Schema;

var User = new Schema({
    //user schema
    //id: { type: String, required: true },
    username: { type: String, required: true },
    password: { type: String, required: true },
    email: { type: String, required: true },
    plans:[{
        destAddr: String,
        destLat: Number,
        destLng: Number,
        startDate: Date,
        endDate: Date,
        active: {type: Boolean, default: true },
        activities:[{
            venue: String,
            startTime: String, //store time as string????
            duration: Number,
            category: String
        }]
    }]
});

var UserModel = mongoose.model('User', User);

restify.serve(router, UserModel);

module.exports = router;

{'fraction_non_alphanumeric': 0.15, 'fraction_numerical': 0.0, 'mean_word_length': 3.0900243309002433, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5593674', 'n_tokens_mistral': 486, 'n_tokens_neox': 490, 'n_words': 147}