| 1234567891011121314151617181920212223 |
- 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
|