overleaf/services/web/app/coffee/models/Folder.coffee

21 lines
590 B
CoffeeScript
Raw Normal View History

mongoose = require('mongoose')
2014-02-12 05:23:40 -05:00
Settings = require 'settings-sharelatex'
DocSchema = require('./Doc').DocSchema
FileSchema = require('./File').FileSchema
Schema = mongoose.Schema
ObjectId = Schema.ObjectId
FolderSchema = new Schema
name : {type:String, default:'new folder'}
FolderSchema.add
docs : [DocSchema]
fileRefs : [FileSchema]
folders : [FolderSchema]
mongoose.model('Folder', FolderSchema)
exports.Folder = mongoose.model('Folder')
exports.FolderSchema = FolderSchema