1
0
mirror of https://github.com/Foltik/Shimapan synced 2024-11-13 00:26:55 -05:00

Add View model

This commit is contained in:
Jack Foltz 2018-09-15 18:26:14 -04:00
parent 1139ff7f10
commit 2783c10259
Signed by: foltik
GPG Key ID: 303F88F996E95541

31
app/models/View.js Normal file
View File

@ -0,0 +1,31 @@
const mongoose = require('mongoose');
const ViewSchema = mongoose.Schema({
uid: {
type: String,
unique: true,
required: true
},
uploader: {
type: String,
required: true
},
remoteAddress: {
type: String,
required: true
},
userAgent: {
type: String,
required: true
},
date: {
type: Date,
default: Date.now
}
});
module.exports = mongoose.model('View', ViewSchema);