mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-27 11:01:56 +02:00
Upgrade Mongoose and the Mongo driver in web GitOrigin-RevId: 2cad1aabe57eae424a9e4c68b2e0062f0e78ffaf
22 lines
472 B
JavaScript
22 lines
472 B
JavaScript
const mongoose = require('../infrastructure/Mongoose')
|
|
const { DocSchema } = require('./Doc')
|
|
const { FileSchema } = require('./File')
|
|
|
|
const { Schema } = mongoose
|
|
|
|
const FolderSchema = new Schema(
|
|
{
|
|
name: { type: String, default: 'new folder' },
|
|
},
|
|
{ minimize: false }
|
|
)
|
|
|
|
FolderSchema.add({
|
|
docs: [DocSchema],
|
|
fileRefs: [FileSchema],
|
|
folders: [FolderSchema],
|
|
})
|
|
|
|
exports.Folder = mongoose.model('Folder', FolderSchema)
|
|
exports.FolderSchema = FolderSchema
|