1
0
mirror of https://github.com/Foltik/Shimapan synced 2024-12-02 18:48:32 -05:00
shimapan/app/models/Upload.js

46 lines
682 B
JavaScript

var mongoose = require('mongoose');
var UploadSchema = mongoose.Schema({
name: {
type: String,
required: true
},
id: {
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
},
mime: {
type: String,
required: true,
},
file: {
type: Object,
required: true
}
});
module.exports = mongoose.model('Upload', UploadSchema);