mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-26 02:30:07 +02:00
Project audit logs for invite operations GitOrigin-RevId: c2db4bc719f508c5bf33be2c59eddfb63fcdae25
24 lines
637 B
JavaScript
24 lines
637 B
JavaScript
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 },
|
|
ipAddress: { type: String },
|
|
timestamp: { type: Date, default: Date.now },
|
|
info: { type: Object },
|
|
},
|
|
{
|
|
collection: 'projectAuditLogEntries',
|
|
minimize: false,
|
|
}
|
|
)
|
|
|
|
exports.ProjectAuditLogEntry = mongoose.model(
|
|
'ProjectAuditLogEntry',
|
|
ProjectAuditLogEntrySchema
|
|
)
|
|
exports.ProjectAuditLogEntrySchema = ProjectAuditLogEntrySchema
|