DeletedFile.js 494 B

123456789101112131415161718192021
  1. const mongoose = require('../infrastructure/Mongoose')
  2. const { Schema } = mongoose
  3. const DeletedFileSchema = new Schema(
  4. {
  5. name: String,
  6. projectId: Schema.ObjectId,
  7. created: {
  8. type: Date,
  9. },
  10. linkedFileData: { type: Schema.Types.Mixed },
  11. hash: {
  12. type: String,
  13. },
  14. deletedAt: { type: Date },
  15. },
  16. { collection: 'deletedFiles' }
  17. )
  18. exports.DeletedFile = mongoose.model('DeletedFile', DeletedFileSchema)
  19. exports.DeletedFileSchema = DeletedFileSchema