Skip to content

Commit

Permalink
for #1 blog model created, and summary and description added to blog and
Browse files Browse the repository at this point in the history
case study models
  • Loading branch information
victorkane committed Sep 11, 2018
1 parent 0710362 commit e2b1b32
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scs/server/models/blog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var mongoose = require('./db')
var MetaData = require('./base-content-attributes/meta-data').MetaData
var Tag = require('./base-content-attributes/tag').Tag

var blogSchema = mongoose.Schema({
idLegacy: Number,
metaData: MetaData.schema,
author: [{type: mongoose.Schema.Types.ObjectId, ref: 'Author'}],
blogSummary: String,
blogDescription: String,
tags: [Tag.schema]
})

exports.Blog = mongoose.model('Blog', blogSchema)
2 changes: 2 additions & 0 deletions scs/server/models/case-study.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ var caseStudySchema = mongoose.Schema({
idLegacy: Number,
metaData: MetaData.schema,
articles: [{ weight: Number, article: { type: mongoose.Schema.Types.ObjectId, ref: 'Article'} }],
caseStudySummary: String,
caseStudyDescription: String,
tags: [Tag.schema]
})

Expand Down

0 comments on commit e2b1b32

Please sign in to comment.