Memory constructor

Memory({
  1. required String id,
  2. required String content,
  3. required MemoryType type,
  4. DateTime? timestamp,
  5. EmotionalValence emotionalValence = EmotionalValence.neutral,
  6. double emotionalIntensity = 0.0,
  7. double strength = 1.0,
  8. List<String>? associatedConceptIds,
  9. Map<String, dynamic>? context,
})

Implementation

Memory({
  required this.id,
  required this.content,
  required this.type,
  DateTime? timestamp,
  this.emotionalValence = EmotionalValence.neutral,
  this.emotionalIntensity = 0.0,
  double strength = 1.0,
  List<String>? associatedConceptIds,
  Map<String, dynamic>? context,
})  : timestamp = timestamp ?? DateTime.now(),
      strength = strength,
      associatedConceptIds = associatedConceptIds ?? const [],
      context = context ?? const {};