Comment constructor

const Comment({
  1. required String id,
  2. required String threadId,
  3. required String body,
  4. required String authorId,
  5. String? authorName,
  6. String? authorAvatarUrl,
  7. String? parentId,
  8. required DateTime createdAt,
  9. required DateTime updatedAt,
  10. String? status,
  11. bool isDeleted = false,
  12. bool isFlagged = false,
  13. Map<String, dynamic> metadata = const <String, dynamic>{},
})

Builds a new Comment instance.

Most fields are provided by the backend; metadata defaults to an empty map if none is present in the payload.

Implementation

const Comment({
  required this.id,
  required this.threadId,
  required this.body,
  required this.authorId,
  this.authorName,
  this.authorAvatarUrl,
  this.parentId,
  required this.createdAt,
  required this.updatedAt,
  this.status,
  this.isDeleted = false,
  this.isFlagged = false,
  this.metadata = const <String, dynamic>{},
});