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 registration_application::RegistrationApplication,
18 use serde::{Deserialize, Serialize};
20 #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
21 pub struct CommentReportView {
22 pub comment_report: CommentReport,
25 pub community: CommunitySafe,
26 pub creator: PersonSafe,
27 pub comment_creator: PersonSafeAlias1,
28 pub counts: CommentAggregates,
29 pub creator_banned_from_community: bool, // Left Join to CommunityPersonBan
30 pub my_vote: Option<i16>, // Left join to CommentLike
31 pub resolver: Option<PersonSafeAlias2>,
34 #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
35 pub struct CommentView {
37 pub creator: PersonSafe,
39 pub community: CommunitySafe,
40 pub counts: CommentAggregates,
41 pub creator_banned_from_community: bool, // Left Join to CommunityPersonBan
42 pub subscribed: SubscribedType, // Left join to CommunityFollower
43 pub saved: bool, // Left join to CommentSaved
44 pub creator_blocked: bool, // Left join to PersonBlock
45 pub my_vote: Option<i16>, // Left join to CommentLike
48 #[derive(Debug, Serialize, Deserialize, Clone)]
49 pub struct LocalUserView {
50 pub local_user: LocalUser,
52 pub counts: PersonAggregates,
55 #[derive(Debug, Serialize, Deserialize, Clone)]
56 pub struct LocalUserSettingsView {
57 pub local_user: LocalUserSettings,
58 pub person: PersonSafe,
59 pub counts: PersonAggregates,
62 #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
63 pub struct PostReportView {
64 pub post_report: PostReport,
66 pub community: CommunitySafe,
67 pub creator: PersonSafe,
68 pub post_creator: PersonSafeAlias1,
69 pub creator_banned_from_community: bool,
70 pub my_vote: Option<i16>,
71 pub counts: PostAggregates,
72 pub resolver: Option<PersonSafeAlias2>,
75 #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
78 pub creator: PersonSafe,
79 pub community: CommunitySafe,
80 pub creator_banned_from_community: bool, // Left Join to CommunityPersonBan
81 pub counts: PostAggregates,
82 pub subscribed: SubscribedType, // Left join to CommunityFollower
83 pub saved: bool, // Left join to PostSaved
84 pub read: bool, // Left join to PostRead
85 pub creator_blocked: bool, // Left join to PersonBlock
86 pub my_vote: Option<i16>, // Left join to PostLike
87 pub language: Language,
90 #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
91 pub struct PrivateMessageView {
92 pub private_message: PrivateMessage,
93 pub creator: PersonSafe,
94 pub recipient: PersonSafeAlias1,
97 #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
98 pub struct RegistrationApplicationView {
99 pub registration_application: RegistrationApplication,
100 pub creator_local_user: LocalUserSettings,
101 pub creator: PersonSafe,
102 pub admin: Option<PersonSafeAlias1>,
105 #[derive(Debug, Serialize, Deserialize, Clone)]
106 pub struct SiteView {
108 pub counts: SiteAggregates,
111 #[derive(Debug, Serialize, Deserialize, Clone)]
112 pub struct LocalUserDiscussionLanguageView {
113 pub local_user: LocalUserSettings,
114 pub language: Language,