2 aggregates::structs::{CommentAggregates, PersonAggregates, PostAggregates, SiteAggregates},
5 comment_report::CommentReport,
6 community::CommunitySafe,
7 local_user::{LocalUser, LocalUserSettings},
8 person::{Person, PersonSafe, PersonSafeAlias1, PersonSafeAlias2},
10 post_report::PostReport,
11 private_message::PrivateMessage,
12 registration_application::RegistrationApplication,
17 use serde::{Deserialize, Serialize};
19 #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
20 pub struct CommentReportView {
21 pub comment_report: CommentReport,
24 pub community: CommunitySafe,
25 pub creator: PersonSafe,
26 pub comment_creator: PersonSafeAlias1,
27 pub counts: CommentAggregates,
28 pub creator_banned_from_community: bool, // Left Join to CommunityPersonBan
29 pub my_vote: Option<i16>, // Left join to CommentLike
30 pub resolver: Option<PersonSafeAlias2>,
33 #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
34 pub struct CommentView {
36 pub creator: PersonSafe,
38 pub community: CommunitySafe,
39 pub counts: CommentAggregates,
40 pub creator_banned_from_community: bool, // Left Join to CommunityPersonBan
41 pub subscribed: SubscribedType, // Left join to CommunityFollower
42 pub saved: bool, // Left join to CommentSaved
43 pub creator_blocked: bool, // Left join to PersonBlock
44 pub my_vote: Option<i16>, // Left join to CommentLike
47 #[derive(Debug, Serialize, Deserialize, Clone)]
48 pub struct LocalUserView {
49 pub local_user: LocalUser,
51 pub counts: PersonAggregates,
54 #[derive(Debug, Serialize, Deserialize, Clone)]
55 pub struct LocalUserSettingsView {
56 pub local_user: LocalUserSettings,
57 pub person: PersonSafe,
58 pub counts: PersonAggregates,
61 #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
62 pub struct PostReportView {
63 pub post_report: PostReport,
65 pub community: CommunitySafe,
66 pub creator: PersonSafe,
67 pub post_creator: PersonSafeAlias1,
68 pub creator_banned_from_community: bool,
69 pub my_vote: Option<i16>,
70 pub counts: PostAggregates,
71 pub resolver: Option<PersonSafeAlias2>,
74 #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
77 pub creator: PersonSafe,
78 pub community: CommunitySafe,
79 pub creator_banned_from_community: bool, // Left Join to CommunityPersonBan
80 pub counts: PostAggregates,
81 pub subscribed: SubscribedType, // Left join to CommunityFollower
82 pub saved: bool, // Left join to PostSaved
83 pub read: bool, // Left join to PostRead
84 pub creator_blocked: bool, // Left join to PersonBlock
85 pub my_vote: Option<i16>, // Left join to PostLike
88 #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
89 pub struct PrivateMessageView {
90 pub private_message: PrivateMessage,
91 pub creator: PersonSafe,
92 pub recipient: PersonSafeAlias1,
95 #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
96 pub struct RegistrationApplicationView {
97 pub registration_application: RegistrationApplication,
98 pub creator_local_user: LocalUserSettings,
99 pub creator: PersonSafe,
100 pub admin: Option<PersonSafeAlias1>,
103 #[derive(Debug, Serialize, Deserialize, Clone)]
104 pub struct SiteView {
106 pub counts: SiteAggregates,