mirror of
https://github.com/Foltik/Shimapan
synced 2025-01-06 00:08:25 -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