PostAggregates constructor
const
PostAggregates({
- @JsonKey.new(name: 'post_id') required int postId,
- @Default.new(0) int comments,
- @Default.new(0) int score,
- @Default.new(0) int upvotes,
- @Default.new(0) int downvotes,
- @JsonKey.new(name: 'newest_comment_time') DateTime? newestCommentTime,
- @JsonKey.new(name: 'newest_comment_time_necro') DateTime? newestCommentTimeNecro,
Implementation
const factory PostAggregates({
@JsonKey(name: 'post_id') required int postId,
@Default(0) int comments,
@Default(0) int score,
@Default(0) int upvotes,
@Default(0) int downvotes,
@JsonKey(name: 'newest_comment_time') DateTime? newestCommentTime,
@JsonKey(name: 'newest_comment_time_necro') DateTime? newestCommentTimeNecro,
}) = _PostAggregates;