muffin
Version:
The 21st century way of building websites
37 lines (31 loc) • 626 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _db = require('../utils/db');
/*
const contentSchema = goose.Schema({
lang: String,
fields: [{
_id: String,
content: Object
}]
})*/
const pageSchema = _db.goose.Schema({
title: String,
author: String,
dates: {
created: Date,
updated: Date
},
content: String,
slug: {
type: String,
lowercase: true
}
// content: [contentSchema]
});
pageSchema.set('toObject', { virtuals: true });
const model = _db.goose.model('Page', pageSchema);
exports.default = model;
module.exports = exports['default'];