- Aggiunto le Statistiche di visualizzazione delle pagine.
- Aggiunto il componente per visualizzare le statistiche
This commit is contained in:
26
src/server/models/PageView.js
Executable file
26
src/server/models/PageView.js
Executable file
@@ -0,0 +1,26 @@
|
||||
// /backend/models/PageView.js
|
||||
|
||||
const mongoose = require('mongoose');
|
||||
|
||||
const PageViewSchema = new mongoose.Schema({
|
||||
url: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
idapp: String,
|
||||
ip: {
|
||||
type: String,
|
||||
default: 'unknown'
|
||||
},
|
||||
userId: String,
|
||||
username: String,
|
||||
userAgent: {
|
||||
type: String
|
||||
},
|
||||
timestamp: {
|
||||
type: Date,
|
||||
default: Date.now
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = mongoose.model('PageView', PageViewSchema);
|
||||
Reference in New Issue
Block a user