CommentAggregates constructor

const CommentAggregates({
  1. @JsonKey.new(name: 'comment_id') required int commentId,
  2. @Default.new(0) int score,
  3. @Default.new(0) int upvotes,
  4. @Default.new(0) int downvotes,
  5. @JsonKey.new(name: 'child_count') @Default.new(0) int childCount,
})

Implementation

const factory CommentAggregates({
  @JsonKey(name: 'comment_id') required int commentId,
  @Default(0) int score,
  @Default(0) int upvotes,
  @Default(0) int downvotes,
  @JsonKey(name: 'child_count') @Default(0) int childCount,
}) = _CommentAggregates;