Files
overleaf-cep/services/web/app/src/models/GroupAuditLogEntry.js
T
Jessica Lawshe 4b5f31ac95 Merge pull request #25353 from overleaf/revert-25351-revert-24919-jel-create-group-audit-log
Revert "Revert "[web] Add group audit log""

GitOrigin-RevId: 4d61cfd9e8a7dac1f5837a4028aff95fa19c308a
2025-05-08 08:06:32 +00:00

24 lines
621 B
JavaScript

const mongoose = require('../infrastructure/Mongoose')
const { Schema } = mongoose
const GroupAuditLogEntrySchema = new Schema(
{
groupId: { type: Schema.Types.ObjectId, index: true },
info: { type: Object },
initiatorId: { type: Schema.Types.ObjectId },
ipAddress: { type: String },
operation: { type: String },
timestamp: { type: Date, default: Date.now },
},
{
collection: 'groupAuditLogEntries',
minimize: false,
}
)
exports.GroupAuditLogEntry = mongoose.model(
'GroupAuditLogEntry',
GroupAuditLogEntrySchema
)
exports.GroupAuditLogEntrySchema = GroupAuditLogEntrySchema