mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-05 15:19:02 +02:00
4b5f31ac95
Revert "Revert "[web] Add group audit log"" GitOrigin-RevId: 4d61cfd9e8a7dac1f5837a4028aff95fa19c308a
24 lines
621 B
JavaScript
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
|