You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
356 B
JavaScript

var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var TagSchema = new Schema({
name: {type: String, required: true},
urlslug: {type: String, required: true, unique: true},
socks: [{type: Schema.Types.ObjectId, ref: 'Sock'}]
});
var Tag = mongoose.model('Tag', TagSchema);
module.exports.model = Tag;
module.exports.schema = TagSchema