mirror of
https://github.com/Foltik/Shimapan
synced 2024-11-13 00:26:55 -05:00
Add View model
This commit is contained in:
parent
1139ff7f10
commit
2783c10259
31
app/models/View.js
Normal file
31
app/models/View.js
Normal 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);
|
Loading…
Reference in New Issue
Block a user