overleaf/services/web/app/coffee/models/File.coffee
Brian Gough 07b7566466 Merge pull request #1089 from overleaf/bg-compute-filestore-hash
compute filestore hash

GitOrigin-RevId: 23a909d2c2ea7aba3abfdb8f0c060e414a17e52e
2019-05-13 08:49:42 +00:00

16 lines
466 B
CoffeeScript

mongoose = require 'mongoose'
Settings = require 'settings-sharelatex'
Schema = mongoose.Schema
ObjectId = Schema.ObjectId
FileSchema = new Schema
name : type:String, default:''
created : type:Date, default: () -> new Date()
rev : {type:Number, default:0}
linkedFileData: { type: Schema.Types.Mixed }
hash : type:String
mongoose.model 'File', FileSchema
exports.File = mongoose.model 'File'
exports.FileSchema = FileSchema