wiki/models/entry.js

37 lines
502 B
JavaScript
Raw Normal View History

2017-02-08 19:52:37 -06:00
'use strict'
/**
* Entry schema
*
* @type {<Mongoose.Schema>}
*/
2016-11-20 19:09:50 -06:00
var entrySchema = Mongoose.Schema({
2017-02-08 19:52:37 -06:00
_id: String,
title: {
type: String,
required: true,
minlength: 2
},
subtitle: {
type: String,
default: ''
},
2017-04-17 21:44:04 -05:00
parentTitle: {
type: String,
default: ''
2017-04-08 15:38:28 -05:00
},
parentPath: {
type: String,
default: ''
2017-04-17 21:44:04 -05:00
},
isDirectory: {
type: Boolean,
default: false
}
2017-04-17 21:44:04 -05:00
}, {
timestamps: {}
})
2017-02-08 19:52:37 -06:00
module.exports = Mongoose.model('Entry', entrySchema)