mirror of
https://github.com/Foltik/Shimapan
synced 2024-11-15 09:08:06 -05:00
36 lines
556 B
JavaScript
36 lines
556 B
JavaScript
var mongoose = require('mongoose');
|
|
|
|
var UploadSchema = mongoose.Schema({
|
|
uid: {
|
|
type: String,
|
|
unique: true,
|
|
required: true
|
|
},
|
|
|
|
views: {
|
|
type: Number,
|
|
default: 0
|
|
},
|
|
|
|
uploader: {
|
|
type: String,
|
|
required: true
|
|
},
|
|
|
|
uploaderKey: {
|
|
type: String,
|
|
default: null
|
|
},
|
|
|
|
date: {
|
|
type: Date,
|
|
default: Date.now
|
|
},
|
|
|
|
file: {
|
|
type: Object,
|
|
required: true
|
|
}
|
|
});
|
|
|
|
module.exports = mongoose.model('Upload', UploadSchema); |