]> Untitled Git - lemmy.git/blobdiff - crates/db_views/src/structs.rs
Implement reports for private messages (#2433)
[lemmy.git] / crates / db_views / src / structs.rs
index a3c11171228ef258a3b36bd8cac377964fd529b3..1d509a1399fb7c6bb042fa92c25055e4f84758a6 100644 (file)
@@ -10,6 +10,7 @@ use lemmy_db_schema::{
     post::Post,
     post_report::PostReport,
     private_message::PrivateMessage,
+    private_message_report::PrivateMessageReport,
     registration_application::RegistrationApplication,
     site::Site,
   },
@@ -94,6 +95,15 @@ pub struct PrivateMessageView {
   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,