mirror of https://github.com/requarks/wiki
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
558 B
41 lines
558 B
8 years ago
|
'use strict'
|
||
8 years ago
|
|
||
|
/**
|
||
|
* Entry schema
|
||
|
*
|
||
|
* @type {<Mongoose.Schema>}
|
||
|
*/
|
||
8 years ago
|
var entrySchema = Mongoose.Schema({
|
||
8 years ago
|
_id: String,
|
||
8 years ago
|
|
||
|
title: {
|
||
|
type: String,
|
||
|
required: true,
|
||
|
minlength: 2
|
||
|
},
|
||
|
subtitle: {
|
||
|
type: String,
|
||
|
default: ''
|
||
|
},
|
||
8 years ago
|
parentTitle: {
|
||
8 years ago
|
type: String,
|
||
|
default: ''
|
||
8 years ago
|
},
|
||
|
parentPath: {
|
||
|
type: String,
|
||
|
default: ''
|
||
8 years ago
|
},
|
||
|
isDirectory: {
|
||
|
type: Boolean,
|
||
|
default: false
|
||
8 years ago
|
},
|
||
|
isEntry: {
|
||
|
type: Boolean,
|
||
|
default: false
|
||
8 years ago
|
}
|
||
8 years ago
|
}, {
|
||
|
timestamps: {}
|
||
|
})
|
||
8 years ago
|
|
||
8 years ago
|
module.exports = Mongoose.model('Entry', entrySchema)
|