]> Untitled Git - lemmy.git/blobdiff - crates/db_schema/src/source/moderator.rs
Hide community v2 (#2055)
[lemmy.git] / crates / db_schema / src / source / moderator.rs
index ee8bc693fe7ab860bedea13448050a5a15e9e882..84121f9a457e64e8aea430a9fa1e55f6dc18ce21 100644 (file)
@@ -5,6 +5,7 @@ use crate::{
     mod_add_community,
     mod_ban,
     mod_ban_from_community,
+    mod_hide_community,
     mod_lock_post,
     mod_remove_comment,
     mod_remove_community,
@@ -149,6 +150,25 @@ pub struct ModBan {
   pub when_: chrono::NaiveDateTime,
 }
 
+#[derive(Insertable, AsChangeset)]
+#[table_name = "mod_hide_community"]
+pub struct ModHideCommunityForm {
+  pub community_id: CommunityId,
+  pub mod_person_id: PersonId,
+  pub hidden: Option<bool>,
+  pub reason: Option<String>,
+}
+#[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize, Deserialize)]
+#[table_name = "mod_hide_community"]
+pub struct ModHideCommunity {
+  pub id: i32,
+  pub community_id: CommunityId,
+  pub mod_person_id: PersonId,
+  pub reason: Option<String>,
+  pub hidden: Option<bool>,
+  pub when_: chrono::NaiveDateTime,
+}
+
 #[derive(Insertable, AsChangeset)]
 #[table_name = "mod_ban"]
 pub struct ModBanForm {