43 lines
596 B
JavaScript
Raw Normal View History

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