File size: 588 Bytes
8811634
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const mongoose = require('mongoose');

const TutorialRefinityVersionSchema = new mongoose.Schema({
  taskId: { type: mongoose.Schema.Types.ObjectId, ref: 'TutorialRefinityTask', required: true },
  originalAuthor: { type: String, required: true },
  revisedBy: { type: String },
  versionNumber: { type: Number, required: true },
  content: { type: String, required: true },
  parentVersionId: { type: mongoose.Schema.Types.ObjectId, ref: 'TutorialRefinityVersion' },
}, { timestamps: true });

module.exports = mongoose.model('TutorialRefinityVersion', TutorialRefinityVersionSchema);