<commit_before>'use strict';

/**
 * Module dependencies.
 */
var mongoose = require('mongoose'),
	Schema = mongoose.Schema;

/**
 * Meeting Schema
 */
var MeetingSchema = new Schema({
	name: {
		type: String,
		default: '',
		required: 'Please fill meeting name',
		trim: true
	},
	notes:{
		type: String,
		default: '',
		trim: true
	},
	members:[{
		displayName: String,
		userId: String,
		isPresent: Boolean
	}],
	agendaItems:[{
		name: String,
		agendaId: String,
		resolved: Boolean
	}],
	membersPresent: Number,
	noteTaker: {
		type: String,
		required: 'Please select a note taker'
	}
});

//instance method
MeetingSchema.methods.findByUser = function ( callback) {
	return this.model('Meeting').find({ user: this.user }, callback);
};

//static method
MeetingSchema.statics.findByName = function (name, callback) {
	this.find({ name: new RegExp(name, 'i') }, callback);
};

mongoose.model('Meeting', MeetingSchema);<commit_msg>update meeting model<commit_after>'use strict';

/**
 * Module dependencies.
 */
var mongoose = require('mongoose'),
	Schema = mongoose.Schema;

/**
 * Meeting Schema
 */
var MeetingSchema = new Schema({
	name: {
		type: String,
		default: '',
		required: 'Please fill meeting name',
		trim: true
	},
	notes:{
		type: String,
		default: '',
		trim: true
	},
	members:[{
		displayName: String,
		userId: String,
		isPresent: Boolean
	}],
	agendaItems:[{
		name: String,
		owner:String,
		_id: String,
		resolved: Boolean
	}],
	membersPresent: Number,
	noteTaker: {
		type: String,
		required: 'Please select a note taker'
	}
});

//instance method
MeetingSchema.methods.findByUser = function ( callback) {
	return this.model('Meeting').find({ user: this.user }, callback);
};

//static method
MeetingSchema.statics.findByName = function (name, callback) {
	this.find({ name: new RegExp(name, 'i') }, callback);
};

mongoose.model('Meeting', MeetingSchema);
{'fraction_non_alphanumeric': 0.15644820295983086, 'fraction_numerical': 0.0, 'mean_word_length': 4.172131147540983, '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': '3848443', 'n_tokens_mistral': 663, 'n_tokens_neox': 639, 'n_words': 164}