Skip to content

Commit

Permalink
feat: user referance
Browse files Browse the repository at this point in the history
  • Loading branch information
shan-shaji committed Sep 28, 2021
1 parent 6c51f2f commit e8d4acf
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions dummy/post.dummy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const dummy = require('mongoose-dummy')
const ignoredFields = ['_id', '__v', /detail.*_info/]
const Schema = mongoose.Schema
let schemaDefinition = new mongoose.Schema({
user: {
postedBy: {
type: Schema.Types.ObjectId,
ref: 'User',
},
Expand Down Expand Up @@ -45,18 +45,18 @@ let randomObject = dummy(model, {
ignore: ignoredFields,
returnDate: true,
})
console.log(randomObject)
console.log(JSON.stringify(randomObject))

// {
// "user": "614f82e9fd606f98221f63f0",
// "title": "Javier.Bode",
// "votes": 7,
// "photoUrl": "Ophelia53",
// "videoUrl": "Julio40",
// "category": "Danial78",
// "comments": [
// "614f82e9fd606f98221f63f0",
// ],
// "createdOn": "2021-09-25T01:43:14.750Z",
// "decription": "Brenden81"
// }
// {
// "user": "614f82e9fd606f98221f63f0",
// "title": "Javier.Bode",
// "votes": 7,
// "photoUrl": "Ophelia53",
// "videoUrl": "Julio40",
// "category": "Danial78",
// "comments": [
// "614f82e9fd606f98221f63f0",
// ],
// "createdOn": "2021-09-25T01:43:14.750Z",
// "decription": "Brenden81"
// }

0 comments on commit e8d4acf

Please sign in to comment.