AuditEvent constructor

AuditEvent({
  1. String? id,
  2. required AuditEventType type,
  3. String? stateKey,
  4. dynamic oldValue,
  5. dynamic newValue,
  6. String? userId,
  7. String? userEmail,
  8. DateTime? timestamp,
  9. Map<String, dynamic>? metadata,
  10. String? previousHash,
  11. String? hash,
})

Implementation

AuditEvent({
  String? id,
  required this.type,
  this.stateKey,
  this.oldValue,
  this.newValue,
  this.userId,
  this.userEmail,
  DateTime? timestamp,
  this.metadata,
  this.previousHash,
  this.hash,
})  : id = id ?? _generateId(),
      timestamp = timestamp ?? DateTime.now();