GroupAuditLogEntry.js 621 B

1234567891011121314151617181920212223
  1. const mongoose = require('../infrastructure/Mongoose')
  2. const { Schema } = mongoose
  3. const GroupAuditLogEntrySchema = new Schema(
  4. {
  5. groupId: { type: Schema.Types.ObjectId, index: true },
  6. info: { type: Object },
  7. initiatorId: { type: Schema.Types.ObjectId },
  8. ipAddress: { type: String },
  9. operation: { type: String },
  10. timestamp: { type: Date, default: Date.now },
  11. },
  12. {
  13. collection: 'groupAuditLogEntries',
  14. minimize: false,
  15. }
  16. )
  17. exports.GroupAuditLogEntry = mongoose.model(
  18. 'GroupAuditLogEntry',
  19. GroupAuditLogEntrySchema
  20. )
  21. exports.GroupAuditLogEntrySchema = GroupAuditLogEntrySchema