mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-10 06:39:01 +02:00
394c60f2cf
Revert "Revert "[web] Convert models and self-referential test files to ESM "" GitOrigin-RevId: f64000ae31d298b075a8722dfc51f294c71bc021
27 lines
489 B
JavaScript
27 lines
489 B
JavaScript
import mongoose from '../infrastructure/Mongoose.js'
|
|
|
|
const { Schema } = mongoose
|
|
|
|
export 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 }
|
|
)
|
|
|
|
export const File = mongoose.model('File', FileSchema)
|