Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
touchto-core / modules / navigation.js
Size: Mime:
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,
};