comment::Comment,
comment_report::CommentReport,
community::CommunitySafe,
+ language::Language,
local_user::{LocalUser, LocalUserSettings},
person::{Person, PersonSafe, PersonSafeAlias1, PersonSafeAlias2},
post::Post,
post_report::PostReport,
private_message::PrivateMessage,
+ private_message_report::PrivateMessageReport,
registration_application::RegistrationApplication,
site::Site,
},
+ SubscribedType,
};
use serde::{Deserialize, Serialize};
pub struct CommentView {
pub comment: Comment,
pub creator: PersonSafe,
- pub recipient: Option<PersonSafeAlias1>, // Left joins to comment and person
pub post: Post,
pub community: CommunitySafe,
pub counts: CommentAggregates,
pub creator_banned_from_community: bool, // Left Join to CommunityPersonBan
- pub subscribed: bool, // Left join to CommunityFollower
+ pub subscribed: SubscribedType, // Left join to CommunityFollower
pub saved: bool, // Left join to CommentSaved
pub creator_blocked: bool, // Left join to PersonBlock
pub my_vote: Option<i16>, // Left join to CommentLike
pub community: CommunitySafe,
pub creator_banned_from_community: bool, // Left Join to CommunityPersonBan
pub counts: PostAggregates,
- pub subscribed: bool, // Left join to CommunityFollower
- pub saved: bool, // Left join to PostSaved
- pub read: bool, // Left join to PostRead
- pub creator_blocked: bool, // Left join to PersonBlock
- pub my_vote: Option<i16>, // Left join to PostLike
+ pub subscribed: SubscribedType, // Left join to CommunityFollower
+ pub saved: bool, // Left join to PostSaved
+ pub read: bool, // Left join to PostRead
+ pub creator_blocked: bool, // Left join to PersonBlock
+ pub my_vote: Option<i16>, // Left join to PostLike
+ pub language: Language,
}
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
pub recipient: PersonSafeAlias1,
}
+#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
+pub struct PrivateMessageReportView {
+ pub private_message_report: PrivateMessageReport,
+ pub private_message: PrivateMessage,
+ pub private_message_creator: PersonSafe,
+ pub creator: PersonSafeAlias1,
+ pub resolver: Option<PersonSafeAlias2>,
+}
+
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
pub struct RegistrationApplicationView {
pub registration_application: RegistrationApplication,
pub site: Site,
pub counts: SiteAggregates,
}
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+pub struct LocalUserDiscussionLanguageView {
+ pub local_user: LocalUserSettings,
+ pub language: Language,
+}