[web] last infrastructure conversions GitOrigin-RevId: ad1aff9b7df0610ed0303157d9e2c8032f32c02b
21 lines
445 B
JavaScript
21 lines
445 B
JavaScript
import mongoose from '../infrastructure/Mongoose.mjs'
|
|
import { DocSchema } from './Doc.mjs'
|
|
import { FileSchema } from './File.mjs'
|
|
|
|
const { Schema } = mongoose
|
|
|
|
export const FolderSchema = new Schema(
|
|
{
|
|
name: { type: String, default: 'new folder' },
|
|
},
|
|
{ minimize: false }
|
|
)
|
|
|
|
FolderSchema.add({
|
|
docs: [DocSchema],
|
|
fileRefs: [FileSchema],
|
|
folders: [FolderSchema],
|
|
})
|
|
|
|
export const Folder = mongoose.model('Folder', FolderSchema)
|