2 aggregates::structs::{CommentAggregates, PersonAggregates, PostAggregates, SiteAggregates},
5 comment_report::CommentReport,
6 community::CommunitySafe,
8 local_user::{LocalUser, LocalUserSettings},
9 person::{Person, PersonSafe, PersonSafeAlias1, PersonSafeAlias2},
11 post_report::PostReport,
12 private_message::PrivateMessage,
13 private_message_report::PrivateMessageReport,
14 registration_application::RegistrationApplication,
19 use serde::{Deserialize, Serialize};
21 #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
22 pub struct CommentReportView {
23 pub comment_report: CommentReport,
26 pub community: CommunitySafe,
27 pub creator: PersonSafe,
28 pub comment_creator: PersonSafeAlias1,
29 pub counts: CommentAggregates,
30 pub creator_banned_from_community: bool, // Left Join to CommunityPersonBan
31 pub my_vote: Option<i16>, // Left join to CommentLike
32 pub resolver: Option<PersonSafeAlias2>,
35 #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
36 pub struct CommentView {
38 pub creator: PersonSafe,
40 pub community: CommunitySafe,
41 pub counts: CommentAggregates,
42 pub creator_banned_from_community: bool, // Left Join to CommunityPersonBan
43 pub subscribed: SubscribedType, // Left join to CommunityFollower
44 pub saved: bool, // Left join to CommentSaved
45 pub creator_blocked: bool, // Left join to PersonBlock
46 pub my_vote: Option<i16>, // Left join to CommentLike
49 #[derive(Debug, Serialize, Deserialize, Clone)]
50 pub struct LocalUserView {
51 pub local_user: LocalUser,
53 pub counts: PersonAggregates,
56 #[derive(Debug, Serialize, Deserialize, Clone)]
57 pub struct LocalUserSettingsView {
58 pub local_user: LocalUserSettings,
59 pub person: PersonSafe,
60 pub counts: PersonAggregates,
63 #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
64 pub struct PostReportView {
65 pub post_report: PostReport,
67 pub community: CommunitySafe,
68 pub creator: PersonSafe,
69 pub post_creator: PersonSafeAlias1,
70 pub creator_banned_from_community: bool,
71 pub my_vote: Option<i16>,
72 pub counts: PostAggregates,
73 pub resolver: Option<PersonSafeAlias2>,
76 #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
79 pub creator: PersonSafe,
80 pub community: CommunitySafe,
81 pub creator_banned_from_community: bool, // Left Join to CommunityPersonBan
82 pub counts: PostAggregates,
83 pub subscribed: SubscribedType, // Left join to CommunityFollower
84 pub saved: bool, // Left join to PostSaved
85 pub read: bool, // Left join to PostRead
86 pub creator_blocked: bool, // Left join to PersonBlock
87 pub my_vote: Option<i16>, // Left join to PostLike
88 pub language: Language,
91 #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
92 pub struct PrivateMessageView {
93 pub private_message: PrivateMessage,
94 pub creator: PersonSafe,
95 pub recipient: PersonSafeAlias1,
98 #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
99 pub struct PrivateMessageReportView {
100 pub private_message_report: PrivateMessageReport,
101 pub private_message: PrivateMessage,
102 pub private_message_creator: PersonSafe,
103 pub creator: PersonSafeAlias1,
104 pub resolver: Option<PersonSafeAlias2>,
107 #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
108 pub struct RegistrationApplicationView {
109 pub registration_application: RegistrationApplication,
110 pub creator_local_user: LocalUserSettings,
111 pub creator: PersonSafe,
112 pub admin: Option<PersonSafeAlias1>,
115 #[derive(Debug, Serialize, Deserialize, Clone)]
116 pub struct SiteView {
118 pub counts: SiteAggregates,
121 #[derive(Debug, Serialize, Deserialize, Clone)]
122 pub struct LocalUserDiscussionLanguageView {
123 pub local_user: LocalUserSettings,
124 pub language: Language,