page-archive.js 573 B

123456789101112131415161718
  1. module.exports = function(crowi) {
  2. const mongoose = require('mongoose');
  3. const ObjectId = mongoose.Schema.Types.ObjectId;
  4. const pageArchiveSchema = new mongoose.Schema({
  5. filePath: { type: String, required: true },
  6. creator: { type: ObjectId, ref: 'User', index: true },
  7. basePagePath: { type: String, required: true },
  8. fileType: { type: String },
  9. NumOfPages: { type: Number },
  10. hasComment: { type: Boolean },
  11. hasAttachment: { type: Boolean },
  12. }, {
  13. timestamps: true,
  14. });
  15. return mongoose.model('PageArchive', pageArchiveSchema);
  16. };