2 aggregates::structs::{CommentAggregates, PersonAggregates, PostAggregates, SiteAggregates},
5 comment_report::CommentReport,
7 custom_emoji::CustomEmoji,
8 custom_emoji_keyword::CustomEmojiKeyword,
10 local_site_rate_limit::LocalSiteRateLimit,
11 local_user::LocalUser,
14 post_report::PostReport,
15 private_message::PrivateMessage,
16 private_message_report::PrivateMessageReport,
17 registration_application::RegistrationApplication,
22 use serde::{Deserialize, Serialize};
24 #[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone)]
25 pub struct CommentReportView {
26 pub comment_report: CommentReport,
29 pub community: Community,
31 pub comment_creator: Person,
32 pub counts: CommentAggregates,
33 pub creator_banned_from_community: bool, // Left Join to CommunityPersonBan
34 pub my_vote: Option<i16>, // Left join to CommentLike
35 pub resolver: Option<Person>,
38 #[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone)]
39 pub struct CommentView {
43 pub community: Community,
44 pub counts: CommentAggregates,
45 pub creator_banned_from_community: bool, // Left Join to CommunityPersonBan
46 pub subscribed: SubscribedType, // Left join to CommunityFollower
47 pub saved: bool, // Left join to CommentSaved
48 pub creator_blocked: bool, // Left join to PersonBlock
49 pub my_vote: Option<i16>, // Left join to CommentLike
52 #[derive(Debug, Serialize, Deserialize, Clone)]
53 pub struct LocalUserView {
54 pub local_user: LocalUser,
56 pub counts: PersonAggregates,
59 #[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone)]
60 pub struct PostReportView {
61 pub post_report: PostReport,
63 pub community: Community,
65 pub post_creator: Person,
66 pub creator_banned_from_community: bool,
67 pub my_vote: Option<i16>,
68 pub counts: PostAggregates,
69 pub resolver: Option<Person>,
72 #[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone)]
76 pub community: Community,
77 pub creator_banned_from_community: bool, // Left Join to CommunityPersonBan
78 pub counts: PostAggregates,
79 pub subscribed: SubscribedType, // Left join to CommunityFollower
80 pub saved: bool, // Left join to PostSaved
81 pub read: bool, // Left join to PostRead
82 pub creator_blocked: bool, // Left join to PersonBlock
83 pub my_vote: Option<i16>, // Left join to PostLike
84 pub unread_comments: i64, // Left join to PersonPostAggregates
87 #[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone)]
88 pub struct PrivateMessageView {
89 pub private_message: PrivateMessage,
91 pub recipient: Person,
94 #[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone)]
95 pub struct PrivateMessageReportView {
96 pub private_message_report: PrivateMessageReport,
97 pub private_message: PrivateMessage,
98 pub private_message_creator: Person,
100 pub resolver: Option<Person>,
103 #[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone)]
104 pub struct RegistrationApplicationView {
105 pub registration_application: RegistrationApplication,
106 pub creator_local_user: LocalUser,
108 pub admin: Option<Person>,
111 #[derive(Debug, Serialize, Deserialize, Clone)]
112 pub struct SiteView {
114 pub local_site: LocalSite,
115 pub local_site_rate_limit: LocalSiteRateLimit,
116 pub counts: SiteAggregates,
118 #[derive(Debug, Serialize, Deserialize, Clone)]
119 pub struct CustomEmojiView {
120 pub custom_emoji: CustomEmoji,
121 pub keywords: Vec<CustomEmojiKeyword>,