go-lemmy/types/aggregates.go

56 lines
2.9 KiB
Go
Raw Normal View History

2022-12-10 17:17:16 +00:00
package types
type PersonAggregates struct {
2022-12-10 23:33:08 +00:00
ID int `json:"id" url:"id,omitempty"`
PersonID int `json:"person_id" url:"person_id,omitempty"`
PostCount int `json:"post_count" url:"post_count,omitempty"`
PostScore int `json:"post_score" url:"post_score,omitempty"`
CommentCount int `json:"comment_count" url:"comment_count,omitempty"`
CommentScore int `json:"comment_score" url:"comment_score,omitempty"`
2022-12-10 17:17:16 +00:00
}
type SiteAggregates struct {
2022-12-10 23:33:08 +00:00
ID int `json:"id" url:"id,omitempty"`
SiteID int `json:"site_id" url:"site_id,omitempty"`
Users int `json:"users" url:"users,omitempty"`
Posts int `json:"posts" url:"posts,omitempty"`
Comments int `json:"comments" url:"comments,omitempty"`
Communities int `json:"communities" url:"communities,omitempty"`
UsersActiveDay int `json:"users_active_day" url:"users_active_day,omitempty"`
UsersActiveWeek int `json:"users_active_week" url:"users_active_week,omitempty"`
UsersActiveMonth int `json:"users_active_month" url:"users_active_month,omitempty"`
UsersActiveHalfYear int `json:"users_active_half_year" url:"users_active_half_year,omitempty"`
2022-12-10 17:17:16 +00:00
}
type PostAggregates struct {
2022-12-10 23:33:08 +00:00
ID int `json:"id" url:"id,omitempty"`
PostID int `json:"post_id" url:"post_id,omitempty"`
Comments int `json:"comments" url:"comments,omitempty"`
Score int `json:"score" url:"score,omitempty"`
Upvotes int `json:"upvotes" url:"upvotes,omitempty"`
Downvotes int `json:"downvotes" url:"downvotes,omitempty"`
NewestCommentTimeNecro string `json:"newest_comment_time_necro" url:"newest_comment_time_necro,omitempty"`
NewestCommentTime string `json:"newest_comment_time" url:"newest_comment_time,omitempty"`
2022-12-10 17:17:16 +00:00
}
type CommunityAggregates struct {
2022-12-10 23:33:08 +00:00
ID int `json:"id" url:"id,omitempty"`
CommunityID int `json:"community_id" url:"community_id,omitempty"`
Subscribers int `json:"subscribers" url:"subscribers,omitempty"`
Posts int `json:"posts" url:"posts,omitempty"`
Comments int `json:"comments" url:"comments,omitempty"`
UsersActiveDay int `json:"users_active_day" url:"users_active_day,omitempty"`
UsersActiveWeek int `json:"users_active_week" url:"users_active_week,omitempty"`
UsersActiveMonth int `json:"users_active_month" url:"users_active_month,omitempty"`
UsersActiveHalfYear int `json:"users_active_half_year" url:"users_active_half_year,omitempty"`
2022-12-10 17:17:16 +00:00
}
type CommentAggregates struct {
2022-12-10 23:33:08 +00:00
ID int `json:"id" url:"id,omitempty"`
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
Score int `json:"score" url:"score,omitempty"`
Upvotes int `json:"upvotes" url:"upvotes,omitempty"`
Downvotes int `json:"downvotes" url:"downvotes,omitempty"`
ChildCount int `json:"child_count" url:"child_count,omitempty"`
2022-12-10 17:17:16 +00:00
}