mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 10:10:08 +02:00
Upgrade Mongoose and the Mongo driver in web GitOrigin-RevId: 2cad1aabe57eae424a9e4c68b2e0062f0e78ffaf
28 lines
511 B
JavaScript
28 lines
511 B
JavaScript
const mongoose = require('../infrastructure/Mongoose')
|
|
|
|
const { Schema } = mongoose
|
|
|
|
const FileSchema = new Schema(
|
|
{
|
|
name: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
created: {
|
|
type: Date,
|
|
default() {
|
|
return new Date()
|
|
},
|
|
},
|
|
rev: { type: Number, default: 0 },
|
|
linkedFileData: { type: Schema.Types.Mixed },
|
|
hash: {
|
|
type: String,
|
|
},
|
|
},
|
|
{ minimize: false }
|
|
)
|
|
|
|
exports.File = mongoose.model('File', FileSchema)
|
|
exports.FileSchema = FileSchema
|