<commit_before>var mongoose = require('mongoose'),
    ObjectId = mongoose.Schema.Types.ObjectId,
    schema = require('../models').schema;

var EventSchema = new mongoose.Schema({
    title: {type: String, trim: true, required: true},
    start: {type: Date, required: true},
    end: {type: Date},
    // whole_day needed? from nidarholm
    location: {type: String},
    permissions: {
        groups: [{type: ObjectId, ref: 'Group'}],
        users: [{type: String, ref: 'User'}],
        public: {type: Boolean, default: false}
    },
    tags: [{type: String}],
    creator: {type: String, ref: 'User', required: true},
    created: {type: Date, default: Date.now},
    music: [{
        title: {type: String, required: true},
        part: {type: String},
        composer: {type: String},
        arrangers: [{ type: String }],
        contributors: [{
            name: {type: String},
            role: {type: String}
        }]<commit_msg>Add deprecated fields just in case.<commit_after>var mongoose = require('mongoose'),
    ObjectId = mongoose.Schema.Types.ObjectId,
    schema = require('../models').schema;

var EventSchema = new mongoose.Schema({
    title: {type: String, trim: true, required: true},
    start: {type: Date, required: true},
    end: {type: Date},
    // whole_day needed? from nidarholm
    original_whole_day: {type: Boolean, default: false},
    original_event_serie: {type: Number},
    original_event_category: {type: Number},
    location: {type: String},
    permissions: {
        groups: [{type: ObjectId, ref: 'Group'}],
        users: [{type: String, ref: 'User'}],
        public: {type: Boolean, default: false}
    },
    tags: [{type: String}],
    creator: {type: String, ref: 'User', required: true},
    created: {type: Date, default: Date.now},
    modified: {type: Date},
    music: [{
        title: {type: String, required: true},
        part: {type: String},
        composer: {type: String},
        arrangers: [{ type: String }],
        contributors: [{
            name: {type: String},
            role: {type: String}
        }]
{'fraction_non_alphanumeric': 0.15998089780324737, 'fraction_numerical': 0.0, 'mean_word_length': 2.8021778584392014, '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': '4860606', 'n_tokens_mistral': 629, 'n_tokens_neox': 642, 'n_words': 191}