Comment constructor
Comment({})
Creates a new Comment.
Required parameters:
id: Unique identifierdate: Creation date and timecontent: Comment textentityId: ID of the entity this comment belongs touserId: ID of the comment authorusername: Display name of the comment author
Optional parameters:
parentId: ID of parent comment (for replies)likeCount: Number of likes (default:null)replyCount: Number of replies (default:null)isLiked: Whether current user liked it (default:null)isMine: Whether current user created it (default:false)replies: List of direct replies (default: empty list)
Implementation
Comment({
required this.id,
required this.date,
this.parentId,
required this.content,
required this.entityId,
required this.userId,
required this.username,
this.likeCount,
this.replyCount,
this.isLiked,
this.isMine = false,
this.replies = const [],
});