GroupAuditLogEntry.mjs 572 B

12345678910111213141516171819202122
  1. import mongoose from '../infrastructure/Mongoose.mjs'
  2. const { Schema } = mongoose
  3. export 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. export const GroupAuditLogEntry = mongoose.model(
  18. 'GroupAuditLogEntry',
  19. GroupAuditLogEntrySchema
  20. )