Repository URL to install this package:
|
Version:
3.1.0 ▾
|
const _ = require( 'lodash' );
const config = require( 'config' );
const debug = require( 'debug' )( 'touchto:base-user' );
const phpass = require( 'phpass' );
const mongoose = require( 'mongoose' );
const linkSchema = new mongoose.Schema( {
route: {
type: String,
},
text: {
type: String,
},
href: {
type: String,
},
className: {
type: String,
},
weight: {
type: String,
},
}, { strinct: false, } );
const navigationSchema = new mongoose.Schema( {
type: {
type: String,
},
title: {
type: String,
},
links: [linkSchema],
}, {
strict: false,
collection: 'links',
} );
module.exports = {
Model: mongoose.model( 'Navigation', navigationSchema ),
schema: navigationSchema,
};