2019-11-18 09:03:20 -05:00
|
|
|
const mongoose = require('../infrastructure/Mongoose')
|
2019-05-29 05:21:06 -04:00
|
|
|
|
|
|
|
const { Schema } = mongoose
|
|
|
|
|
|
|
|
const FileSchema = new Schema({
|
|
|
|
name: {
|
|
|
|
type: String,
|
2021-04-27 03:52:58 -04:00
|
|
|
default: '',
|
2019-05-29 05:21:06 -04:00
|
|
|
},
|
|
|
|
created: {
|
|
|
|
type: Date,
|
|
|
|
default() {
|
|
|
|
return new Date()
|
2021-04-27 03:52:58 -04:00
|
|
|
},
|
2019-05-29 05:21:06 -04:00
|
|
|
},
|
|
|
|
rev: { type: Number, default: 0 },
|
|
|
|
linkedFileData: { type: Schema.Types.Mixed },
|
|
|
|
hash: {
|
2021-04-27 03:52:58 -04:00
|
|
|
type: String,
|
|
|
|
},
|
2019-05-29 05:21:06 -04:00
|
|
|
})
|
|
|
|
|
2019-11-18 09:03:20 -05:00
|
|
|
exports.File = mongoose.model('File', FileSchema)
|
2019-05-29 05:21:06 -04:00
|
|
|
exports.FileSchema = FileSchema
|