mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-03 14:19:01 +02:00
Merge pull request #9617 from overleaf/msm-audit-log-collections
Move project/user audit logs to their own collections GitOrigin-RevId: f6f89b3e2815c0fe5691a79eceb35b77b3c370d8
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
const mongoose = require('../infrastructure/Mongoose')
|
||||
const { Schema } = mongoose
|
||||
|
||||
const ProjectAuditLogEntrySchema = new Schema(
|
||||
{
|
||||
projectId: { type: Schema.Types.ObjectId, index: true },
|
||||
operation: { type: String },
|
||||
initiatorId: { type: Schema.Types.ObjectId },
|
||||
timestamp: { type: Date, default: Date.now },
|
||||
info: { type: Object },
|
||||
},
|
||||
{
|
||||
collection: 'projectAuditLogEntries',
|
||||
}
|
||||
)
|
||||
|
||||
exports.ProjectAuditLogEntry = mongoose.model(
|
||||
'ProjectAuditLogEntry',
|
||||
ProjectAuditLogEntrySchema
|
||||
)
|
||||
exports.ProjectAuditLogEntrySchema = ProjectAuditLogEntrySchema
|
||||
Reference in New Issue
Block a user