const mongoose = require('mongoose');
const Schema = mongoose.Schema;

const schema = new Schema ({
    name: {
        type: String,
        required: true,
    },
    userId: {
        type: Schema.Types.ObjectId,
        ref: 'User',
    },
    settings: {
        type: String
    },
    votes: {
        type: Number
    },
    favorites: {
        type: Number
    }
});

module.exports = mongoose.model('Patch', schema);
@@ -261,28 +261,199 @@
         
-type: String
+envelope: %7B%0A            attack: Number,%0A            decay: Number,%0A            sustain: Number,%0A            release: Number%0A        %7D,%0A        wave: String,%0A        portamento: Number
 %0A    %7D,%0A

patch schema updated to match the front end