2 aggregates::structs::{CommentAggregates, PersonAggregates, PostAggregates, SiteAggregates},
5 comment_report::CommentReport,
8 local_site_rate_limit::LocalSiteRateLimit,
12 post_report::PostReport,
13 private_message::PrivateMessage,
14 private_message_report::PrivateMessageReport,
15 registration_application::RegistrationApplication,
20 use serde::{Deserialize, Serialize};
22 #[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone)]
23 pub struct CommentReportView {
24 pub comment_report: CommentReport,
27 pub community: Community,
29 pub comment_creator: Person,
30 pub counts: CommentAggregates,
31 pub creator_banned_from_community: bool, // Left Join to CommunityPersonBan
32 pub my_vote: Option<i16>, // Left join to CommentLike
33 pub resolver: Option<Person>,
36 #[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone)]
37 pub struct CommentView {
41 pub community: Community,
42 pub counts: CommentAggregates,
43 pub creator_banned_from_community: bool, // Left Join to CommunityPersonBan
44 pub subscribed: SubscribedType, // Left join to CommunityFollower
45 pub saved: bool, // Left join to CommentSaved
46 pub creator_blocked: bool, // Left join to PersonBlock
47 pub my_vote: Option<i16>, // Left join to CommentLike
50 #[derive(Debug, Serialize, Deserialize, Clone)]
51 pub struct LocalUserView {
52 pub local_user: LocalUser,
54 pub counts: PersonAggregates,
57 #[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone)]
58 pub struct PostReportView {
59 pub post_report: PostReport,
61 pub community: Community,
63 pub post_creator: Person,
64 pub creator_banned_from_community: bool,
65 pub my_vote: Option<i16>,
66 pub counts: PostAggregates,
67 pub resolver: Option<Person>,
70 #[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone)]
74 pub community: Community,
75 pub creator_banned_from_community: bool, // Left Join to CommunityPersonBan
76 pub counts: PostAggregates,
77 pub subscribed: SubscribedType, // Left join to CommunityFollower
78 pub saved: bool, // Left join to PostSaved
79 pub read: bool, // Left join to PostRead
80 pub creator_blocked: bool, // Left join to PersonBlock
81 pub my_vote: Option<i16>, // Left join to PostLike
82 pub unread_comments: i64, // Left join to PersonPostAggregates
85 #[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone)]
86 pub struct PrivateMessageView {
87 pub private_message: PrivateMessage,
89 pub recipient: Person,
92 #[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone)]
93 pub struct PrivateMessageReportView {
94 pub private_message_report: PrivateMessageReport,
95 pub private_message: PrivateMessage,
96 pub private_message_creator: Person,
98 pub resolver: Option<Person>,
101 #[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone)]
102 pub struct RegistrationApplicationView {
103 pub registration_application: RegistrationApplication,
104 pub creator_local_user: LocalUser,
106 pub admin: Option<Person>,
109 #[derive(Debug, Serialize, Deserialize, Clone)]
110 pub struct SiteView {
112 pub local_site: LocalSite,
113 pub local_site_rate_limit: LocalSiteRateLimit,
114 pub counts: SiteAggregates,