1
0
mirror of https://github.com/Foltik/Shimapan synced 2024-11-15 09:08:06 -05:00
shimapan/app/models/Upload.js

36 lines
555 B
JavaScript
Raw Normal View History

2017-10-09 22:01:02 -04:00
var mongoose = require('mongoose');
var UploadSchema = mongoose.Schema({
2018-07-26 13:17:37 -04:00
id: {
type: String,
2017-10-09 22:01:02 -04:00
unique: true,
required: true
},
2018-07-26 13:17:37 -04:00
2017-10-14 15:13:50 -04:00
views: {
type: Number,
default: 0
},
2018-07-26 13:17:37 -04:00
uploader: {
type: String,
required: true
},
uploaderKey: {
type: String,
default: null
},
date: {
type: Date,
default: Date.now
},
2018-07-26 16:51:27 -04:00
2018-07-26 13:17:37 -04:00
file: {
type: Object,
required: true
}
2017-10-09 22:01:02 -04:00
});
module.exports = mongoose.model('Upload', UploadSchema);