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.
43 lines
596 B
43 lines
596 B
'use strict'
|
|
|
|
const Mongoose = require('mongoose')
|
|
|
|
/**
|
|
* Entry schema
|
|
*
|
|
* @type {<Mongoose.Schema>}
|
|
*/
|
|
var entrySchema = Mongoose.Schema({
|
|
_id: String,
|
|
|
|
title: {
|
|
type: String,
|
|
required: true,
|
|
minlength: 2
|
|
},
|
|
subtitle: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
parentTitle: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
parentPath: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
isDirectory: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
isEntry: {
|
|
type: Boolean,
|
|
default: false
|
|
}
|
|
}, {
|
|
timestamps: {}
|
|
})
|
|
|
|
module.exports = Mongoose.model('Entry', entrySchema)
|